# $XConsortium: RIPushBGad1.scr /main/4 1995/07/17 20:35: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
# Double click on the button. You should see 'Armed' and 'Activated'
# messages, followed by the number of click counts, and 'Disarmed'.
# There should be two sets of these, one with click count of 1
# and one with click count of 2
LocatePointer PBGadget
ClickMB Btn1 2
# Perform the same actions, with these changes:
# leave/enter between first arm and disarm then click again
# arm, wait several seconds, then disarm and click again.
LocatePointer PBGadget
PressMB Btn1
LocatePointer PBGadget Off
LocatePointer PBGadget
ReleaseMB Btn1
ClickMB Btn1
PressMB Btn1
System sleep 3
ReleaseMB Btn1
ClickMB Btn1
Continue
# Double click again on the button. This time you should see
# 'Armed' and 'Activated' messages, followed by a click count of 1,
# and 'Disarmed'. There should only be one set of these for every
# multi click made.
LocatePointer PBGadget
ClickMB Btn1 2
Continue
# A pushbutton gadget labeled 'Push Gadget Here' should appear.
# Arm the pushbutton gadget (press and hold MB1 on pushbutton gadget).
# The gadget should appear to be pressed in and
# "PushButtonGadget Armed" should appear in the term window.
# Release MB1. The gadget should appear popped out and
# "PushButtonGadget Activated" and "PushButtonGadget Disarmed" should
# appear in the term window.
# Move, Resize, Iconify, and Normalize the client window.
LocatePointer PBGadget
CompareVisual PBGadget
PressMB Btn1
CompareVisual PBGadget
ReleaseMB Btn1
CompareVisual PBGadget
# Move, Resize, Iconify, and Normalize the client window.
WindowMove Shell1 100 100
WindowResize Shell1 SouthEast 150 150
WindowIconify Shell1
WindowDeiconify Shell1
Continue
# The client window should have changed size and should contain the
# image of the GNU appear in the pushbutton gadget.
# Arm the pushbutton gadget (press and hold MB1 on pushbutton gadget).
# The gadget should appear to be pressed in and
# "PushButtonGadget Armed" should appear in the term window.
CompareVisual PBGadget
LocatePointer PBGadget
PressMB Btn1
# Release MB1. The gadget should appear popped out and
# "PushButtonGadget Activated" and "PushButtonGadget Disarmed" should
# appear in the term window.
ReleaseMB Btn1
Continue
# The margin around the GNU pixmap should be 1 mm.
CompareVisual PBGadget
# Arm the pushbutton gadget (press and hold MB1 on pushbutton gadget).
# The margin should change color and
# "PushButtonGadget Armed" should appear in the term window.
LocatePointer PBGadget
PressMB Btn1
# Move the pointer out of the client window. The margin
# should revert back to the original color.
LocatePointer PBGadget Off
# Move the pointer back into the window. The margin
# should change color.
LocatePointer PBGadget
# Move the pointer out of the window. The margin
# should revert back to the original colors.
LocatePointer PBGadget Off
# Release MB1. "PushButtonGadget Disarmed" should
# appear in the term window.
ReleaseMB Btn1
Continue
# The label: 'PBG Label' should appear in the pushbutton gadget.
# The default shadow should appear around the pushbutton gadget.
# Arm the pushbutton gadget (press and hold MB1 on pushbutton gadget).
# The gadget should appear to be pressed in.
# Release MB1. The gadget should appear popped out.
CompareVisual PBGadget
LocatePointer PBGadget
PressMB Btn1
CompareVisual PBGadget
ReleaseMB Btn1
CompareVisual PBGadget
Continue
# The window should be resized. The new size will be reported in the
# term window.
Continue
# The gadget should be destroyed.
Exit