Blob Blame History Raw
/* $XConsortium: Scale11.dat /main/4 1995/07/17 10:21:13 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). 
#) 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.
C)

#) Set the "Show Value" option to "near_slider" in the control panel. 
#) The thermometer value 100 appears next to the scrollbar.
#) 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.
@) Note the thermometer will not take any input because it is not "Editable".
C)

#) Click on the "Editable" toggle button in the control panel. 
   This alter the input/output mode of the scale.
#) Click MB1 in the red region of the slider. 
   The value should be decremented by 10.
#) Click MB1 in the trough above the red region. 
   The value is incremented by 10.
#) 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.
#) 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.
#) Press <Ctrl> MB1 in the red region. 
   The thermometer should reach the bottom of the scrollbar. Its value is 0.
#) Press <Ctrl> MB1 in the region above the red region. 
   The thermometer should reach the top of the scrollbar. Its value is 100.
#) Press and hold down MB2 in the thermometer.  Drag the pointer up and
   down.  The thermometer should follow the pointer.  Release MB2. 
@) Note each time you interactively change the value of the thermometer, the
   "Thermometer Value" is updated in the control panel.
C)

#) 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
C)

#) 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.
#) Change the "Show Value" option to "near_border". 
   The tic marks now appear near the slider, and the value is near the border.
#) 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.
#) 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.
#) Set the "Thermometer Value" through the control panel, and verify that the
   value matches the tic marks.
@) Note in this test, you will have to resize the window because the Shell 
   will resize when calling the SetTicks function.
C)

#) 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.
C)

E)