# $XConsortium: PushBtn1.scr /main/6 1995/07/17 20:06:53 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 pushbutton labeled 'PushButton1' should appear. It should be # the default blue color with a 2 pixel white border around the # pushbutton. CompareVisual PushButton1 # Press and hold MB1 in pushbutton, it should have the white highlight # border filled with your highlight color and the pushbutton should # appear to be pressed in. LocatePointer PushButton1 PressMB Btn1 CompareVisual PushButton1 # Release MB1 - 'PushButton1' should appear popped out. # Iconify and Normalize the client window. ReleaseMB Btn1 CompareVisual PushButton1 WindowIconify Shell1 WindowDeiconify Shell1 # Arm the pushbutton (press and hold MB1 on pushbutton). # 'PushButton1' should appear to be pressed in. LocatePointer PushButton1 PressMB Btn1 CompareVisual PushButton1 # Move the pointer out of the client window. # 'PushButton1' should appear to be popped out. LocatePointer PushButton1 Off CompareVisual PushButton1 # Move the pointer into client window. # 'PushButton1' should appear to be pressed in. LocatePointer PushButton1 Off CompareVisual PushButton1 # Move the pointer out of the client window. # 'PushButton1' should appear to be popped out. LocatePointer PushButton1 Off # Disarm the pushbutton (release MB1 outside of window). ReleaseMB Btn1 Continue # The client window should be smaller. LocatePointer PushButton1 CompareVisual PushButton1 # Resize and move the client window. The pushbutton should have a highlight # area of 20 pixels, white when the widget does not have focus, highlight # color when it does. WindowResize Shell1 SouthEast 500 400 WindowMove Shell1 200 200 CompareVisual PushButton1 # Arm 'PushButton1'. The pushbutton background color should change to yellow. # "PushButton1 Armed" should appear in the term window as well as the # event type. Release MB1. Colors should revert back. # "Event is okay" & "Pushbutton Disarmed" should appear in the term window. LocatePointer PushButton1 PressMB Btn1 CompareVisual PushButton1 ReleaseMB Btn1 CompareVisual PushButton1 # Press and hold MB1 on 'PushButton1'. The background color should change to # yellow. 'Pushbutton Armed' should appear in the term window. LocatePointer PushButton1 PressMB Btn1 # Move out of the client window. Colors should revert back. # Release MB1. "PushButton1 Disarmed" should appear in term window. LocatePointer PushButton1 Off ReleaseMB Btn1 # With pointer in client window, press Return and Space keys. # For each, messages "Pushbutton armed", "Event is okay", and "PushButton # Disarmed" should appear and the button looks pressed and released. # With the focus in the client window, wiggle the mouse and press Return *many* # times. The event type printed in the term window should be consistent. LocatePointer PushButton1 PressKey KReturn CompareVisual PushButton1 ReleaseKey KReturn CompareVisual PushButton1 ClickKey KSpace ClickKey KReturn ClickKey KReturn Continue # A mountain should appear. # Arm 'PushButton1'. An image of GNU should appear. # Release 'PushButton1'. An image of the mountain should appear. CompareVisual PushButton1 LocatePointer PushButton1 PressMB Btn1 CompareVisual PushButton1 ReleaseMB Btn1 CompareVisual PushButton1 Continue # Two push buttons should appear in a drawing area with highlight # thickness = 7. The background of the drawing area has a pixmap. # Press and release on each push button. The pixmap should appear # correctly around the highlight area of each push button. CompareVisual da LocatePointer oneButton ClickMB Btn1 CompareVisual da LocatePointer twoButton ClickMB Btn1 CompareVisual da Continue # The next few panels are testing changing colors via XmChangeColor. # Both the pushbuttons should have a shadowThickness of 10. # Both the pushbuttons should have a background of RED color now. And # the shadow colors and highlight colors should change automatically # to make them visible. #C) LocatePointer oneButton CompareVisual oneButton PressMB Btn1 CompareVisual oneButton ReleaseMB Btn1 LocatePointer twoButton CompareVisual twoButton PressMB Btn1 CompareVisual twoButton ReleaseMB Btn1 Continue # Both the pushbuttons should have a background of GREEN color now. And # the shadow colors and highlight colors should change automatically # to make them visible. #C) LocatePointer oneButton CompareVisual oneButton PressMB Btn1 CompareVisual oneButton ReleaseMB Btn1 LocatePointer twoButton CompareVisual twoButton PressMB Btn1 CompareVisual twoButton ReleaseMB Btn1 Continue # Both the pushbuttons should have a background of BLUE color now. And # the shadow colors and highlight colors should change automatically # to make them visible. #C) LocatePointer oneButton CompareVisual oneButton PressMB Btn1 CompareVisual oneButton ReleaseMB Btn1 LocatePointer twoButton CompareVisual twoButton PressMB Btn1 CompareVisual twoButton ReleaseMB Btn1 Continue # Both the pushbuttons should have a background of YELLOW color now. And # the shadow colors and highlight colors should change automatically # to make them visible. #C) LocatePointer oneButton CompareVisual oneButton PressMB Btn1 CompareVisual oneButton ReleaseMB Btn1 LocatePointer twoButton CompareVisual twoButton PressMB Btn1 CompareVisual twoButton ReleaseMB Btn1 Continue # Both the pushbuttons should have a background of PINK color now. And # the shadow colors and highlight colors should change automatically # to make them visible. LocatePointer oneButton CompareVisual oneButton PressMB Btn1 CompareVisual oneButton ReleaseMB Btn1 LocatePointer twoButton CompareVisual twoButton PressMB Btn1 CompareVisual twoButton ReleaseMB Btn1 Exit