File: Menu3.scr

package info (click to toggle)
motif 2.3.4-13
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 81,160 kB
  • ctags: 51,769
  • sloc: ansic: 596,938; cpp: 3,951; yacc: 2,854; makefile: 2,070; csh: 1,199; sh: 1,070; lex: 455
file content (304 lines) | stat: -rw-r--r-- 7,054 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# $XConsortium: Menu3.scr /main/6 1995/07/17 20:25:58 drk $
# 
# Motif
#
# Copyright (c) 1987-2012, The Open Group. All rights reserved.
#
# These libraries and programs are free software; you can
# redistribute them and/or modify them under the terms of the GNU
# Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# These libraries and programs are distributed in the hope that
# they will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with these librararies and programs; if not, write
# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301 USA
# 
# 
# HISTORY
# 


# A client window will appear with a menubar widget and a row
#  column widget containing six pushbuttons. 
# Give focus to the client window. 

WindowFocus Shell1

# Click and hold down MB1 on "pdbtn2" in the menubar.  A pulldown
#  widget with six option buttons will appear.  Slide the pointer
#  down to any of these options and release MB1. 

LocatePointer pdbtn2
PressMB Btn1
LocatePointer sailboat
ReleaseMB Btn1

# Again, click and hold down MB1 on "pdbtn2".  Note that the
#  cursor has changed to a pixmap corresponding to the option button
#  you selected.  A filled box will appear next to the option button
#  you selected. 
# Repeat the above to view all of the different cursor pixmaps. 

LocatePointer pdbtn2
PressMB Btn1
LocatePointer heart
ReleaseMB Btn1

LocatePointer pdbtn2
PressMB Btn1
LocatePointer man
ReleaseMB Btn1

LocatePointer pdbtn2
PressMB Btn1
LocatePointer pirate
ReleaseMB Btn1

LocatePointer pdbtn2
PressMB Btn1
LocatePointer shuttle
ReleaseMB Btn1

LocatePointer pdbtn2
PressMB Btn1
LocatePointer arrow
ReleaseMB Btn1

Continue

# Give focus to the client window. 

WindowFocus Shell1

# Click and hold down MB1 on "pdbtn1" in the menubar. A pulldown
#  menu with three option buttons and two cascade buttons will
#  appear. 

LocatePointer pdbtn1
PressMB Btn1 
CompareVisual submenu1

# Drag the pointer to "option3a" a message should be printed in the term
#  window that the armCallback is called. 

LocatePointer option3a

# Move past the "option3a", a message should be printed in the term window
#  window that the disarmCallback is called. 

LocatePointer more

# Unpost the Menu, and then repost via F10 and the down arrow key. 

ReleaseMB Btn1
ClickKey KCancel
ClickKey KCancel

WindowFocus Shell1
LocatePointer menubar
ClickKey KMenuBar
ClickKey KDown

# Move with the arrow keys until you are over "option3a", 
#  again the armCallback message should be printed in the term window. 
# Move off of "option3a", a disarm message should be printed in the term
#  window. 

ClickKey KDown
ClickKey KDown
ClickKey KDown
ClickKey KCancel

# Try the same steps again, this time posting menu via F10 and the
#   down arrow key and then use MB1 to click on "option3a". 

WindowFocus Shell1
LocatePointer menubar
ClickKey KMenuBar
ClickKey KDown
LocatePointer option3a
ClickMB Btn1
LocatePointer Shell1 Off

Continue

# Give focus to the client window. 

WindowFocus Shell1

# Click and hold down MB1 on "pdbtn1" in the menubar. A pulldown
#  menu with three option buttons and two cascade buttons will
#  appear. 

LocatePointer pdbtn1
PressMB Btn1 

# Slide the pointer down to the cascade button labeled "more".
#  Another pulldown menu with three option buttons will appear. 

LocatePointer more
CompareVisual Shell1

# Slide the pointer down to the cascade button labeled "more2".

LocatePointer more2

#  A pulldown menu with two option buttons and a button with a
#  pixmap label (a face) will appear. 

CompareVisual Shell1

# Slide the pointer up above "pdbtn1" and release MB1.  The
#  pulldown menu will disappear. 

LocatePointer menubar Up
ReleaseMB Btn1
ClickKey KCancel

# Select "button1" with MB1.  The button will be set insensitive. 

LocatePointer button1
ClickMB Btn1
CompareVisual button1

# Click and hold down MB1 on "pdbtn1" in the menubar.  Note that
#  the button labeled "more2" no longer has an arrow next to its
#  label, nor a pulldown menu associated with it. 

LocatePointer pdbtn1
PressMB Btn1
CompareVisual Shell1
ReleaseMB Btn1
ClickKey KCancel
Continue

# Give focus to the client window. 

WindowFocus Shell1

# Select "button2" with MB1.  The button will be set insensitive. 

LocatePointer button2
ClickMB Btn1
CompareVisual button2

# Click and hold down MB1 on "pdbtn1" in the menubar.  Note that
#  there is no longer an option button labeled "option1a" in the
#  pulldown menu. 

LocatePointer pdbtn1
PressMB Btn1
CompareVisual submenu1
ReleaseMB Btn1
ClickKey KCancel

# Select the "help" button in the menubar.  A message indicating
#  that help was activated will be printed to the xterm window. 

LocatePointer help
ClickMB Btn1

# Select "button3" with MB1.  The button will be set insensitive.
#  The "help" button in the menubar will disappear. 

LocatePointer button3
ClickMB Btn1
CompareVisual button3
CompareVisual menubar
Continue

# Make sure the focus is in the Row Column portion of the window. 

WindowFocus Shell1

# Type the Ctrl g key.  Nothing will happen. 
# Type the Ctrl h key.  A popup menu with three option buttons will
#  appear. 

ClickKey <Ctrl> Kg
ClickKey <Ctrl> Kh
CompareVisual popupmenu

# Move the pointer into the popup menu and click MB3.  The popup
#  menu will disappear.  A message indicating which option button was
#  selected will be printed to the xterm window. 

LocatePointer option2e
ClickMB Btn3

# Select "button4" with MB1. 

LocatePointer button4
ClickMB Btn1

# Type the Ctrl g key.  The popup menu will appear.  Click MB3 to get
# rid of the popup menu. 

ClickKey <Ctrl> Kg
LocatePointer option3e
ClickMB Btn3

# Type the Ctrl h key.  Nothing will happen. 

ClickKey <Ctrl> Kh

Continue

# Give focus to the client window. 

WindowFocus Shell1

# Click and hold down MB1 on "pdbtn3" in the menubar.  Nothing
#  will happen. 

LocatePointer pdbtn3
PressMB Btn1 
CompareVisual menubar
ReleaseMB Btn1

# Select "button5" with MB1.  The button will be set insensitive. 

LocatePointer button5
ClickMB Btn1
CompareVisual button5

# Click and hold down MB1 on "pdbtn1" in the menubar.  Nothing
#  will happen. 

LocatePointer pdbtn1
PressMB Btn1
CompareVisual Shell1
ReleaseMB Btn1

# Click and hold down MB1 on "pdbtn3" in the menubar.  The
#  pulldown menu that was associated with "pdbtn1" will appear. 

LocatePointer pdbtn3
PressMB Btn1
CompareVisual submenu1
ReleaseMB Btn1
ClickKey KCancel

# Select "button6" with MB1.  Click and hold down MB1 on
#  "pdbtn2" in the menubar.  The option button "heart" will be
#  set insensitive. 

LocatePointer button6
ClickMB Btn1
LocatePointer pdbtn2
PressMB Btn1
CompareVisual submenu5
ReleaseMB Btn1
ClickKey KCancel

Continue

Exit