Blob Blame History Raw
# $XConsortium: Scale11.scr /main/4 1995/07/17 20:36:18 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 vertical scale appears on your screen. 
#    Its sliding mode resource is set to XmTHERMOMETER.
# #) All other values are set by default. 
#    The Scrollbar color is set to red, so you see a small red filled part at 
#    the bottom (value 0). 

CompareVisual Scale1

# #) There will be a control panel with which you can set various resources of 
#    the Scale, and play with the arguments of the XmScaleSetTics function.
# #) In the control panel, the "Thermometer Value" is 0. Set the scale value 
#    to 100, and click on the "Set Value" button. 
# #) The thermometer should be at the top of the scrollbar. 
#    Check that it is still anchored to the bottom.

LocatePointer ValSC RScaleSlider
DragSliderValue Right Max
LocatePointer SetValuePB
ClickMB Btn1
CompareVisual Scale1

# C)
Continue

# #) Set the "Show Value" option to "near_slider" in the control panel. 
# #) The thermometer value 100 appears next to the scrollbar.

LocatePointer OptionM ROptionButton
PressMB Btn1
LocatePointer NearSliderPB
ReleaseMB Btn1
CompareVisual Scale1

# #) Set the "Thermometer Value" to 50 in the control panel, and click on the 
#    "Set Value" button.
# #) The thermometer should reach the middle of the scrollbar. 
#    Its value should be 50.

LocatePointer ValSC RScaleSlider
DragSliderValue Left 50
LocatePointer SetValuePB
ClickMB Btn1
CompareVisual Scale1

# @) Note the thermometer will not take any input because it is not "Editable".
# C)
Continue

# #) Click on the "Editable" toggle button in the control panel. 
#    This alter the input/output mode of the scale.

LocatePointer EditableTB
ClickMB Btn1

# #) Click MB1 in the red region of the slider. 
#    The value should be decremented by 10.

LocatePointer Scale1 RScaleDownOrRightSliderArea
ClickMB Btn1
CompareVisual Scale1

# #) Click MB1 in the trough above the red region. 
#    The value is incremented by 10.

LocatePointer Scale1 RScaleUpOrLeftSliderArea
ClickMB Btn1
CompareVisual Scale1

# #) Press and hold down MB1 in the red region of the slider.
#    The slider should move down (by 10) until it reaches the bottom of the 
#    scrollbar.
#    Release MB1. The thermometer value is 0.

LocatePointer Scale1 RScaleDownOrRightSliderArea
PressMB Btn1
Wait 5
ReleaseMB Btn1
CompareVisual Scale1

# #) Press and hold down MB1 in the trough above the red region.
#    The slider should move up (by 10) until it reaches the top of the 
#    scrollbar.
#    Release MB1. The thermometer value is 100.

LocatePointer Scale1 RScaleUpOrLeftSliderArea
PressMB Btn1
Wait 5
ReleaseMB Btn1
CompareVisual Scale1

# #) Press <Ctrl> MB1 in the red region. 
#    The thermometer should reach the bottom of the scrollbar. Its value is 0.

LocatePointer Scale1 RScaleDownOrRightSliderArea
ClickMB <Ctrl> Btn1
CompareVisual Scale1

# #) Press <Ctrl> MB1 in the region above the red region. 
#    The thermometer should reach the top of the scrollbar. Its value is 100.

LocatePointer Scale1 RScaleUpOrLeftSliderArea
ClickMB <Ctrl> Btn1
CompareVisual Scale1

# #) Press and hold down MB2 in the thermometer.  Drag the pointer up and
#    down.  The thermometer should follow the pointer.  Release MB2. 

LocatePointer Scale1 RScaleDownOrRightSliderArea
ClickMB Btn2
CompareVisual Scale1
LocatePointer Scale1 RScaleSlider
DragSliderValue Up Max Btn2
CompareVisual Scale1
DragSliderValue Down Min Btn2
CompareVisual Scale1
DragSliderValue Up 50 Btn2
CompareVisual Scale1

# @) Note each time you interactively change the value of the thermometer, the
#    "Thermometer Value" is updated in the control panel.
# C)
Continue

# #) Change the thermometer value with the keyboard and verify the following
#    behavior (check ~/.motifbind for key bindings).
# !)
#    osfUp	  : +1
#    osfDown	  : -1
#    Ctrl osfUp	  : +10
#    Ctrl osfDown : -10
#    osfPageUp	  : +10
#    osfPageDown  : -10
#    osfBeginLine : 0
#    osfEndLine	  : 100

LocatePointer Scale1
ClickKey KUp
ClickKey KUp
CompareVisual Scale1
ClickKey KDown
ClickKey KDown
CompareVisual Scale1
ClickKey <Ctrl> KUp
ClickKey <Ctrl> KUp
CompareVisual Scale1
ClickKey <Ctrl> KDown
ClickKey <Ctrl> KDown
CompareVisual Scale1
ClickKey KPageUp
ClickKey KPageUp
CompareVisual Scale1
ClickKey KPageDown
ClickKey KPageDown
CompareVisual Scale1
ClickKey KBeginLine
CompareVisual Scale1
ClickKey KEndLine
CompareVisual Scale1

# C)
Continue

# #) Set the value of "Num of scale values between big tics" scale to 20, and
#    the "Big tics size" scale to 20.
#    Click on the "Set Tic Marks" button.
#    Verify that you have 6 tic marks corresponding to 0, 20, 40, 60, 80 and 
#    100.
#    The tic marks appear on the left side border.

LocatePointer RCScale0 RScaleSlider
DragSliderValue Right 20
LocatePointer RCScale3 RScaleSlider
DragSliderValue Right 20
LocatePointer SetTicsPB
ClickMB Btn1
CompareVisual Scale1

# #) Change the "Show Value" option to "near_border". 
#    The tic marks now appear near the slider, and the value is near the 
#    border.

LocatePointer OptionM ROptionButton
PressMB Btn1
LocatePointer NearBorderPB
ReleaseMB Btn1
CompareVisual Scale1

# #) Set the value of "Num of medium tics between big tics values" scale to 1, 
#    and the "Medium tics size" scale to 10.
#    Click on the "Set Tic Marks" button. 
#    Verify that you have 1 tic mark between each big one, corresponding to 10,
#    30, 50, 70 and 90.

LocatePointer RCScale1 RScaleSlider
DragSliderValue Right 1
LocatePointer RCScale4 RScaleSlider
DragSliderValue Right 10
LocatePointer SetTicsPB
ClickMB Btn1
CompareVisual Scale1

# #) Set the value of "Num of small tics between medium tics values" scale to 
#    4, and the "Small tics size" scale to 3.
#    Click on the "Set Tic Marks" button. 
#    Verify that you have 4 tic marks between each medium one.

LocatePointer RCScale2 RScaleSlider
DragSliderValue Right 4
LocatePointer RCScale5 RScaleSlider
DragSliderValue Right 3
LocatePointer SetTicsPB
ClickMB Btn1
CompareVisual Scale1

# #) Set the "Thermometer Value" through the control panel, and verify that the
#    value matches the tic marks.

LocatePointer ValSC RScaleSlider
DragSliderValue Left 80
LocatePointer SetValuePB
ClickMB Btn1
CompareVisual Scale1


# @) Note in this test, you will have to resize the window because the Shell 
#    will resize when calling the SetTicks function.
# C)
Continue

# #) Click on the "Allow Shell Resize" toggle button in the control panel. 
#    When off, the window won't resize when setting new tic marks.
# #) Change the different scale values for setting the tic marks. Use for 
#    example 50, 20, 4, 10, 9 and 3.
# #) Click on the "Set Tic Marks" button. 
# #) Check the result.

LocatePointer ResizeTB
ClickMB Btn1
LocatePointer RCScale0 RScaleSlider
DragSliderValue Right 50
LocatePointer RCScale1 RScaleSlider
DragSliderValue Right 4
LocatePointer RCScale2 RScaleSlider
DragSliderValue Right 9
LocatePointer SetTicsPB
ClickMB Btn1
CompareVisual Scale1

# C)
Continue

# E)
Exit