# $XConsortium: List2.scr /main/5 1995/07/17 20:21:38 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 # # OSF/Motif: @(#)List2.scr 1.2 91/10/11 # Screen 1 # This test will contain a form with three children, a Scrolled List, # a RowColumn with settable resources, and another RowColumn with # Callback Information. # The Scrolled List will contain 28 items, 18 which are initially # visible. It will have a background color of wheat. # The middle panel will contain scales, Option Menus, a Toggle Button, # and a PushButton. These widgets will control resources for the # Scrolled List. For instance to change the visibleItemCount of the # List you should move the scale to the value you wish and a SetValues() # will be performed on that resource. # The last PushButton in the middle panel (orchid background color) # will destroy and re-create the Scrolled List with the resource # values currently shown in the resource area. # The right side RowColumn contains callback information for the Scrolled # List. The Panel's background color will be cyan. The Panel will be updated # any time a callback has been called in the List. The panel will fill # in callback information conditionally on what the selection Policy is. # Fields that are not available for a certain selection Policy will be # marked as N/A. # Output to STDOUT will contain a DUMP of the entire heirarchy in this # test. WindowRaise Shell1 CompareVisual List1 CompareVisual RowCol2 # C) Continue # Screen 2 # Move the Top Item Position Scale to 28. The Scrolled List should have # one Item Visible ( (28) PanedWindow ). WindowRaise Shell1 LocatePointer TIP_Scale RScaleSlider DragSliderValue Right 28 # Now, change the Font via the Option Menu Available Fonts to variable. # The Scrolled List should change fonts to variable. LocatePointer Fonts_Option ROptionButton PressMB Btn1 LocatePointer Variable ReleaseMB Btn1 #) Only one Item ( (28) PanedWindow ) should be visible. CompareVisual List1 CompareVisual RowCol2 # C) Continue # Screen 3 # Press the Destroy and Recreate PushButton 3 times. The interface should # not change, and all attachments to the form should stay intact. WindowRaise Shell1 LocatePointer Destroy_Push ClickMB Btn1 CompareVisual List1 ClickMB Btn1 CompareVisual List1 ClickMB Btn1 CompareVisual List1 # C) Continue # Screen 4 # Move the Visible Item Count scale till it reads 10. The list should # now contain 10 items. WindowRaise Shell1 LocatePointer VIC_Scale RScaleSlider DragSliderValue Left 10 LocatePointer List1 RVertScrollBarSlider DragSliderValue Up Min CompareVisual List1 # Select Item4 (4) PushButton). LocatePointer List1 RListItem 3 ClickMB Btn1 CompareVisual List1 # Press KPageDown. The highlight should be on Item14 (14) Scale). ClickKey KPageDown CompareVisual List1 # Press KPageDown. The highlight should be on Item24 (24 ToggleButtonGadget). ClickKey KPageDown CompareVisual List1 #) Press KPageUp. The highlight should be on Item14 (14) Scale). ClickKey KPageUp CompareVisual List1 #) Press KPageUp. The highlight should be on Item4 (4) PushButton). ClickKey KPageUp CompareVisual List1 # C) Continue # Screen 5 # Scroll the List so that "1) DrawnButton" (item1) is the first item # in the list. WindowRaise Shell1 LocatePointer List1 RVertScrollBarSlider DragSliderValue Up Min # Select "1) DrawnButton" from the list. LocatePointer List1 RListItem 0 ClickMB Btn1 # Press KCopy. This should copy DrawnButton to the clipboard. ClickKey KCopy # Move to the Text widget (goldenrod in color) and press MB1. LocatePointer Text1 ClickMB Btn1 # Press KPaste. The string "1) DrawnButton" should be pasted into the # Text widget. ClickKey KPaste CompareVisual Text1 # C) Continue # Screen 6 # From the Selection Policy Option Menu select XmEXTENDED_SELECT, the # list should now be Extended mode. WindowRaise Shell1 LocatePointer SPolicy_Option ROptionButton PressMB Btn1 LocatePointer XmEXTENDED_SELECT ReleaseMB Btn1 CompareVisual List1 # Move the Visible Item Count scale till it reads 16. The list should # now contain 16 items. LocatePointer VIC_Scale RScaleSlider DragSliderValue Right 16 # Select "1) DrawnButton", "2) Label", and "3) List" from the list. LocatePointer List1 RListItem 0 DragComponent List1 RListItem 2 CompareVisual List1 # Press KCopy. All strings should be copied to the clipboard (separated # by newlines). ClickKey KCopy # Move to the Text widget (goldenrod in color) and press MB1. LocatePointer Text1 ClickMB Btn1 # Press KPaste. All strings should be copied to the Text widget (again # separated by newlines. ClickKey KPaste CompareVisual Text1 # Now select "6) ArrowButton", "7) ScrollBar", and "8) Text" using BToggle # (Btn1). These three items should be selected in addition to the # first three. LocatePointer List1 RListItem 5 PressMB Btn1 LocatePointer List1 RListItem 7 ReleaseMB Btn1 CompareVisual List1 # Now select "11) DrawnButton", "12) DrawingArea", and "13) ScrolledWindow" # using BToggle (Btn1). These three items should be selected in # addition to the six previously selected. LocatePointer List1 RListItem 10 PressMB Btn1 LocatePointer List1 RListItem 12 ReleaseMB Btn1 CompareVisual List1 # Now press BSelect on "15) Command" but don't release it. This item should # be selected and the others deselected. LocatePointer List1 RListItem 14 PressMB Btn1 CompareVisual List1 # Now press KCancel while still holding down BSelect. "15) Command" should # be deselected and the nine previously selected items should all be reselected ClickKey KCancel CompareVisual List1 ReleaseMB Btn1 Continue # Test to see if CR6117 is fixed. Does making the list insensitive # make the scrollbar insensitive also? It shouldn't if the bug is # fixed. WindowRaise Shell1 # Move scroll to top LocatePointer List1 RVertScrollBarSlider DragSliderValue Up Min # toggle sensitive button - insensitive LocatePointer ToggleSensitive ClickMB Btn1 LocatePointer List1 CompareVisual List1 # toggle sensitive button - sensitive LocatePointer ToggleSensitive ClickMB Btn1 Continue # Test to see if CR5740 is fixed. Does going to item 0 cause a warning # message. WindowRaise Shell1 LocatePointer TIP_Scale RScaleSlider DragSliderValue Left 0 LocatePointer List1 CompareVisual List1 # C) Continue # /* Begin CR 5678 */ #) Move the Top Item Position Scale to 12. LocatePointer TIP_Scale RScaleSlider DragSliderValue Right 12 # Now press and release BSelect on "15) Command" to select it. LocatePointer List1 RListItem 3 ClickMB Btn1 # Click KAddMode to toggle into add mode. Verify that no callback information # is printed to the terminal window with the reason XmCR_EXTENDED_SELECT. ClickKey KAddMode # /* End CR 5678 */ # C) Continue # From the String Direction Option Menu select "Right to Left". # The List widget should immediately update to show the strings drawn # from the right. # Now select "Left to Right." The List should immediately switch back to # showing the strings drawn from the left. LocatePointer Dirs_Option ROptionButton PressMB Btn1 LocatePointer Right_to_Left ReleaseMB Btn1 CompareVisual List1 LocatePointer Dirs_Option ROptionButton PressMB Btn1 LocatePointer Left_to_Right ReleaseMB Btn1 CompareVisual List1 # E) Exit