Blame tests/Toolkit/Buttons/ToggleBtn3.scr

Packit b099d7
# $XConsortium: ToggleBtn3.scr /main/4 1995/07/17 20:07:48 drk $
Packit b099d7
# Motif
Packit b099d7
#
Packit b099d7
# Copyright (c) 1987-2012, The Open Group. All rights reserved.
Packit b099d7
#
Packit b099d7
# These libraries and programs are free software; you can
Packit b099d7
# redistribute them and/or modify them under the terms of the GNU
Packit b099d7
# Lesser General Public License as published by the Free Software
Packit b099d7
# Foundation; either version 2 of the License, or (at your option)
Packit b099d7
# any later version.
Packit b099d7
#
Packit b099d7
# These libraries and programs are distributed in the hope that
Packit b099d7
# they will be useful, but WITHOUT ANY WARRANTY; without even the
Packit b099d7
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit b099d7
# PURPOSE. See the GNU Lesser General Public License for more
Packit b099d7
# details.
Packit b099d7
#
Packit b099d7
# You should have received a copy of the GNU Lesser General Public
Packit b099d7
# License along with these librararies and programs; if not, write
Packit b099d7
# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Packit b099d7
# Floor, Boston, MA 02110-1301 USA
Packit b099d7
# 
Packit b099d7
# HISTORY
Packit b099d7
Packit b099d7
# This is a simple test of toggle button behaviors. To toggle a 
Packit b099d7
#  toggle button, click anywhere on the label or on the indicator.  
Packit b099d7
Packit b099d7
# Click on ToggleButton1. The indicator should fill to show it is on.
Packit b099d7
# Toggle Button 1 uses a large font and its indicator is sized proportionally. 
Packit b099d7
Packit b099d7
# Press MB1 down on ToggleButton1, then move outside the window and release
Packit b099d7
# the button. The toggle indicator will change when you press the button 
Packit b099d7
# and should revert when you move outside the window. 
Packit b099d7
Packit b099d7
# Move the pointer back over ToggleButton1, and use both the return key and
Packit b099d7
# the space bar to toggle the indicator. 
Packit b099d7
Packit b099d7
LocatePointer ToggleButton1
Packit b099d7
ClickMB Btn1
Packit b099d7
CompareVisual ToggleButton1
Packit b099d7
CompareVisual Manager1
Packit b099d7
PressMB Btn1
Packit b099d7
LocatePointer ToggleButton1 Off
Packit b099d7
ReleaseMB Btn1
Packit b099d7
CompareVisual ToggleButton1
Packit b099d7
CompareVisual Manager1
Packit b099d7
LocatePointer ToggleButton1
Packit b099d7
ClickKey KSpace
Packit b099d7
CompareVisual ToggleButton1
Packit b099d7
CompareVisual Manager1
Packit b099d7
ClickKey KReturn
Packit b099d7
CompareVisual ToggleButton1
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# Move the pointer over ToggleButton2. Toggle the toggle button using either 
Packit b099d7
# the mouse or the keyboard, as you did with ToggleButton1. The indicator 
Packit b099d7
# should not fill with a new color, but the top and bottom shadows 
Packit b099d7
# should change.
Packit b099d7
Packit b099d7
# Leave this button ON before you continue
Packit b099d7
# It should remain highlighted for the remainder of the test. 
Packit b099d7
Packit b099d7
LocatePointer ToggleButton2
Packit b099d7
ClickMB Btn1
Packit b099d7
CompareVisual ToggleButton2
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# ToggleButton3 should show no indicator. Toggle it, and the indicator will appear. 
Packit b099d7
Packit b099d7
LocatePointer ToggleButton3
Packit b099d7
CompareVisual ToggleButton3
Packit b099d7
CompareVisual Manager1
Packit b099d7
ClickMB Btn1
Packit b099d7
CompareVisual ToggleButton3
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# ToggleButton4 should already appear ON. You can manipulate it normally. 
Packit b099d7
# ToggleButton5 contains a pixmap instead of a label. When you toggle the
Packit b099d7
#   toggle button, the pixmap will change. 
Packit b099d7
Packit b099d7
LocatePointer ToggleButton4
Packit b099d7
CompareVisual ToggleButton4
Packit b099d7
CompareVisual Manager1
Packit b099d7
ClickMB Btn1
Packit b099d7
CompareVisual ToggleButton4
Packit b099d7
CompareVisual Manager1
Packit b099d7
LocatePointer ToggleButton5
Packit b099d7
CompareVisual ToggleButton5
Packit b099d7
CompareVisual Manager1
Packit b099d7
ClickMB Btn1
Packit b099d7
CompareVisual ToggleButton5
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# ToggleButton6 has no indicator. When you toggle it, the shadows should change 
Packit b099d7
#  so that it appears depressed. Press again and it will revert. 
Packit b099d7
Packit b099d7
LocatePointer ToggleButton6
Packit b099d7
CompareVisual ToggleButton6
Packit b099d7
CompareVisual Manager1
Packit b099d7
ClickMB Btn1
Packit b099d7
CompareVisual ToggleButton6
Packit b099d7
CompareVisual Manager1
Packit b099d7
ClickMB Btn1
Packit b099d7
CompareVisual ToggleButton6
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# ToggleButton5 should now be toggled to the ON position (smiley face). 
Packit b099d7
Packit b099d7
CompareVisual ToggleButton5
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# ToggleButton5 should now be toggled to the OFF position (circles). 
Packit b099d7
Packit b099d7
CompareVisual ToggleButton5
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# The background of ToggleButton5 will change to be a smiley face
Packit b099d7
# pixmap 
Packit b099d7
Packit b099d7
CompareVisual ToggleButton5
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# The background of ToggleButton5 will change back to the default
Packit b099d7
# background color. 
Packit b099d7
Packit b099d7
CompareVisual ToggleButton5
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
# The background of Manager has been specified as None. This should not
Packit b099d7
# result in protocol error.
Packit b099d7
Packit b099d7
CompareVisual ToggleButton5
Packit b099d7
CompareVisual Manager1
Packit b099d7
Continue
Packit b099d7
Packit b099d7
Exit