/* $XConsortium: ToggleBtn6.dat /main/4 1995/07/17 10:09:08 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
*/
@) Six toggle buttons should be displayed above the horizontal separator.
The label of each toggle button indicates the value
of the XmNindicatorOn resource for that toggle. The unselect color for
the toggle buttons is gray and the select color is red.
#) Verify that the indicator of the toggles buttons labelled
\"Indicator Fill\", \"Indicator CheckBox\" and
\"Indicator CrossBox\" display empty boxes.
#) Click BSelect on the push button labelled \"Select All\".
Verify that the indicator of the toggle button labelled \"Indicator Fill\"
is still an empty box, but appearing depressed.
The toggle button labelled \"Indicator Check\"
should display a check mark. The toggle button labelled \"Indicator CheckBox\"
should display a check mark within a box. The toggle button labelled
\"Indicator Cross\" should display a cross. The toggle button labelled
\"Indicator CrossBox\" should display a cross within a box. There should
be no change in the appearance of the \"Indicator None\" toggle.
#) Click BSelect on the push button labelled \"Deselect All\". Verify
that the check marks and crosses
of the toggle buttons are no longer displayed, and the empty boxes
appear raised.
C)
#) Click BSelect on the toggle button labelled \"Fill On Select\". This sets
the XmNfillOnSelect resource to True.
#) Click BSelect on the push button labelled \"Select All\". The background
of toggle button labelled \"Indicator None\" should draw in the select color
red. Check marks and crosses should display again as the indicators of
the appropriate widgets. Verify that the check marks and crosses are
drawn in the select color red.
#) Click BSelect on the push button labelled \"Deselect All\". The background
of the toggle button labelled \"Indicator None\" should now draw in the
deselect color gray. Check marks and crosses should no longer be displayed.
C)
@) Two more toggle buttons should be displayed above the horizontal
separator. One toggle button has a pixmap label with a pixmap of the
GNU logo. The other toggle button has XmNindicatorType set as XmONE_OF_MANY
and should display a diamond shaped indicator.
#) Verify that the indicators of the pixmap toggle and the \"One of Many\"
toggle are displayed with the same unselect color as the other toggles.
@) The current toggle mode for all the toggle buttons above the
horizontal separator is \"Toggle Boolean\" and the current state is \"Unset\".
Given the current settings, valid states for these toggles are
\"Unset\" and \"Set\".
#) Click BSelect on the button labelled \"Set Next State\". The state
of the toggle buttons should be changed from \"Unset\" to \"Set\".
Verify that the toggle button indicators are displaying the correct
visuals for their \"Set\" state. The background of the \"Indicator None\"
toggle should display in the select color, red. 3-D buttons indicators should
be depressed and displayed in the select color. Check marks and crosses should
be displayed in the select color for the appropriate toggle buttons.
#) Click BSelect on the button labelled \"Set Next State\" again. The
state of the toggle buttons should change from \"Set\" to \"Indeterminate\".
Verify that there is no visual change in the toggle button indicators.
#) Click BSelect on the button labelled \"Set Next State\" again. The
state of the toggle buttons should change from \"Indeterminate\" to
\"Unset\". Verify that the toggle buttons return to the correct visuals
for their \"Unset\" state. The background of the \"Indicator None\"
toggle should display in the unselect color, gray. 3-D buttons indicators should
be raised and displayed in the unselect color. Check marks and crosses should
no longer be displayed.
C)
#) Click BSelect on the toggle button labelled \"Toggle Boolean\". The
toggle mode for all the toggle buttons above the horizontal separator
are now set to \"Toggle Indeterminate\". Valid states for the toggles
are now \"Unset\", \"Set\" and \"Indeterminate\".
#) Click BSelect on the button labelled \"Set Next State\". The state
of the toggle buttons should be changed from \"Unset\" to \"Set\".
Verify that the toggle button indicators are displaying the correct
visuals for their \"Set\" state. The background of the \"Indicator None\"
toggle should display in the select color, red. 3-D buttons indicators should
be depressed and displayed in the select color. Check marks and crosses should
be displayed in the select color for the appropriate toggle buttons.
#) Click BSelect on the button labelled \"Set Next State\". The state
of the toggle buttons should be changed from \"Set\" to \"Indeterminate\".
Verify that the toggle button indicators are displaying the correct
visuals for their \"Indeterminate\" state. The \"Indicator Fill\" toggle
should display a stippled flat box. \"Indicator Check\" should display a
stippled check mark. \"Indicator CheckBox\" should display a stippled
check mark and a stippled, flat box. \"Indicator Cross\" should display a
stippled cross. \"Indicator CrossBox\" should display a stippled cross and
stippled, flat box.
The Pixmap toggle should display a stippled flat box and the pixmap should
be changed from the GNU logo to a Smiley face. The \"One of Many\"
toggle should still be selected with the toggle depressed and filled with
the select color since \"Indeterminate\" is not a valid state for this
indicator type.
#) Click BSelect on the button labelled \"Set Next State\" again. The
state of the toggle buttons should change from \"Indeterminate\" to
\"Unset\". Verify that the toggle buttons return to the correct visuals
for their \"Unset\" state. The background of the \"Indicator None\"
toggle should display in the unselect color, gray. 3-D buttons indicators should
be raised and displayed in the unselect color. Check marks and crosses should
no longer be displayed. The \"Indicator CheckBox\" and \"Indicator CrossBox\"
toggles should display boxes in the foreground color.
C)
@) An option menu for setting the state and a toggle button labelled
\"valueChangedCallback\" should now be displayed below the horizontal separator.
When setting the state of the toggles via the option menu, the function
XmToggleButtonSetValue() will be called with the new state. The current
value of the \"valueChangedCallback\" indicates whether the
XmNvalueChangedCallback should be called for each toggle when the state
is changed. The current value is False.
#) Select the option \"Set\" from the option menu. Verify that the toggle
button visuals are correct for the \"Set\" state.
#) Select the option \"Indeterminate\" from the option menu. Verify that
the button visuals are correct for the \"Indeterminate\" state.
#) Select the option \"Unset\" from the option menu. Verify that
the button visuals are correct for the \"Unset\" state.
C)
#) Click BSelect on the toggle labelled \"valueChangedCallback\".
#) Select the option \"Set\" from the option menu. Verify that the toggle
button visuals are correct for the \"Set\" state. Also verify that messages
are printed to the termainal window indicating that the XmNvalueChangedCallback
has been called for each of the toggle buttons above the horizontal
separator.
#) Select the option \"Indeterminate\" from the option menu. Verify that
the button visuals are correct for the \"Indeterminate\" state.
Verify that a message is printed indicating that the XmNvalueChangedCallback
was called for each of the toggle buttons except the \"One of Many\"
toggle. \"Indeterminate\" is not a valid state for the \"One of Many\"
indicator type.
#) Select the option \"Unset\" from the option menu. Verify that
the button visuals are correct for the \"Unset\" state.
Messages indicating that the XmNvalueChangedCallback was called should
again be printed for each of the toggle buttons.
C)
#) Click BSelect on the toggle labelled \"Toggle Indeterminate\". The toggle
mode is now set to \"Toggle Boolean\".
#) Select the option \"Set\" from the option menu. Verify that the toggle button
visuals are correct for the \"Set\" state. Verify that messages are printed to
the terminal window indicating that the XmNvalueChangedCallback has
been called for each of the toggle buttons.
#) Select the \"Indeterminate\" option from the menu. Since \"Indeterminate\"
is not a valid state when the toggle mode is Toggle Boolean, verify that there
is no visual change in the toggle button indicators and there are
no messages printed to the terminal window about XmNvalueChangedCallback.
#) Select the \"Unset\" option from the menu. Verify that the toggle button
visuals are correct for the \"Unset\" state. Verify that messages are
printed to the terminal window indicating that the XmNvalueChangedCallback has
been called for each of the toggle buttons.
C)
E)