1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
/*
* 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
*/
/*
static char rcsid[] = "$XConsortium: PopupMenu5.dat /main/5 1995/07/13 18:53:17 drk $"
*/
/* Pause 1 */
/* Test for PIR 2968 */
#) This test looks at the uses of XmNwhichButton and XmNmenuPost.
#) A client should appear with two pushbuttons - "Popup with whichButton"
and "Popup with menupost". PopupMenus have been associated with the
first pushButton via XmNwhichButton. Two different popups should appear
when pressing MB1 and MB3.
#) PopupMenus have been associated with the second pushButton via XmNmenuPost.
Two different popups should appear when pressing MB1 and MB3. (Note: The
two popups for the first button should be different from the two popups
for the second button).
#) Verify that MB1 and MB3 presses in both buttons cause popups to be
posted.
C)
/* Pause 2 */
/* Another test for PIRs 2968 and 2972 */
#) Note that no warnings should appear in the term window.
#) The same test occurs; however, XmNmenuPost and XmNwhichButton have been
specified at SetValues time.
#) Verify that MB1 and MB3 presses in both buttons cause popups to be
posted.
C)
/* Pause 3 */
/* Another test for PIR 2972 */
#) Note that no warnings should appear in the term window.
#) A BulletinBoard with a PushButton will appear. An event handler has been
set for ButtonPress events on the PushButton and the BulletinBoard.
A popupMenu has been
created as a child of the BulletinBoard. The event handler will manage
the popupMenu if MB3 has been pressed.
#) Click MB1 in the pushButton. The push button should press in and out.
A message should appear in the term window,
saying that "whichButton = 3, handler called for Button 1".
#) Click MB3 in the pushButton. A message should appear in the term window,
saying that "whichButton = 3, handler called for Button3". A popupMenu
should appear. Use MB3 to pop down the popupMenu.
#) Now click MB1 and MB3 in the bulletinBoard, but not in the pushButton.
Messages should be posted for both button clicks and the popup should
be posted with MB3.
C)
/* Pause 4 */
#) Now whichButton has been set to 3 and there is NO event handler set for
ButtonPress events on the Bulletin Board, just an event handler on the
pushButton. Therefore, the popupMenuhas been created as a child of
the pushButton.
#) Click MB1 in the pushButton. The push button should press in and out.
A message should appear in the term window,
saying that "whichButton = 3, handler called for Button 1".
#) Click MB3 in the pushButton. A message should appear in the term window,
saying that "whichButton = 3, handler called for Button3". A popupMenu
should appear. Use MB3 to pop down the popupMenu.
#) Now click MB1 and MB3 in the bulletinBoard, but not in the pushButton.
No messages should appear in the term window; no effect should happen from
selecting in the bulletinBoard.
C)
/* Pause 5 */
/* Another test for PIR 2972 */
#) Note that no warnings should appear in the term window.
#) MenuPost has been set to "<Btn3>", an event handler has been set on both
the bulletinBoard and the PushButton. The popupMenu has been created
as a child of the bulletinBoard.
#) Click MB1 in the PushButton. The pushButton should go in and out.
A message should appear in the term window, "menuPost = 3, handler
called for Button 1".
#) Click MB3 in the PushButton. The popupMenu should post. A message should
appear in the term window, "menuPost = 3, handler called for Button 3".
Use MB3 to dismiss the popupMenu.
#) The same MB1 and MB3 events should occur when selecting in the
bulletinBoard.
C)
/* Pause 6 */
/* Test for PIR 2967 */
#) MenuPost = Btn3. An event handler has been set on the pushButton only.
The popupMenu has been created as a child of the pushButton.
#) Select MB1 in the pushButton. The pushButton should go in and out. A
message should appear in the term window, "menuPost = 3, handler called
for Button 1".
#) Select MB3 in the pushButton. The popupMenu should appear. A message
should appear in the term window, "menuPost = 3, handler called for Button
3". Use MB3 to dismiss the popupMenu.
#) Selecting MB1 and MB3 should have no effect within the BulletinBoard.
C)
/* Pause 7 */
/* PIR 3432 */
#) MenuPost = Btn3. An event handler has been set on the bulletinBoard only.
The popupMenu has been created as a child of the BulletinBoard. Press MB1
in the pushButton. It should go in and out. NO message should appear in
the term window.
#) Press MB3 in the PushButton. A popupMenu should appear and a message should
appear in the term window.
#) Pressing MB1 should have no effect in the BulletinBoard, however
messages from the event handler should appear in the term window.
#) Press MB3 in the BulletinBoard. A popupMenu should be posted. A
message should appear in the term window.
C)
/* Pause 8 */
/* Test for PIR 2972, infamous ATTEMPT TO REMOVE NON-EXISTANT PASSIVE GRAB */
E)
|