# $XConsortium: List9.scr /main/5 1995/07/17 20:22:27 drk $
#
# Motif
#
# Copyright (c) 1987-2012, The Open Group. All rights reserved.
#
# These libraries and programs are free software; you can
# redistribute them and/or modify them under the terms of the GNU
# Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# These libraries and programs are distributed in the hope that
# they will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with these librararies and programs; if not, write
# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301 USA
#
#
# 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 <Ctrl> 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 <Ctrl> 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