# $XConsortium: Menu1a.scr /main/4 1995/07/17 20:25:46 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 menu bar containing three
# cascade buttons, labeled "MenuBtn1", "MenuBtn2" and "MenuBtn3".
# Each of these buttons will have one character in its label underlined.
CompareVisual Shell1
Continue
# Give focus to the client window.
WindowFocus Shell1
# Press and hold KAlt, then press the '1' key. The
# pulldown menu "Menu1" will appear. The button "pushbutton1"
# will appear raised.
LocatePointer MenuBtn1
ClickKey <Alt> K1
CompareVisual pulldown1
# Use the down and up arrow keys to move between the three
# buttons in "Menu1"
ClickKey KDown
ClickKey KDown
ClickKey KUp
ClickKey KUp
# Press the 't' key. The pulldown menu will disappear.
ClickKey Kt
# Click MB1 on "MenuBtn1". The same pulldown menu will appear,
# but there will be a filled square to the left of "toggle1".
LocatePointer MenuBtn1
ClickMB Btn1
CompareVisual Shell1
# Press the 't' key. The pulldown menu will disappear.
ClickKey Kt
Continue
# Test for PIR 3502
# Post Menu1 by clicking MB1 in MenuBtn1. Now click MB1 in the tear off
# button of Menu1. The menu should tear off.
LocatePointer MenuBtn1
ClickMB Btn1
LocatePointer pulldown1 RTearOffButton
ClickMB Btn1
CompareVisual pulldown1
# Press MB1 on MenuBtn1 to activate pulldown menu Menu1. Select pushbutton1
# by releasing MB1 over pushbutton1.
LocatePointer MenuBtn1
PressMB Btn1
LocatePointer pushbutton1
ReleaseMB Btn1
# The torn off menu should retain it's bottom edge.
# Unpost the torn off menu.
CompareVisual pulldown1
LocatePointer pulldown1
ClickKey KCancel
Continue
# Test for PIR 3510
# Post Menu3 by clicking MB1 in MenuBtn3. Now click MB1 in the tear off
# button of Menu3. The menu should tear off.
LocatePointer MenuBtn3
ClickMB Btn1
LocatePointer pulldown3 RTearOffButton
ClickMB Btn1
CompareVisual pulldown3
# Select pushbutton3 in the torn off menu Menu3 by clicking MB1 over
# pushbutton3. No warning should appear in the xterm window.
LocatePointer pushbutton3
ClickMB Btn1
# Unpost the torn off menu.
ClickKey KCancel
Continue
# Test for PIR 3513
# Select MB1 in MenuBtn1 to post Menu1. Select MB1 on cascade1 to post
# the cascade menu. Move the pointer over label "Menu1". Press MB1.
# The Press operation should not dismiss the menu.
LocatePointer MenuBtn1
ClickMB Btn1
LocatePointer cascade1
ClickMB Btn1
LocatePointer Menu1
PressMB Btn1
CompareVisual pulldown1
ReleaseMB Btn1
Continue
# Test for PIR 3515
# Select MB1 in MenuBtn1 to post Menu1. Select MB1 on Menu1's tear off
# button. The menu should tear off.
LocatePointer MenuBtn1
ClickMB Btn1
LocatePointer pulldown1 RTearOffButton
ClickMB Btn1
# Select MB1 on cascade1 to post
# the cascade menu. Select MB1 on the Menu1A's tear off button. The
# cascade menu should tear off.
LocatePointer cascade1
ClickMB Btn1
LocatePointer PullDown1A RTearOffButton
ClickMB Btn1
CompareVisual PullDown1A
# Select MB1 on pushbutton1A. Note that it gets highlighted.
LocatePointer pushbutton1A
ClickMB Btn1
CompareVisual PullDown1A
# Select MB1 on pushbutton1C. Highlight should move from pushbutton1A
# to pushbutton1C.
LocatePointer pushbutton1C
ClickMB Btn1
CompareVisual PullDown1A
# Unpost the torn off menus by closing them via the window menu.
LocatePointer PullDown1A
ClickKey KCancel
LocatePointer pulldown1
ClickKey KCancel
Continue
# Test for PIR 3522
# Press MB1 on MenuBtn3 to bring up Menu3. Drag the pointer over the
# tear off button. Release MB1 on the tear off button. The menu should
# tear off.
LocatePointer MenuBtn3
PressMB Btn1
LocatePointer pulldown3 RTearOffButton
ReleaseMB Btn1
CompareVisual pulldown3
# Select MB1 on cascade3 to bring up Menu3A. Select MB1 on Cascade3A to
# bring up Menu3AA. Select MB1 on pushbutton3AA.
LocatePointer cascade3
ClickMB Btn1
LocatePointer cascade3A
ClickMB Btn1
LocatePointer pushbutton3AA
ClickMB Btn1
# Move the pointer back into Menu3. The pointer should have the menu pointer
# not the background pointer.
LocatePointer Menu3
CompareVisual pulldown3
# Post Menu3Ca by selecting MB1 on Casade3C after selecting Cascade3.
# Select MB1 on Cascade3Ca and
# another menu will appear. Select MB1 on Menu3CAA.
LocatePointer cascade3
ClickMB Btn1
LocatePointer cascade3C
ClickMB Btn1
LocatePointer cascade3CA
ClickMB Btn1
LocatePointer Menu3CAA
ClickMB Btn1
# Remove the torn off menu off the display by selecting Close in the
# window menu.
LocatePointer Menu3
ClickKey KCancel
Continue
# Give focus to the client window.
WindowFocus Shell1
# Press and hold KAlt, then press the '1' key. "Menu1
# will appear with NO filled box to the left of "toggle1".
LocatePointer MenuBtn1
ClickKey <Alt> K1
CompareVisual Menu1
# Press the 'c' key. "Menu1A" will appear.
ClickKey Kc
# Press the return key. The pulldown menus will disappear.
ClickKey KReturn
# Press and hold KAlt, then press the '1' key. Menu1
# will appear.
WindowFocus Shell1
LocatePointer MenuBtn1
ClickKey <Alt> K1
# Press the 'c' key. "Menu1A" will appear.
ClickKey Kc
# Press the 'a' key. The pulldown menus will disappear.
ClickKey Ka
Continue
# Give focus to the client window.
WindowFocus Shell1
# Click MB1 on "MenuBtn1". The pulldown menu "Menu1" will appear
LocatePointer MenuBtn1
ClickMB Btn1
# Use the right and left arrow keys to move between the menus
# "Menu1", "Menu2" and "Menu3".
ClickKey KRight
ClickKey KRight
ClickKey KLeft
ClickKey KLeft
# Click MB1 on "MenuBtn2". The pulldown menu "Menu2" will appear.
LocatePointer MenuBtn2
ClickMB Btn1
# Press the 'c' key. The pulldown menu "Menu2A" will appear.
ClickKey Kc
# Press the 'b' key. Both pulldown menus will disappear.
ClickKey Kb
Continue
# Give focus to the client window.
WindowFocus Shell1
# Press and hold KAlt, then press the '2' key. The menu
# "Menu2" will appear.
LocatePointer MenuBtn2
ClickKey <Alt> K2
# Press KRight three times. The menus "Menu3",
# "Menu3A" and "Menu3AA" will appear.
ClickKey KRight
ClickKey KRight
ClickKey KRight
CompareVisual Shell1
# Press KLeft. The pmenu "Menu3AA" will disappear.
ClickKey KLeft
# Press KDown twice. The button "cascade3C" will
# appear raised.
ClickKey KDown
ClickKey KDown
# Press KRight. The menu "Menu3CA" will appear.
ClickKey KRight
# Press the return key. The menu "Menu3CAA" will appear.
ClickKey KReturn
CompareVisual Shell1
# Press KCancel. The menu "Menu3CAA" will disappear.
ClickKey KCancel
# Press KCancel three more times. All of the menus will
# disappear.
ClickKey KCancel
ClickKey KCancel
ClickKey KCancel
CompareVisual Shell1
Continue
# A new entry has been added to the menu bar. Press MB1 on
# MenuBtn6. A pulldown menu is created and managed on the
# fly from the cascading callback. The menu should appear as
# normal.
LocatePointer MenuBtn6
PressMB Btn1
CompareVisual pulldown6
ReleaseMB Btn1
Continue
# A new entry has been added to the menu bar. Press MB1 on
# MenuBtn7. The release of the mouse button causes an activate
# callback. The activate callback creates a pulldown menu. Post
# MenuBtn7 a second time to see the new pulldown menu.
LocatePointer MenuBtn7
ClickMB Btn1
PressMB Btn1
CompareVisual pulldown7
ReleaseMB Btn1
ClickKey KEscape
Continue
# An 8-bit mnemonic has been added to a new pulldown menu
# off of the menu bar. No core dumps or errors should have
# occurred.
Continue
# An illegal mnemonic has been added to a new pulldown menu
# off of the menu bar. No core dumps or errors should have
# occurred. All widgets should be destroyed.
Continue
Exit