/* $XConsortium: ToggleBtn6.dat /main/4 1995/07/17 10:09:08 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 */ @) 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)