/* $XConsortium: Scale11.dat /main/4 1995/07/17 10:21:13 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). #) 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 MB1 in the red region. The thermometer should reach the bottom of the scrollbar. Its value is 0. #) Press 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)