# $XConsortium: ScrollList4.scr /main/5 1995/07/17 20:22:57 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: @(#)ScrollList4.scr 1.1 91/10/14 # A Scrolled List contained in a Form with 9 items should appear. The font # will be 9x15 (it will inherited from Form's XmNtextFontList resource), # there will be no scrollbars at this time. LocatePointer List1 RListItem 0 CompareVisual List1 # This test will test the new Xm functions XmListItemPos(), # XmListGetMatchPos(), and XmListGetSelectedPos(). # C) Continue # Two messages will be printed in the term window. The first will state # that Item5 is found in Position 5. The second will state # that Item0 cannot be found in the List. # C) Continue # Item1 will be added to the end of the List. This will cause a vertical # scrollbar to appear. LocatePointer List1 RListItem 0 CompareVisual List1 # C) Continue # Two messages will be printed in the term window. The first will state # that Item1 was found in 2 slots ( slots 1, 10, ). The second message # will state that there was no match for Item10 in the List # C) Continue # One message will be printed in the term window. It will state that # no items were found to be selected in the List. # Drag the Vertical scrollbar to the bottom. Another Item1 should # now be visible. LocatePointer List1 RVertScrollBarSlider DragSliderValue Down Max #) Select Item2, Item5, Item7, and Item1. LocatePointer List1 RListItem 0 ClickMB Btn1 LocatePointer List1 RListItem 3 ClickMB Btn1 LocatePointer List1 RListItem 5 ClickMB Btn1 LocatePointer List1 RListItem 8 ClickMB Btn1 CompareVisual List1 # C) Continue # A message should be printed in the term window stating that 4 items # were selected and they were Item2, Item5, Item7, and Item1. # C) Continue # The List should now have no itmes selected. CompareVisual List1 #) Select Items3, Item5, and Item1. LocatePointer List1 RListItem 1 ClickMB Btn1 LocatePointer List1 RListItem 3 ClickMB Btn1 LocatePointer List1 RListItem 8 ClickMB Btn1 # Move vertical slider all the way to the top and now select the 1st Item1. LocatePointer List1 RVertScrollBarSlider DragSliderValue Up Min LocatePointer List1 RListItem 0 ClickMB Btn1 # A message stating which items are selected should be printed in the # term window after each selection. This information is extracted via # Callback structures. CompareVisual List1 # C) Continue # SelectionPolicy has changed to EXTENDED_SELECT. # Select Item2 through Item4. LocatePointer List1 RListItem 1 DragComponent List1 RListItem 3 # A message stating which items are selected should again be printed in # the term window. CompareVisual List1 # C) Continue # List should scroll downwards to have the Item2 be the first item visible. CompareVisual List1 # C) Continue # All items in the List should now be visible. The selection mode should # be BROWSE_SELECT. CompareVisual List1 # A PushButton labeled \"Push To Delete Selected Item\" should appear. It # should be attached to the top of the Form. The List should be attached on the # top to the bottom of the PushButton. # Select Item5 from the List. LocatePointer List1 RListItem 3 ClickMB Btn1 # Press the PushButton. This should delete Item5 from the List, and the # highlight should be on Item4. LocatePointer Push1 ClickMB Btn1 # Click the Down Key. Item6 should get both the highlight and the selection. ClickKey KDown CompareVisual List1 # E) Exit