1
! $XConsortium: xmanimate.uil /main/4 1996/07/15 15:13:12 drk $
2
! @OPENGROUP_COPYRIGHT@
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.
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.
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
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
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.
39
!***************************************************************
41
!* Motifanim general interface. **
42
!* Author : Daniel Dardailler, March 90, June 90, August 91 **
44
!**************************************************************/
47
names = case_sensitive
53
p_motifanim_speed(integer);
56
p_motifanim_draw(integer);
59
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
60
! The main is a big Form that try to manage its children
61
! as well as possible...
62
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
65
motifanim_main : XmMainWindow {
67
XmMenuBar motifanim_bar ;
68
XmForm motifanim_form ;
73
motifanim_form : XmForm {
75
XmNdefaultButton = motifanim_start ;
78
XmScrolledWindow motifanim_view;
79
XmSeparator motifanim_sep;
80
XmPushButton motifanim_start;
81
XmPushButton motifanim_stop;
82
XmPushButton motifanim_step;
83
XmScale motifanim_speed;
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
!-------------------------------------------------------
94
motifanim_bar : XmMenuBar {
96
XmNmenuHelpWidget = XmCascadeButton help_entry;
99
XmCascadeButton file_menu_entry;
100
XmCascadeButton help_entry;
105
file_menu_entry : XmCascadeButton {
107
XmNlabelString = compound_string('File') ;
108
XmNmnemonic = keysym("F");
111
XmPulldownMenu file_menu;
115
help_entry : XmCascadeButton {
117
XmNlabelString = compound_string('Help') ;
118
XmNmnemonic = keysym("H");
121
XmPulldownMenu help_menu;
126
file_menu : XmPulldownMenu {
128
XmPushButton motifanim_quit;
132
help_menu : XmPulldownMenu {
134
XmPushButton motifanim_help;
139
motifanim_quit : XmPushButton {
141
XmNlabelString = compound_string('Quit');
142
XmNmnemonic = keysym("Q");
145
XmNactivateCallback = procedure p_motifanim_exit();
149
motifanim_help : XmPushButton {
151
XmNlabelString = compound_string('Overview');
152
XmNmnemonic = keysym("O");
155
XmNactivateCallback = procedure p_motifanim_help();
160
motifanim_start : XmPushButton {
162
XmNlabelString = compound_string('Start');
163
XmNbottomAttachment = XmATTACH_FORM ;
164
XmNleftAttachment = XmATTACH_FORM ;
167
XmNactivateCallback = procedure p_motifanim_start();
172
motifanim_stop : XmPushButton {
174
XmNlabelString = compound_string('Stop');
175
XmNbottomAttachment = XmATTACH_FORM ;
176
XmNleftAttachment = XmATTACH_WIDGET ;
177
XmNleftWidget = XmPushButton motifanim_start ;
180
XmNactivateCallback = procedure p_motifanim_stop();
185
motifanim_step : XmPushButton {
187
XmNlabelString = compound_string('One step');
188
XmNbottomAttachment = XmATTACH_FORM ;
189
XmNleftAttachment = XmATTACH_WIDGET ;
190
XmNleftWidget = XmPushButton motifanim_stop ;
193
XmNactivateCallback = procedure p_motifanim_step();
198
motifanim_speed : XmScale {
200
XmNtitleString = compound_string('Speed');
201
XmNorientation = XmHORIZONTAL ;
202
XmNbottomAttachment = XmATTACH_FORM ;
203
XmNleftAttachment = XmATTACH_WIDGET ;
204
XmNleftWidget = XmPushButton motifanim_step ;
207
MrmNcreateCallback = procedure p_motifanim_speed(0);
208
XmNdragCallback = procedure p_motifanim_speed(1);
209
XmNvalueChangedCallback = procedure p_motifanim_speed(2);
215
!-------------------------------------------------------
216
! Now that the bottom pushbuttons are fixed,
217
! we attach the Separator to the first one in the line
218
!-------------------------------------------------------
222
motifanim_sep : XmSeparator {
224
XmNrightAttachment = XmATTACH_FORM ;
225
XmNleftAttachment = XmATTACH_FORM ;
226
XmNbottomAttachment = XmATTACH_WIDGET ;
227
XmNbottomWidget = motifanim_speed ;
233
!-------------------------------------------------------
234
! This one is full rubber
235
!-------------------------------------------------------
238
motifanim_view : XmScrolledWindow {
240
XmNrightAttachment = XmATTACH_FORM ;
241
XmNtopAttachment = XmATTACH_FORM ;
242
XmNbottomAttachment = XmATTACH_WIDGET ;
243
XmNbottomWidget = XmSeparator motifanim_sep ;
244
XmNleftAttachment = XmATTACH_FORM ;
245
XmNscrollingPolicy = XmAUTOMATIC ;
248
XmDrawingArea view_anim ;
253
anim_width : imported integer ;
254
anim_height : imported integer ;
255
anim_backcolor : imported color ;
258
view_anim : XmDrawingArea {
260
XmNwidth = anim_width ;
261
XmNheight = anim_height ;
262
XmNbackground = anim_backcolor ;
265
MrmNcreateCallback = procedure p_motifanim_draw(0);
266
XmNexposeCallback = procedure p_motifanim_draw(1);