Blob Blame History Raw
# $XConsortium: Scale4.scr /main/4 1995/07/17 20:36:30 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 client with a vertical scale will appear. The scale
#     will contain 3 labels to the left of the scale. The labels
#     will be 'label1', 'label2', and 'label3'. 
#  #) Resize the client window larger. Labels should spread out but remain
#     on the left of the scale. 
WindowResize Shell1 SouthEast 200 200
CompareVisual Shell1

#  #) Resize the client window smaller. Labels should overlap. 
WindowResize Shell1 SouthEast 100 100
CompareVisual Shell1

#  #) Resize the client window to a usable size. 
WindowResize Shell1 SouthEast 100 250
CompareVisual Shell1

#  #) With the pointer in the scroll area, press the
#     up arrow key. The callback reason and value
#     should be printed in the term window. 
LocatePointer Scale1 RScaleUpOrLeftSliderArea
ClickKey KUp
CompareVisual Scale1

#  #) Press the down arrow key. The callback reason and value
#     should be printed in the term window. 
ClickKey KDown
CompareVisual Scale1

#  #) Press the left arrow key. Nothing should happen. 
ClickKey KLeft
CompareVisual Scale1

#  #) Press the right arrow key. Nothing should happen. 
ClickKey KRight
CompareVisual Scale1

#  C)
Continue

#  #) Press MB1 on the slider and release without moving. A callback
#     message should be printed. 
LocatePointer Scale1 RScaleSlider
ClickMB Btn1
CompareVisual Scale1

#  #) Press MB1 on the slider and drag the slider. The callback
#     reason and value should be printed in the term window
#     as the slider moves. 
DragSliderValue Up 35
CompareVisual Scale1

#  #) Press MB1 in the slider area above the slider. The callback
#     reason and value should be printed in the term window. 
LocatePointer Scale1 RScaleUpOrLeftSliderArea
PressMB Btn1
Wait 3
ReleaseMB Btn1
CompareVisual Scale1

#  #) Press MB1 in the slider area below the slider. The callback
#     reason and value should be printed in the term window. 
LocatePointer Scale1 RScaleDownOrRightSliderArea
PressMB Btn1
Wait 3
ReleaseMB Btn1
CompareVisual Scale1

#  #) Press <Ctrl> MB1 in the scale trough. The slider should move all
#     the way to top or bottom, depending on which side of slider
#     you clicked in.
LocatePointer Scale1 RScaleUpOrLeftSliderArea
ClickMB <Ctrl> Btn1
CompareVisual Scale1

LocatePointer Scale1 RScaleDownOrRightSliderArea
ClickMB <Ctrl> Btn1
CompareVisual Scale1

#  #) Press <Shift> MB1 in the scale trough. Nothing should happen. 
LocatePointer Scale1 RScaleUpOrLeftSliderArea
ClickMB <Shift> Btn1
CompareVisual Scale1

#  @) In the next panel, the scale will be HORIZONTAL in orientation. 

#  C)
Continue

#  @) A client with a horizontal scale will appear. The scale
#     will contain 3 labels on the top of the scale. The labels
#     will be 'label1', 'label2', and 'label3'. 
#  #) Resize the client window to be larger. Labels should spread out but
#     remain on to the top of the scale. 
WindowResize Shell1 SouthEast 200 200
CompareVisual Shell1

#  #) Resize the client window smaller. Labels should overlap. 
WindowResize Shell1 SouthEast 100 100
CompareVisual Shell1

#  #) Resize the client window to a usable size. 
WindowResize Shell1 SouthEast 250 100
CompareVisual Shell1

#  #) With the pointer in the scroll area, press the left arrow key.
#     The callback reason and value should be printed in the term window. 
LocatePointer Scale1 RScaleDownOrRightSliderArea
ClickKey KRight
CompareVisual Scale1

#  #) Press the right arrow key. The callback
#     reason and value should be printed in the term window. 
ClickKey KLeft
CompareVisual Scale1

#  #) Press the up arrow key. Nothing should happen. 
ClickKey KUp
CompareVisual Scale1

#  #) Press the down arrow key. Nothing should happen. 
ClickKey KDown
CompareVisual Scale1

#  C)
Continue

#  #) Press MB1 on the slider and release without moving. A callback
#     message should be printed. 
LocatePointer Scale1 RScaleSlider
ClickMB Btn1
CompareVisual Scale1

#  #) Press MB1 on the slider and drag the slider. The callback
#     reason and value should be printed in the term window. 
DragSliderValue Right 45
CompareVisual Scale1

#  #) Press MB1 in the slider to the left of the slider. The callback
#     reason and value should be printed in the term window. 
LocatePointer Scale1 RScaleUpOrLeftSliderArea
PressMB Btn1
Wait 3
ReleaseMB Btn1
CompareVisual Scale1

#  #) Press MB1 in the slider area to the right of the slider. The callback
#     reason and value should be printed in the term window. 
LocatePointer Scale1 RScaleDownOrRightSliderArea
PressMB Btn1
Wait 3
ReleaseMB Btn1
CompareVisual Scale1

#  #) Press <Ctrl> MB1 in the scale trough. The slider should move all the
#     way to the right or left.
LocatePointer Scale1 RScaleUpOrLeftSliderArea
ClickMB <Ctrl> Btn1
CompareVisual Scale1

LocatePointer Scale1 RScaleDownOrRightSliderArea
ClickMB <Ctrl> Btn1
CompareVisual Scale1

#  #) Press <Shift> MB1 in the scale trough. Nothing should happen. 
LocatePointer Scale1 RScaleUpOrLeftSliderArea
ClickMB <Shift> Btn1
CompareVisual Scale1

#  E)
Exit