# $XConsortium: Menu6.scr /main/7 1995/07/17 20:26:16 drk $ # # @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 # # Press F10. The "File" menu button is armed. # Press KUp. There is no change. WindowFocus Shell1 LocatePointer MenuBar ClickKey KMenuBar ClickKey KUp CompareVisual Shell1 # Press KRight. The "Edit" menu button is armed. # Press KUp. There is no change. ClickKey KRight CompareVisual mainWindow ClickKey KUp CompareVisual mainWindow # Press KDown. A message is printed stating the # "Edit" button was activated. ClickKey KDown # Press F10 and then KDown. A message is printed # stating the File button was activated. ClickKey KMenuBar ClickKey KDown ClickKey KCancel Continue # Click MB1 on the "Arrange" menu item. # A 2-dimensional menu with a cascade button is posted. LocatePointer CascadeBtn3 ClickMB Btn1 CompareVisual ArrangeMenu # Press KLeft. The "Arrange" menu is unposted. # Press KRight. The "Arrange" menu is posted. ClickKey KLeft CompareVisual MenuBar ClickKey KRight CompareVisual ArrangeMenu # Press KUp then KLeft. The CascadeButton is armed. ClickKey KUp ClickKey KLeft CompareVisual ArrangeMenu # Press KReturn. The submenu is posted. ClickKey KReturn CompareVisual submenu4 # Press KLeft. The submenu is unposted. ClickKey KLeft CompareVisual ArrangeMenu # Press KRight to repost, then Hit ESC to unpost. # (HINT: try this on an R3 server) ClickKey KRight ClickKey KCancel # Press KDown, KRight. The "Layout" Menu is posted which is a # horizontal menu. ClickKey KDown ClickKey KRight CompareVisual LayoutMenu # Press KUp. The "Two Ovals" menu item is armed. # Press KEscape. The menu is unposted. ClickKey KUp CompareVisual LayoutMenu ClickKey KCancel CompareVisual mainWindow Continue # /* test for PIRS 1098 */ # This test confirms that the Label Widget/Gadgets subclasses correctly # resize narrower after the XmNacceleratorText resource is changed to NULL. # You should see a small window with several menus in it. CompareVisual mainWindow # Pop up each menu; note that the selectable items have acceleratorText # displayed. # For each item, select the item; doing so sets acceleratorText to NULL. # Confirm that the item has shrunk in horizontal size appropriately by # popping up the menu again. LocatePointer Menu1 PressMB Btn1 CompareVisual pulldown1 LocatePointer PushButton ReleaseMB Btn1 LocatePointer Menu1 PressMB Btn1 CompareVisual pulldown1 ReleaseMB Btn1 LocatePointer Menu2 PressMB Btn1 CompareVisual pulldown2 LocatePointer PushButtonGadget ReleaseMB Btn1 LocatePointer Menu2 PressMB Btn1 CompareVisual pulldown2 ReleaseMB Btn1 LocatePointer Menu3 PressMB Btn1 CompareVisual pulldown3 LocatePointer ToggleButton ReleaseMB Btn1 LocatePointer Menu3 PressMB Btn1 CompareVisual pulldown3 ReleaseMB Btn1 LocatePointer Menu4 PressMB Btn1 CompareVisual pulldown4 LocatePointer ToggleButtonGadget ReleaseMB Btn1 LocatePointer Menu4 PressMB Btn1 CompareVisual pulldown4 ReleaseMB Btn1 Continue # For each item, select the item again; doing so resets the acceleratorText # to a non-NULL string larger than the original. # Confirm that some value for acceleratorText has reappeared and that the # widget has grown in horizontal size appropriately. LocatePointer Menu1 PressMB Btn1 CompareVisual pulldown1 LocatePointer PushButton ReleaseMB Btn1 LocatePointer Menu1 PressMB Btn1 CompareVisual pulldown1 ReleaseMB Btn1 LocatePointer Menu2 PressMB Btn1 CompareVisual pulldown2 LocatePointer PushButtonGadget ReleaseMB Btn1 LocatePointer Menu2 PressMB Btn1 CompareVisual pulldown2 ReleaseMB Btn1 LocatePointer Menu3 PressMB Btn1 CompareVisual pulldown3 LocatePointer ToggleButton ReleaseMB Btn1 LocatePointer Menu3 PressMB Btn1 CompareVisual pulldown3 ReleaseMB Btn1 LocatePointer Menu4 PressMB Btn1 CompareVisual pulldown4 LocatePointer ToggleButtonGadget ReleaseMB Btn1 LocatePointer Menu4 PressMB Btn1 CompareVisual pulldown4 ReleaseMB Btn1 Continue Exit # Bring up the Arrange menu. It is a 2-dimensional menu with a cascade # button. Use the arrow keys to move down to the cascade button and press # return. The submenu should pop up. Use the left arrow key to unpost the # submenu. Post it again. Hit ESC to unpost the last menu. # (HINT: try this on an R3 server!) Use the up-arrow key to move off # the cascade button. LocatePointer CascadeBtn3 ClickMB Btn1 ClickKey KDown ClickKey KDown ClickKey KDown ClickKey KReturn ClickKey KLeft ClickKey KReturn ClickKey KCancel ClickKey KUp # Use the right arrow key and the Layout Menu should popup. This is a # horizontal menu which has the buttons very close together. Left and # right arrow keys should move you between the buttons in this menu. # Up and down arrows should move you to the Arrange Menu. ClickKey KRight ClickKey KRight ClickKey KRight ClickKey KRight ClickKey KRight ClickKey KRight ClickKey KRight ClickKey KRight ClickKey KRight ClickKey KLeft ClickKey KLeft ClickKey KLeft ClickKey KUp # Unpost all menus. Btn1-click on the Arrange cascade. Move the pointer over # any other button in the menu other than the cascade button. Press MB1. The # button you are over should get the highlight and the button which had the # highlight previously should lose it. Move the pointer in and out of the menu # with the button pressed down. The highlight should disappear then reappear. PressMB Btn1 LocatePointer MenuBar Up ReleaseMB Btn1 LocatePointer arrangeButton3 PressMB Btn1 LocatePointer arrangeButton3 Off CompareVisual ArrangeMenu LocatePointer arrangeButton3 CompareVisual ArrangeMenu LocatePointer arrangeButton3 Off ReleaseMB Btn1 Continue # /* test for PIRS 1098 */ # This test confirms that the Label Widget/Gadgets subclasses correctly # resize narrower after the XmNacceleratorText resource is changed to NULL. # You should see a small window with several menus in it. # Pop up each menu; note that the selectable items have acceleratorText # displayed. # For each item, select the item; doing so sets acceleratorText to NULL. # Confirm that the item has shrunk in horizontal size appropriately by popping # up the menu again. CompareVisual Shell1 # Pop up each menu; note that the selectable items have acceleratorText # displayed. # For each item, select the item; doing so sets acceleratorText to NULL. # Confirm that the item has shrunk in horizontal size appropriately by # popping up the menu again. LocatePointer Menu1 PressMB Btn1 CompareVisual pulldown1 LocatePointer PushButton ReleaseMB Btn1 LocatePointer Menu1 PressMB Btn1 CompareVisual pulldown1 ReleaseMB Btn1 LocatePointer Menu2 PressMB Btn1 CompareVisual pulldown2 LocatePointer PushButtonGadget ReleaseMB Btn1 LocatePointer Menu2 PressMB Btn1 CompareVisual pulldown2 ReleaseMB Btn1 LocatePointer Menu3 PressMB Btn1 CompareVisual pulldown3 LocatePointer ToggleButton ReleaseMB Btn1 LocatePointer Menu3 PressMB Btn1 CompareVisual pulldown3 ReleaseMB Btn1 LocatePointer Menu4 PressMB Btn1 CompareVisual pulldown4 LocatePointer ToggleButtonGadget ReleaseMB Btn1 LocatePointer Menu4 PressMB Btn1 CompareVisual pulldown4 ReleaseMB Btn1 Continue # For each item, select the item again; doing so resets the acceleratorText # to a non-NULL string larger than the original. # Confirm that some value for acceleratorText has reappeared and that the # widget has grown in horizontal size appropriately. LocatePointer Menu1 PressMB Btn1 CompareVisual pulldown1 LocatePointer PushButton ReleaseMB Btn1 LocatePointer Menu1 PressMB Btn1 CompareVisual pulldown1 ReleaseMB Btn1 LocatePointer Menu2 PressMB Btn1 CompareVisual pulldown2 LocatePointer PushButtonGadget ReleaseMB Btn1 LocatePointer Menu2 PressMB Btn1 CompareVisual pulldown2 ReleaseMB Btn1 LocatePointer Menu3 PressMB Btn1 CompareVisual pulldown3 LocatePointer ToggleButton ReleaseMB Btn1 LocatePointer Menu3 PressMB Btn1 CompareVisual pulldown3 ReleaseMB Btn1 LocatePointer Menu4 PressMB Btn1 CompareVisual pulldown4 LocatePointer ToggleButtonGadget ReleaseMB Btn1 LocatePointer Menu4 PressMB Btn1 CompareVisual pulldown4 ReleaseMB Btn1 Continue Exit