1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
|
/* $XConsortium: SpinBox5.dat /main/5 1996/04/30 13:57:45 schuldy $ */
/*
* 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
*/
@) 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)
|