# $XConsortium: ToggleBtn6.scr /main/4 1995/07/17 20:08:00 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 toggle button labelled \"Indicator Fill\" # is colored gray. The toggle buttons labelled \"Indicator CheckBox\" and # \"Indicator CrossBox\" should display empty boxes. CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 # #) Click BSelect on the push button labelled \"Select All\". # Verify that the indicator of the toggle button labelled \"Indicator Fill\" # displays the select color red. 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. LocatePointer PushB0 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 # #) Click BSelect on the push button labelled \"Deselect All\". Verify # that the indicator of toggle button labelled \"Indicator Fill\" now # displays the deselect color gray. Verify that the check marks and crosses # of the other toggle buttons are no longer displayed. LocatePointer PushB1 ClickMB Btn1 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 # C) Continue # #) Click BSelect on the toggle button labelled \"Fill On Select\". This sets # the XmNfillOnSelect resource to True. LocatePointer ToggleB1 ClickMB Btn1 # #) 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. LocatePointer PushB0 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 # #) 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. LocatePointer PushB1 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 # C) Continue # @) 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. CompareVisual Indicator6 CompareVisual Indicator7 # @) 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. LocatePointer PushB0 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) 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. LocatePointer PushB0 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) 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 colo, gray. 3-D buttons indicators # should be raised and displayed in the unselect color. Check marks and crosses # should no longer be displayed. LocatePointer PushB0 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # C) Continue # #) 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\". LocatePointer ToggleB1 ClickMB Btn1 # #) 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 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 since \"Indeterminate\" is not a valid # state for this indicator type. LocatePointer PushB0 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) 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 stippled, flat box. \"Indicator Cross\" should display a # stippled cross. # \"Indicator CrossBox\" should display a stippled cross and 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 since \"Indeterminate\" is not a valid # state for this indicator type. LocatePointer PushB0 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) 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. LocatePointer PushB0 ClickMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # C) Continue # @) 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. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB1 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) Select the option \"Indeterminate\" from the option menu. Verify that # the button visuals are correct for the \"Indeterminate\" state. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB2 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) Select the option \"Unset\" from the option menu. Verify that # the button visuals are correct for the \"Unset\" state. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB0 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # C) Continue # #) Click BSelect on the toggle labelled \"valueChangedCallback\". LocatePointer ToggleB2 ClickMB Btn1 # #) 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 terminal window indicating that the XmNvalueChangedCallback # has been called for each of the toggle buttons above the horizontal # separator. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB1 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) 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. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB2 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) 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. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB0 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # C) Continue # #) Click BSelect on the toggle labelled \"Toggle Indeterminate\". The toggle # mode is now set to \"Toggle Boolean\". LocatePointer ToggleB1 ClickMB Btn1 # #) 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. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB1 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) 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. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB2 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # #) 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. LocatePointer OptionMenu ROptionButton PressMB Btn1 LocatePointer OptionPB0 ReleaseMB Btn1 CompareVisual Indicator0 CompareVisual Indicator1 CompareVisual Indicator2 CompareVisual Indicator3 CompareVisual Indicator4 CompareVisual Indicator5 CompareVisual Indicator6 CompareVisual Indicator7 # C) Continue # E) Exit