# $TOG: MenuBar1.scr /main/5 1999/12/10 10:18:33 jff $
# 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 containing a menubar widget with four
# children. "NewMenu" should have the first 'e' underlined. The MenuBar's
# menuAccelerator will be "F9". A Message to this effect will be
# printed in the term window.
CompareVisual Shell1
# Move the pointer into the client window.
LocatePointer menubar
# Click and hold down MB1 on "New Menu". Note that this button
# has no pulldown menu associated with it. Release MB1.
LocatePointer new_menu
PressMB Btn1
CompareVisual menubar
ReleaseMB Btn1
# Click and hold down MB1 on "Menu1". A pulldown menu with four
# pushbutton widgets will appear.
LocatePointer menu1
PressMB Btn1
# Slide the pointer to the pushbutton "Toggle MenuShell" and
# release MB1 (thus selecting "Toggle MenuShell").
LocatePointer toggle_MS
ReleaseMB Btn1
# Select "Toggle RowColumn" in "Menu1" by pressing the key
# combination Ctrl-R indicated to the right of the label.
WindowFocus Shell1
ClickKey <Ctrl> Kr
# Click MB1 on "NewMenu". A pulldown menu with a label widget
# and a separator gadget will appear. Unpost the menu.
LocatePointer new_menu
PressMB Btn1
CompareVisual newrc
ReleaseMB Btn1
ClickKey KCancel
# Press Ctrl-R several times. After each time, verify that the
# pulldown menu appears and then disappears. At no time should
# the pulldown menu post in the top left corner of the display.
WindowFocus Shell1
ClickKey <Ctrl> Kr
LocatePointer new_menu
ClickMB Btn1
CompareVisual menubar
ClickKey KCancel
ClickKey <Ctrl> Kr
LocatePointer new_menu
ClickMB Btn1
CompareVisual newrc
ClickKey KCancel
Continue
# Move the pointer into the client window.
WindowFocus Shell1
# Select "Toggle CascadeButton" in "Menu1" by pressing the key
# combination Ctrl-C indicated to the right of the label.
ClickKey <Ctrl> Kc
# Click MB1 on "New Menu". The pulldown menu now contains a
# pushbutton widget labeled "New CascadeButton". Unpost the menu.
LocatePointer new_menu
ClickMB Btn1
CompareVisual newrc
ClickKey KCancel
# Select "Toggle CascadeButtonGadget" in "Menu1" by pressing the
# key combination Ctrl-G indicated to the right of the label.
WindowFocus Shell1
ClickKey <Ctrl> Kg
# Click MB1 on "New Menu". The pulldown menu now contains a
# pushbutton widget labeled "New CascadeButtonGadget". Unpost
# the menu.
LocatePointer new_menu
ClickMB Btn1
CompareVisual newrc
ClickKey KCancel
# Select "Toggle CascadeButton" in "Menu1" with MB1.
LocatePointer menu1
ClickMB Btn1
LocatePointer toggle_CB
ClickMB Btn1
# Click MB1 on "New Menu". The pulldown menu no longer contains
# a pushbutton widget labeled "New CascadeButton". Unpost the
# menu.
LocatePointer new_menu
ClickMB Btn1
CompareVisual newrc
ClickKey KCancel
Continue
# Move the pointer into the client window.
WindowFocus Shell1
# Select "Toggle MenuShell" in "Menu1" with MB1.
LocatePointer menu1
PressMB Btn1
LocatePointer toggle_MS
ReleaseMB Btn1
# Click and hold down MB1 on "NewMenu". No pulldown menu will
# appear. Release MB1
LocatePointer new_menu
PressMB Btn1
CompareVisual menubar
ReleaseMB Btn1
# Select "Toggle RowColumn" in "Menu1" with MB1.
LocatePointer menu1
PressMB Btn1
LocatePointer toggle_RC
ReleaseMB Btn1
# Click MB1 on "NewMenu". A pulldown menu with a label widget
# and a separator gadget will appear. Unpost the menu.
LocatePointer new_menu
ClickMB Btn1
CompareVisual newrc
ClickKey KCancel
# Select "Toggle RowColumn" in "Menu1" with MB1.
LocatePointer menu1
PressMB Btn1
LocatePointer toggle_RC
ReleaseMB Btn1
# Click and hold down MB1 on "NewMenu". No pulldown menu will
# appear. Release MB1.
LocatePointer new_menu
PressMB Btn1
CompareVisual menubar
ReleaseMB Btn1
Continue
# Move the pointer into the client window.
WindowFocus Shell1
# Click and hold down MB1 in "Menu2". A pulldown menu with three
# children will appear.
LocatePointer menu2
PressMB Btn1
# Slide the pointer down to "More2". An arrow will appear to the
# right of the button label, and a submenu containing three button
# widgets will appear. Release MB1.
LocatePointer more2
CompareVisual submenu2
ReleaseMB Btn1
# Select "Move Submenu" in "Menu2" with MB1.
LocatePointer move_submenu
ClickMB Btn1
# Click and hold down MB1 in "Menu2". Note that there is now an
# arrow to the right of the button "More3", and no arrow next to
# "More2".
LocatePointer menu2
PressMB Btn1
CompareVisual submenu2
# Slide the pointer down to "More3". The submenu that was
# associated with "More2" will appear.
LocatePointer more3
CompareVisual submenu2
# Select "Move Submenu" in "Menu2" with MB1.
LocatePointer move_submenu
ReleaseMB Btn1
# Click and hold down MB1 in "Menu2". Again, the arrow has moved
# from "More3" back to "More2".
LocatePointer menu2
PressMB Btn1
CompareVisual submenu2
# Slide the pointer down to "More2". The submenu will appear.
# Unpost the menu.
LocatePointer more2
ReleaseMB Btn1
ClickKey KCancel
ClickKey KCancel
Continue
# Move the pointer into the client window.
WindowFocus Shell1
# Click and hold down MB1 on "Menu3". A pulldown menu with a
# pushbutton widget and a cascade button widget will appear.
LocatePointer menu3
PressMB Btn1
CompareVisual submenu3
# Slide the pointer down to the cascade button "More". A submenu
# with three children will appear. Unpost the menu.
LocatePointer more
CompareVisual submenu5
ReleaseMB Btn1
ClickKey KCancel
# Select "Unspecified Pixmap" in "Menu3" with MB1.
LocatePointer menu3
PressMB Btn1
LocatePointer unspec_pixmap
ReleaseMB Btn1
# Click and hold down MB1 on "Menu3". Note that, in the pulldown
# menu, there is no longer an arrow next to "More".
LocatePointer menu3
PressMB Btn1
CompareVisual submenu3
# Slide the pointer down to the cascade button "More". A submenu
# with three children will still appear. Unpost the menu.
LocatePointer more
CompareVisual submenu5
ReleaseMB Btn1
ClickKey KCancel
ClickKey KCancel
Continue
WindowFocus Shell1
LocatePointer menu4
PressMB Btn1
LocatePointer toggle_ML
ReleaseMB Btn1
CompareVisual menubar
LocatePointer menu4
PressMB Btn1
LocatePointer toggle_ML
ReleaseMB Btn1
CompareVisual menubar
# The menubar's orientation has been changed to vertical.
# Verify that the pulldown menus appear to the side of the cascade buttons
# which activate them, not below them.
# (This will not be fixed in 1.2, so no work here)
CompareVisual menubar
Continue
Exit