/* $XConsortium: SpinBox5.dat /main/5 1996/04/30 13:57:45 schuldy $ */ /* * @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 */ @) Welcome to the Resource Control Panel test for SpinBox. The test is comprised of a Resource Control Panel and a client window containing two SpinBox widgets. The Resource Control Panel is divided into three sections. The topmost section allows the user to set SpinBox resources. Changes made to resource values in this section will affect both of the SpinBox widgets in the client window. The bottom-left section allows the user to set SpinBox constraint resources on the SpinBox widget labelled \"XmSTRING\". The bottom-right section allows the user to set SpinBox constraint resources on the SpinBox widget labelled \"XmNUMERIC". C) #) Verify that the SpinBox arrows are displayed to the right of the SpinBox widgets. #) Change the value of Arrow Layout to \"Arrows Split\". The left-pointing arrows should display on the left of each SpinBox while the right-pointing arrows display on the right. #) Change the value of Arrow Layout to \"Arrows Beginning\". Verify that both the left-pointing and right-pointing arrows are displayed on the left of each SpinBox. C) #) Change the value of Arrow Size. Check that the arrows increase in size accordingly. C) #) Change the value of Default Arrow Sensitivity to \"Arrows Decrement Sensitive\". The right-pointing arrows should be grayed out and should not respond to clicking MB1. #) Change the value of Default Arrow Sensitivity to \"Arrows Increment Sensitive\". The left-pointing arrows should be grayed out and should not respond to clicking MB1. #) Change the value of Default Arrow Sensitivity to \"Arrows Insensitive\". Both the left and right pointing arrows should be grayed out and should not respond to clicking MB1. #) Change the value of Default Arrow Sensitivity back to \"Arrows Sensitive\". C) #) Set Initial Delay to a 2000. Click KReturn. Set Repeat Delay to 1000. Click KReturn. Press MB1 on one of the XmSTRING SpinBox arrows. arrows. While holding MB1 should notice a delay of 2 seconds before the SpinBox value changes. After the initial value change there should be a delay of 1 second between each value change. Release MB1. #) Set Initial Delay to 0. Click KReturn. When Initial Delay equals zero, the SpinBox uses the value of RepeatDelay as the time lapsed prior to any value change. Press MB1 on one of the XmSTRING SpinBox arrows. Verify that a delay of 1 second occurs prior to the SpinBox value changing. Release MB1. #) Set Initial Delay to 1000. Click KReturn. Set Repeat Delay to 0. Click KReturn. When Repeat Delay equals zero automatic spinning is disabled. Press MB1 on one of the XmSTRING SpinBox arrows for over one second. Verify that the SpinBox value does not change while the SpinBox arrow is depressed. Release MB1. C) #) Set Default Arrow Sensitivity to \"Arrows Insensitive\". The SpinBox arrows of both SpinBox widgets should be insensitive. #) Set Arrow Sensitivity for the XmSTRING SpinBox to \"Arrow Sensitive\". Verify that both the left and right pointing arrows are sensitive. #) Set Arrow Sensitivity for the XmSTRING SpinBox to \"Arrow Decrement Sensitive\". Verify that the left-pointing arrow is sensitive. #) Set Arrow Sensitivity for the XmSTRING SpinBox to \"Arrow Increment Sensitive\". Verify that the right-pointing arrow is sensitive. #) Set Arrow Sensitivity for the XmSTRING SpinBox to \"Arrow Insensitive\". Verify that both the left and right pointing arrows are insensitive. C) #) Change the values of Decimal Pts, Increment Value, Maximum Value and Minimum Value in the XmSTRING SpinBox. Verify that changing these values has no effect on the XmSTRING SpinBox. #) Change the value of Position for the XmSTRING SpinBox to 3. Verify that the string now displayed in the XmSTRING SpinBox is \"Fourth\". C) #) Set Default Arrow Sensitivity back to \"Arrows Sensitive\". #) Change the Increment Value in the XmNUMERIC SpinBox from 1 to 3. Click KReturn. Click MB1 on the right-pointing arrow. Verify that the value in the XmNUMERIC SpinBox changes to 3. Click MB1 on the right-pointing arrow again. The value should now be 6. Click MB1 two more times on the right-pointing arrow. The XmNUMERIC SpinBox should wrap around pass the maximum value to the minimum value of 0. #) Change the Maximum Value in the XmNUMERIC SpinBox to 20. Click KReturn. Change the Increment Value to 5. Click KReturn. Click on the right-pointing arrow four times. The XmNUMERIC SpinBox should display the value of 20. Click on the right-pointing arrow one more time. The value should wrap around to the minimum value of 0. #) Change the Minimum Value in the XmNUMERIC SpinBox to 10. Click KRetrun. Click on the right-pointing arrow two times. The value should now be 20. Click on the right-pointing arrow once more. The XmNUMERIC SpinBox should display the minimum value of 10. #) Change the value of Decimal Pts in the XmNUMERIC SpinBox to 2. Click KReturn. Verify that the value is now 0.10 in the XmNUMERIC SpinBox. #) Change the value of Decimal Pts in the XmNUMERIC SpinBox back to 0. Click KReturn. Verify that the value is again 10 in the XmNUMERIC SpinBox. C) #) Change the Increment Value of the XmNUMERIC SpinBox to 1. Click KReturn. Change the Position value to 5. Click KReturn. Verify that the value displayed in the XmNUMERIC SpinBox is 15. C) #) Change Increment Value of the XmNUMERIC SpinBox to 0. Click KReturn. Verify that at least one message is printed to stdout indicating that zero is not a valid value for XmNincrementValue. C) #) Change Increment Value of the XmNUMERIC SpinBox back to 1. Click KReturn. #) Change Position Value back to 0. Click KReturn. #) Change Minimum Value of the XmNUMERIC SpinBox to some value greater than Maximum Value. Click KReturn. Verify that a message is printed to stdout indicating that the spin direction specified by XmNincrementValue has been reversed. #) Click MB1 on the right-pointing arrow of the XmNUMERIC SpinBox. The value of the SpinBox should decrease. #) Now change Increment Value of the XmNUMERIC SpinBox to -1. Click KReturn. Change Minimum Value of the same SpinBox to a value less than the Maximum Value. Click KReturn. Another message should appear indicating that the spin direction specified by XmNincrementValue has been reversed. #) Click MB1 on the right-pointing arrow of the XmNUMERIC SpinBox. The value of the SpinBox should increase. C) #) Change Increment Value back to 1. Click KReturn. #) Change Position Value back to 0. Click KReturn. #) Change Minimum Value to the same value as Maximum Value. Click KReturn. Verify that no warning messages are printed. #) Increase Position Value to a value greater than zero. Click KReturn. Verify that a warning message is printed saying that the position value is out of range; the maximum position value will be used. #) Change Position Value back to 0. Click KReturn. C) #) Change Position Value of the XmSTRING SpinBox to a value greater than Num Values. Click KReturn. Scroll the items in the Values list to the end. Verify that the string displayed in the SpinBox is the same as the last value in the Values array. #) Now change the Position Value to equal Num Values. Click KReturn. The same string should still be displayed. #) Change the Position Value to -1. Click KReturn. Scroll the items in the Values list to the beginning. Verify that the string displayed in the SpinBox is the same as the first value in the Values array. C) #) Change the Minimum Value of the XmNUMERIC SpinBox to a positive value less than the Maximum Value. Click KReturn. Set Increment Value to 1. Click KReturn. #) Now change the Position Value of the XmNUMERIC SpinBox to a value greater than Maximum Value. Click KReturn. Verify that the value displayed in the SpinBox equals Maximum Value. #) Change the Position Value of the XmNUMERIC SpinBox to a negative value. Click KReturn. Verify that the value displayed in the SpinBox equals Minimum Value. C) #) (Motif/CDE Convergence TP3) #) Programmatically reset the minumum value to 5, the maximum value to 25, and the increment value to 5. #) Enter a value that is less than the minimum into the XmNUMERIC text field (programatically), and the SpinBox should display the minimum value instead, and print the minimum value to stdout. Verify, by image comparison that the value is now the minimum. C) #) (Motif/CDE Convergence TP4) #) Enter a value that is more than the maximum into the XmNUMERIC text field (programatically), and the SpinBox should display the maximum value instead, and print the maximum value to stdout. Verify, by image comparison that the value is now the maximum. C) #) (Motif/CDE Convergence TP5) #) Enter 11 into the XmNUMERIC text field (programatically), and the SpinBox should display 10 instead, and print the increment value to stdout. Verify, by image comparison that the value is now 10. C) #) (Motif/CDE Convergence TP6) #) Enter 20 into the XmNUMERIC text field (programatically), and the SpinBox should accept 20, and print the valid alue to stdout. Verify, by image comparison that the value is now 20. C) #) (Motif/CDE Convergence TP7) #) Enter .10 into the XmNUMERIC text field (programatically), and the SpinBox should display the minimum value instead, and print the minimum value to stdout. Verify, by image comparison that the value is now the minimum. C) E)