# $XConsortium: Scale11.scr /main/4 1995/07/17 20:36:18 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 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 MB1 in the red region. # The thermometer should reach the bottom of the scrollbar. Its value is 0. LocatePointer Scale1 RScaleDownOrRightSliderArea ClickMB Btn1 CompareVisual Scale1 # #) Press 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 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 KUp ClickKey KUp CompareVisual Scale1 ClickKey KDown ClickKey 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