# $XConsortium: List9.scr /main/5 1995/07/17 20:22:27 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: @(#)List9.scr 1.2 91/10/25 # Testing XmList functions XmListGetKbdItemPos(), XmListSetKbdItemPos(), # and XmListPosSelected(). WindowRaise Shell1 LocatePointer List2 RListItem 0 CompareVisual List2 # Move the position scale so that it reads 0. LocatePointer Scale RScaleSlider DragSliderValue Right 0 # Select XmListPosSelected() from the Functions List. LocatePointer List1 RListItem 2 ClickMB Btn1 # Press the Call Function PushButton. The Label beneath the Functions # list should state that Positon 0 is not selected. LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # Select Item10 from the Action List. LocatePointer List2 RListItem 9 ClickMB Btn1 # Move the position scale so that it reads 10 LocatePointer Scale RScaleSlider DragSliderValue Right 10 # Press the Call Function PushButton. The Label beneath the Functions # list should state that Positon 10 is selected. LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # Move the position scale so that it reads 16. LocatePointer Scale RScaleSlider DragSliderValue Right 16 # Press the Call Function PushButton. The Label beneath the Functions # list should state that Positon 16 is not selected. LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # C) Continue WindowRaise Shell1 LocatePointer ClearB ClickMB Btn1 # Select XmListSetKbdItemPos() from the Functions List. LocatePointer List1 RListItem 1 ClickMB Btn1 # Move the position scale so that it reads 8. LocatePointer Scale RScaleSlider DragSliderValue Left 8 # Press the Call Function PushButton. Item8 should be seleted and if # you tab to the List, Item8 will have the highlight. LocatePointer ApplyB ClickMB Btn1 ClickKey KTab CompareVisual List2 # Select XmListGetKbdItemPos() from the Functions List. LocatePointer List1 RListItem 0 ClickMB Btn1 # Press the Call Function PushButton. The Label beneath the Functions # list should state that Keyboard Position is 8. LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # Try selecting setting the keyboard position via XmListSetKbdItemPos() # and retreiving the value of the selected position via # XmListGetKbdItemPos() with other positions. LocatePointer List1 RListItem 1 ClickMB Btn1 LocatePointer Scale RScaleSlider DragSliderValue Left 4 LocatePointer ApplyB ClickMB Btn1 ClickKey KTab CompareVisual List2 LocatePointer List1 RListItem 0 ClickMB Btn1 LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # Try changing the Selection Policy (via the RadioBox) and testing # interactions in different modes. LocatePointer XmMULTIPLE_SELECT ClickMB Btn1 LocatePointer List1 RListItem 1 ClickMB Btn1 LocatePointer Scale RScaleSlider DragSliderValue Right 7 LocatePointer ApplyB ClickMB Btn1 ClickKey KTab CompareVisual List2 LocatePointer List1 RListItem 0 ClickMB Btn1 LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position LocatePointer XmSINGLE_SELECT ClickMB Btn1 LocatePointer List1 RListItem 1 ClickMB Btn1 LocatePointer Scale RScaleSlider DragSliderValue Left 3 LocatePointer ApplyB ClickMB Btn1 ClickKey KTab CompareVisual List2 LocatePointer List1 RListItem 0 ClickMB Btn1 LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # Move in Extended Selection mode, and try interactions in and out # of Add Mode (can Toggle with List AddMode toggle button or Shift F8 # in the Action List). LocatePointer Toggle_AddMode ClickMB Btn1 LocatePointer XmEXTENDED_SELECT ClickMB Btn1 LocatePointer List1 RListItem 1 ClickMB Btn1 LocatePointer Scale RScaleSlider DragSliderValue Left 1 LocatePointer ApplyB ClickMB Btn1 ClickKey KTab CompareVisual List2 LocatePointer List1 RListItem 0 ClickMB Btn1 LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # C) Continue WindowRaise Shell1 # Select XmListPosToBounds() from the Functions List. LocatePointer List1 RListItem 2 ClickMB Btn1 # Move the position scale so that it reads 0. LocatePointer Scale RScaleSlider DragSliderValue Left 0 # Press the Call Function PushButton. The Label beneath the Functions # list should state that Position 0 is not visible. LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # Move the position scale so that it reads 5 LocatePointer Scale RScaleSlider DragSliderValue Right 5 # Press the Call Function PushButton. The Label beneath the Functions # list should list the bounding box for Position 5. LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # Move the position scale so that it reads 0. LocatePointer Scale RScaleSlider DragSliderValue Left 0 # Scroll the Action List so that Item15 is visible. LocatePointer List2 RListItem Max # Press the Call Function PushButton. The Label beneath the Functions # list should list the bounding box for Position 0 (Item15). LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # C) # @) This is the test for OSF CR 5676 Continue WindowRaise Shell1 # Stay in Extended Selection mode. LocatePointer XmEXTENDED_SELECT ClickMB Btn1 # Select items 4 through 8 by clicking on item 4 and dragging to item 8 LocatePointer List2 RListItem 3 DragComponent List2 RListItem 7 # Then toggle select by pressing Ctrl-Btn1 on item 3 and dragging to item 10, # but don't release the mouse button yet. Items 3, 9 and 10 have now been # toggled to on. LocatePointer List2 RListItem 2 DragComponent List2 RListItem 9 Btn1 CompareVisual List2 # Without releasing the mouse on item 10, drag back to item 3 and then release. # Items 9 and 10 should have correctly been reverted back to an unselected # state. But items 4 through 8 should remain selected. If not, the # test for OSF CR 5676 fails. DragComponent List2 RListItem 2 Btn1 CompareVisual List2 # @) End of the test for OSF CR 5676 # C) Continue WindowRaise Shell1 # All items should be deleted. LocatePointer List2 CompareVisual List2 # Select XmListGetKbdItemPos() from the Functions List. LocatePointer List1 RListItem 0 ClickMB Btn1 # Press the Call Function PushButton. The Label beneath the Functions # list should state that Keyboard Position is 0. LocatePointer ApplyB ClickMB Btn1 LocatePointer Label_Position CompareVisual Label_Position # E) Exit