# $XConsortium: Menu1.scr /main/8 1996/07/26 16:46:57 jakku $ # # @OPENGROUP_COPYRIGHT@ # COPYRIGHT NOTICE # Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc. # Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group # ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for # the full copyright text. # # This software is subject to an open license. It may only be # used on, with or for operating systems which are themselves open # source systems. You must contact The Open Group for a license # allowing distribution and sublicensing of this software on, with, # or for operating systems which are not Open Source programs. # # See http://www.opengroup.org/openmotif/license for full # details of the license agreement. Any use, reproduction, or # distribution of the program constitutes recipient's acceptance of # this agreement. # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS # PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY # WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY # OR FITNESS FOR A PARTICULAR PURPOSE # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT # NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE # EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGES. # # # 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 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 MenuBar1 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 MenuBtn3 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 Menu3CAALabel ClickMB Btn1 # Remove the torn off menu off the display by selecting Close in the # window menu. LocatePointer MenuBtn3 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 K1 CompareVisual MenuBar1 # 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 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 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 # This panel tests CUA Menu Enhancements for Pulldown Menus. # Press MB1 on MenuBtn1. The Pulldown Menu should appear. Now # press again MB1 on MenuBtn1. The Pulldown Menu should have # now disappeared, and not been re-posted. LocatePointer MenuBtn1 ClickMB Btn1 CompareVisual Shell1 LocatePointer MenuBtn1 ClickMB Btn1 CompareVisual Shell1 Exit