# $XConsortium: PushBtn1.scr /main/6 1995/07/17 20:06:53 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 # # 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