Blob Blame History Raw
# $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