~ubuntu-branches/ubuntu/quantal/openmotif/quantal

« back to all changes in this revision

Viewing changes to demos/programs/animate/xmanimate.uil

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Bauer
  • Date: 2010-06-23 12:12:31 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100623121231-u89gxdp51sg9wjj2
Tags: 2.3.0-1
* New Maintainer (Closes: #379258) 
* Acknowledge NMU changes
* New upstream release (Closes: #494375)
* Get rid of security patches as they are already part of new upstream
  release (00-xpmvuln.openmotif.patch, 342092-CVE-2005-3964.patch)
* Bump Standards to 3.8.4
* Added {misc:Depends} to make the package lintian cleaner
* Fix weak-library-dev-dependency by adding ${binary:Version}) for the
  -dev Package of openmotif
* Let package depend on autotools-dev to use newer autotools-helper-files
* Work around an autoconf-bug (Gentoo-Bug #1475)
* Added Client-side anti-aliased fonts support via XFT
* Added UTF-8 and UTF8_STRING atom support
* Ability to show text and pixmaps in Label, LabelGadget and all
  derived widgets
* Support of PNG/JPEG image formats in the same way as XPM is supported
* Increase FILE_OFFSET_BITS to 64 to show files >2GB in file-selector
  Idea taken from Magne Oestlyngen (Closes: #288537)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
! $XConsortium: xmanimate.uil /main/4 1996/07/15 15:13:12 drk $
 
2
! @OPENGROUP_COPYRIGHT@
 
3
! COPYRIGHT NOTICE
 
4
! Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
 
5
! Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group
 
6
! ALL RIGHTS RESERVED (MOTIF).  See the file named COPYRIGHT.MOTIF for
 
7
! the full copyright text.
 
8
 
9
! This software is subject to an open license. It may only be
 
10
! used on, with or for operating systems which are themselves open
 
11
! source systems. You must contact The Open Group for a license
 
12
! allowing distribution and sublicensing of this software on, with,
 
13
! or for operating systems which are not Open Source programs.
 
14
 
15
! See http://www.opengroup.org/openmotif/license for full
 
16
! details of the license agreement. Any use, reproduction, or
 
17
! distribution of the program constitutes recipient's acceptance of
 
18
! this agreement.
 
19
 
20
! EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
 
21
! PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
22
! KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
 
23
! WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
 
24
! OR FITNESS FOR A PARTICULAR PURPOSE
 
25
 
26
! EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
 
27
! NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
 
28
! INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
29
! DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED
 
30
! AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
31
! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 
32
! ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
 
33
! EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
 
34
! POSSIBILITY OF SUCH DAMAGES.
 
35
 
36
 
37
! HISTORY
 
38
 
 
39
!***************************************************************
 
40
!*                                                            **
 
41
!*   Motifanim general interface.                             **
 
42
!*   Author : Daniel Dardailler, March 90, June 90, August 91 **
 
43
!*                                                            **
 
44
!**************************************************************/
 
45
module motifanim
 
46
    version = 'v1.0'
 
47
    names = case_sensitive
 
48
 
 
49
procedure
 
50
    p_motifanim_start();    
 
51
    p_motifanim_stop();    
 
52
    p_motifanim_step();
 
53
    p_motifanim_speed(integer);
 
54
    p_motifanim_exit();
 
55
    p_motifanim_help();
 
56
    p_motifanim_draw(integer);  
 
57
 
 
58
 
 
59
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
60
! The main is a big Form that try to manage its children 
 
61
! as well as possible...
 
62
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
63
 
 
64
object
 
65
    motifanim_main : XmMainWindow {
 
66
       controls {
 
67
            XmMenuBar     motifanim_bar ;
 
68
            XmForm        motifanim_form ;
 
69
       };
 
70
    };
 
71
 
 
72
object
 
73
    motifanim_form : XmForm {
 
74
        arguments { 
 
75
            XmNdefaultButton = motifanim_start ;
 
76
        };
 
77
        controls {
 
78
            XmScrolledWindow    motifanim_view;
 
79
            XmSeparator         motifanim_sep;
 
80
            XmPushButton        motifanim_start;
 
81
            XmPushButton        motifanim_stop;
 
82
            XmPushButton        motifanim_step;
 
83
            XmScale             motifanim_speed;
 
84
        };
 
85
    };
 
86
 
 
87
!-------------------------------------------------------
 
88
! As a geometry starting point, we fix the bottom line of 
 
89
! PushButtons (start, stop..) to the Form bottom and sides
 
90
! and the menubar to the top
 
91
!-------------------------------------------------------
 
92
 
 
93
object
 
94
    motifanim_bar : XmMenuBar {
 
95
        arguments {
 
96
            XmNmenuHelpWidget = XmCascadeButton help_entry;
 
97
         };
 
98
         controls {                              
 
99
            XmCascadeButton file_menu_entry;
 
100
            XmCascadeButton help_entry;
 
101
         };
 
102
    };
 
103
 
 
104
object
 
105
        file_menu_entry : XmCascadeButton {
 
106
            arguments {
 
107
                XmNlabelString = compound_string('File') ;
 
108
                XmNmnemonic = keysym("F");
 
109
            };                                            
 
110
            controls {
 
111
                XmPulldownMenu file_menu;
 
112
            };
 
113
        };
 
114
object
 
115
        help_entry : XmCascadeButton {
 
116
            arguments {
 
117
                XmNlabelString = compound_string('Help') ;
 
118
                XmNmnemonic = keysym("H");
 
119
            };                                            
 
120
            controls {
 
121
                XmPulldownMenu help_menu;
 
122
            };
 
123
        };
 
124
 
 
125
object
 
126
        file_menu : XmPulldownMenu {
 
127
            controls {
 
128
                XmPushButton motifanim_quit;
 
129
            };
 
130
        };
 
131
object
 
132
        help_menu : XmPulldownMenu {
 
133
            controls {
 
134
                XmPushButton motifanim_help;
 
135
            };
 
136
        };
 
137
 
 
138
object
 
139
    motifanim_quit : XmPushButton {
 
140
        arguments { 
 
141
            XmNlabelString = compound_string('Quit');
 
142
            XmNmnemonic = keysym("Q");
 
143
        };
 
144
        callbacks { 
 
145
            XmNactivateCallback = procedure p_motifanim_exit();
 
146
        };
 
147
    };
 
148
object
 
149
    motifanim_help : XmPushButton {
 
150
        arguments { 
 
151
            XmNlabelString = compound_string('Overview');
 
152
            XmNmnemonic = keysym("O");
 
153
        };
 
154
        callbacks { 
 
155
            XmNactivateCallback = procedure p_motifanim_help();
 
156
        };
 
157
    };
 
158
 
 
159
object
 
160
    motifanim_start : XmPushButton {
 
161
        arguments { 
 
162
            XmNlabelString = compound_string('Start');
 
163
            XmNbottomAttachment = XmATTACH_FORM ;
 
164
            XmNleftAttachment = XmATTACH_FORM ;
 
165
        };
 
166
        callbacks { 
 
167
            XmNactivateCallback = procedure p_motifanim_start();
 
168
        };
 
169
    };
 
170
 
 
171
object
 
172
    motifanim_stop : XmPushButton {
 
173
        arguments { 
 
174
            XmNlabelString = compound_string('Stop');
 
175
            XmNbottomAttachment = XmATTACH_FORM ;
 
176
            XmNleftAttachment = XmATTACH_WIDGET ;
 
177
            XmNleftWidget = XmPushButton motifanim_start ;
 
178
        };
 
179
        callbacks { 
 
180
            XmNactivateCallback = procedure p_motifanim_stop();
 
181
        };
 
182
    };
 
183
 
 
184
object
 
185
    motifanim_step : XmPushButton {
 
186
        arguments { 
 
187
            XmNlabelString = compound_string('One step');
 
188
            XmNbottomAttachment = XmATTACH_FORM ;
 
189
            XmNleftAttachment = XmATTACH_WIDGET ;
 
190
            XmNleftWidget = XmPushButton motifanim_stop ;
 
191
        };
 
192
        callbacks { 
 
193
            XmNactivateCallback = procedure p_motifanim_step();
 
194
        };
 
195
    };
 
196
 
 
197
object
 
198
    motifanim_speed : XmScale {
 
199
        arguments { 
 
200
            XmNtitleString = compound_string('Speed');
 
201
            XmNorientation = XmHORIZONTAL ;
 
202
            XmNbottomAttachment = XmATTACH_FORM ;
 
203
            XmNleftAttachment = XmATTACH_WIDGET ;
 
204
            XmNleftWidget = XmPushButton motifanim_step ;
 
205
        };
 
206
        callbacks { 
 
207
            MrmNcreateCallback = procedure p_motifanim_speed(0);
 
208
            XmNdragCallback = procedure p_motifanim_speed(1);
 
209
            XmNvalueChangedCallback = procedure p_motifanim_speed(2);
 
210
        };
 
211
    };
 
212
 
 
213
 
 
214
 
 
215
!-------------------------------------------------------
 
216
! Now that the bottom pushbuttons are fixed,
 
217
! we attach the Separator to the first one in the line
 
218
!-------------------------------------------------------
 
219
 
 
220
 
 
221
object
 
222
    motifanim_sep : XmSeparator {
 
223
        arguments {
 
224
            XmNrightAttachment = XmATTACH_FORM ;
 
225
            XmNleftAttachment = XmATTACH_FORM ;
 
226
            XmNbottomAttachment = XmATTACH_WIDGET ;
 
227
            XmNbottomWidget = motifanim_speed ;
 
228
        };
 
229
    };
 
230
 
 
231
 
 
232
 
 
233
!-------------------------------------------------------
 
234
! This one is full rubber
 
235
!-------------------------------------------------------
 
236
 
 
237
object
 
238
    motifanim_view : XmScrolledWindow {
 
239
        arguments {
 
240
            XmNrightAttachment = XmATTACH_FORM ;
 
241
            XmNtopAttachment = XmATTACH_FORM ;
 
242
            XmNbottomAttachment = XmATTACH_WIDGET ;
 
243
            XmNbottomWidget = XmSeparator motifanim_sep ;
 
244
            XmNleftAttachment = XmATTACH_FORM ;
 
245
            XmNscrollingPolicy = XmAUTOMATIC ;
 
246
        };
 
247
        controls {
 
248
            XmDrawingArea       view_anim ;
 
249
        };
 
250
    };
 
251
 
 
252
value
 
253
        anim_width     : imported integer ;
 
254
        anim_height    : imported integer ;
 
255
        anim_backcolor : imported color ;
 
256
 
 
257
object
 
258
    view_anim : XmDrawingArea {
 
259
        arguments { 
 
260
            XmNwidth = anim_width ;
 
261
            XmNheight = anim_height ;
 
262
            XmNbackground = anim_backcolor ;
 
263
        };
 
264
        callbacks {
 
265
            MrmNcreateCallback = procedure p_motifanim_draw(0);
 
266
            XmNexposeCallback = procedure p_motifanim_draw(1);
 
267
        };
 
268
    };
 
269
 
 
270
end module;
 
271
 
 
272