Blob Blame History Raw
# $XConsortium: PopupMenu7.scr /main/4 1995/07/17 20:28:11 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

# You should see a DrawingArea with a TextField child.

Continue

# Testing XmNpopupEnabled resource set to XmPOPUP_AUTOMATIC.

# Press BSelect in the TextField.  It will now have focus.

# Press the KMenu button.

# You should see a Popup Menu in the upper Left hand corner
#   of the DrawingArea.

# Press KMenu again and the Popup should disappear.

# Now press BMenu (usually mouse button 3.)

# Nothing should happen.

# Finally move the pointer to the DrawingArea area and press
#   BMenu.

# The Popup Menu should show up again.

# Press BMenu again in the DrawingArea area to make the Popup
#   disappear.


WindowFocus Shell1
LocatePointer text1
ClickMB Btn1

ClickKey KMenu
CompareVisual drawarea

ClickKey KMenu

CompareVisual drawarea

ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3

CompareVisual drawarea

ClickMB Btn3
CompareVisual drawarea


Continue

# Testing XmNpopupEnabled resource set to XmPOPUP_AUTOMATIC_RECURSIVE.

# BSelect the TextField again.

# Now use the BMenu button.

# The Popup Menu should appear.

# Press BMenu again to make it disappear.

WindowFocus Shell1
LocatePointer text1
ClickMB Btn1

ClickMB Btn3

CompareVisual drawarea

ClickMB Btn3

Continue

# Testing XmNpopupEnabled resource set to XmPOPUP_DISABLED.

# Press BMenu in the DrawingArea area.  Nothing should happen.

# Press KMenu while the cursor is still in the DrawingArea area.
#   Again nothing should happen.

# Press BMenu in the TextField area.  Nothing should happen.

# Lastly, press KMenu while in the TextField area.  Again,
#   nothing should happen.

WindowFocus Shell1
LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

ClickKey KMenu
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual drawarea

ClickKey KMenu
CompareVisual drawarea

Continue

# Testing XmNpopupEnabled resource set to XmPOPUP_KEYBOARD.

# Click BMenu in the DrawingArea.  Nothing should happen.

# Press KMenu.  You should see the Popup.  Press KMenu again.

# Press BMenu in the TextField.  Nothing should happen.

# Press KMenu in the TextField.  You should see the Popup.

WindowFocus Shell1
LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

ClickKey KMenu
CompareVisual drawarea
ClickKey KMenu

LocatePointer text1
ClickMB Btn3
CompareVisual drawarea

ClickKey KMenu
CompareVisual drawarea
ClickKey KMenu

Continue

# This set of instructions exercizes the XmNpopupHandlerCallback
#   resource while XmNpopupEnabled resource set to XmPOPUP_AUTOMATIC.

# BSelect the TextField.

# Now press KMenu.  You should see a message printed to stdout.

# Press BMenu.  You should see more messages printed to stdout.

# Try the same thing on the DrawArea.

WindowFocus Shell1
LocatePointer drawarea
ClickMB Btn3
ClickMB Btn3

ClickKey KMenu
ClickKey KMenu

LocatePointer text1
ClickMB Btn3
ClickMB Btn3

ClickKey KMenu
ClickKey KMenu

Continue

# This set of instructions exercizes the XmNpopupHandlerCallback
#   resource while XmNpopupEnabled resource set to
#   XmPOPUP_AUTOMATIC_RECURSIVE.

# Again press KMenu, BMenu over the DrawArea and TextField.

# You will see messages being printed out.

WindowFocus Shell1
LocatePointer drawarea
ClickMB Btn3
ClickMB Btn3

ClickKey KMenu
ClickKey KMenu

LocatePointer text1
ClickMB Btn3
ClickMB Btn3

ClickKey KMenu
ClickKey KMenu

Continue

# This set of instructions exercizes the XmNpopupHandlerCallback
#   resource while XmNpopupEnabled resource set to XmPOPUP_DISABLED.

# Again press KMenu, BMenu over the DrawArea and TextField.

# You will see messages being printed out.

WindowFocus Shell1
LocatePointer drawarea
ClickMB Btn3

ClickKey KMenu

LocatePointer text1
ClickMB Btn3

ClickKey KMenu

Continue

# This set of instructions exercizes the XmNpopupHandlerCallback
#   resource while XmNpopupEnabled resource set to XmPOPUP_KEYBOARD.

# Again press KMenu, BMenu over the DrawArea and TextField.

# You will see messages being printed out.

WindowFocus Shell1
LocatePointer drawarea
ClickMB Btn3

ClickKey KMenu
ClickKey KMenu

LocatePointer text1
ClickMB Btn3

ClickKey KMenu
ClickKey KMenu

Continue

# The following instruction panels test CUA menu enhancements. 
#   XmNpopupEnabled resource set to POPUP_AUTOMATIC.

# Click BMenu over the Drawing Area. You should see the Popup. A
#   message will appear in stdout "DrawArea Posting Popup."

# Now click BMenu over the TextField. A different Popup should be
#   visible. The Drawing Area's Popup should have disappeared. The
#   message in stdout is "TextField Posting Popup."

# Now click BMenu over the Drawing Area again. You should see the
#   first Popup and the Text Field's popup should have disappeared.
#   The Drawing Area message will again be sent to stdout. 

# Click BMenu again over the Drawing Area. No Popup should be 
#   visible. The message in stdout will say "DrawArea Unposting Popup."

# Click BMenu over the Text Field. You should see its Popup.
#   Then, click BMenu again. No Popup should be visible. The posting
#   and unposting messages for Text Field appear in stdout.

# Click BMenu over the Drawing Area. Then move over to the root
#   window and click BMenu. No Popup should be visible. Only the
#   Drawing Area posting message should appear in stdout.

# Click BMenu over the Drawing Area. The Drawing Area posting
#   message should appear in stdout. Move the pointer on top of
#   the Popup menu. Click BMenu. The Popup will disappear, but no
#   message will be sent to stdout.

# Click KMenu over the Drawing Area. The Text Field posting
#   message should appear in stdout. Move the pointer on top of
#   the Drawing Area. Click KMenu again. The Popup will disappear,
#   and an unposting message will appear in stdout.

# Click KMenu over the Drawing Area. The Text Field posting
#   message should appear in stdout. Move the pointer to the root
#   window. Click KMenu again. The Popup will disappear, but
#   no message will be sent to stdout.

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual text1
ClickMB Btn3
CompareVisual text1

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
LocatePointer drawarea Off
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
LocatePointer popup1
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickKey KMenu
CompareVisual drawarea
LocatePointer drawarea
ClickKey KMenu
CompareVisual drawarea

LocatePointer drawarea
ClickKey KMenu
LocatePointer drawarea Off
ClickKey KMenu
CompareVisual drawarea
 
Continue

# XmNpopupEnabled is now set to POPUP_AUTOMATIC_RECURSIVE.

# Click BMenu over the Drawing Area. You should see the Popup. A
#   message will appear in stdout "DrawArea Posting Popup."

# Now click BMenu over the TextField. A different Popup should be
#   visible. The Drawing Area's Popup should have disappeared. The
#   message in stdout is "TextField Posting Popup."

# Now click BMenu over the Drawing Area again. You should see the
#   first Popup and the Text Field's popup should have disappeared. 
#   The Drawing Area message will again be sent to stdout. 

# Click BMenu again over the Drawing Area. No Popup should be 
#   visible. The message in stdout will say "DrawArea Unposting Popup."

# Click BMenu over the Text Field. You should see its Popup.
#   Then, click BMenu again. No Popup should be visible. The posting
#   and unposting messages for Text Field appear in stdout.

# Click BMenu over the Drawing Area. Then move over to the root
#   window and click BMenu. No Popup should be visible. Only the
#   Drawing Area posting message should appear in stdout.

# Click BMenu over the Drawing Area. The Drawing Area posting
#   message should appear in stdout. Move the pointer on top of
#   the Popup menu. Click BMenu. The Popup will disappear, but no
#   message will be sent to stdout.

# Click KMenu over the Drawing Area. The Text Field posting
#   message should appear in stdout. Move the pointer on top of
#   the Drawing Area. Click Kmenu again. The Popup will disappear,
#   and an unposting message will appear in stdout.

# Click KMenu over the Drawing Area. The Text Field posting
#   message should appear in stdout. Move the pointer to the root
#   window. Click KMenu again. The Popup will disappear, but
#   no message will be sent to stdout.

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual text1
ClickMB Btn3
CompareVisual text1

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
LocatePointer drawarea Off
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
LocatePointer popup1
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickKey KMenu
CompareVisual drawarea
LocatePointer drawarea
ClickKey KMenu
CompareVisual drawarea

LocatePointer drawarea
ClickKey KMenu
LocatePointer drawarea Off
ClickKey KMenu
CompareVisual drawarea

Continue

# XmNpopupEnabled is now set to POPUP_DISABLED.

# Click BMenu over the Drawing Area. You should see the Drawing
#   Area Popup. 

# Now click again BMenu over the Drawing Area. Now, the Popup
#   will unpost and then repost.

# Click BMenu over the Text Field. You should see the Text
#   Field Popup.

# Now click again BMenu over the Text Field. The Popup will
#   unpost and then repost.

# Repeat steps 2-5 using KMenu instead. No menus should
#   popup in any case.

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual text1

LocatePointer drawarea
ClickKey KMenu
CompareVisual drawarea

LocatePointer drawarea
ClickKey KMenu
CompareVisual drawarea

LocatePointer text1
ClickKey KMenu
CompareVisual drawarea

LocatePointer text1
ClickKey KMenu
CompareVisual text1

Continue

# XmNpopupEnabled is now set to POPUP_KEYBOARD.

# Click BMenu over the Drawing Area. You should see the Drawing
#   Area Popup.

# Now click again BMenu over the Drawing Area. Now, the Popup
#   will unpost and then repost.

# Click BMenu over the Text Field. You should see the Text
#   Field Popup.

# Now click again BMenu over the Text Field. The Popup will
#   unpost and then repost.

# Click KMenu over the Drawing Area. The Text Field Popup will
#   appear. Move the pointer over the Drawing Area and click KMenu
#   again. The Popup will disappear.

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer drawarea
ClickMB Btn3
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual drawarea

LocatePointer text1
ClickMB Btn3
CompareVisual text1

LocatePointer drawarea
ClickKey KMenu
CompareVisual drawarea
LocatePointer drawarea Off
ClickKey KMenu
CompareVisual drawarea

Exit