# $XConsortium: List1.scr /main/5 1995/07/17 20:21:07 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: @(#)List1.scr 1.2 91/10/11
# Screen 1
# A client with a list should appear. The list's background should
# be white and there should be 9 items in the it.
CompareVisual List1
# Click on one item in the list. The item should highlight
# (reverse colors) and a message should be printed in the term window.
LocatePointer List1 RListItem 0
ClickMB Btn1
CompareVisual List1
# Click on another item. The item should highlight and another message
# should appear in the term window.
LocatePointer List1 RListItem 4
ClickMB Btn1
CompareVisual List1
# Continue to have the window change size and selection mode
# become MULTIPLE_SELECT.
# C)
Continue
# Screen 2
# Click on several items in the list. The items should become
# highlighted and a message should appear after every selection.
LocatePointer List1 RListItem 0
ClickMB Btn1
LocatePointer List1 RListItem 2
ClickMB Btn1
LocatePointer List1 RListItem 4
ClickMB Btn1
LocatePointer List1 RListItem 6
ClickMB Btn1
CompareVisual List1
# Continue to have selection mode become BROWSE_SELECT.
# C)
Continue
# Screen 3
# Browse select an item (press and hold MB1, drag pointer
# through selections, then release on desired item). The highlight should
# follow the pointer through the list and stay on the selected item.
LocatePointer List1 RListItem 0
DragComponent List1 RListItem 4
CompareVisual List1
LocatePointer List1 RListItem 3
DragComponent List1 RListItem 6
CompareVisual List1
# Resize the client window.
WindowResize List1 East 250
# Move the client window.
WindowMove List1 100 100
# Iconify the client window.
WindowIconify List1
# Normalize the client window.
WindowDeiconify List1
# Continue to have selection mode become EXTENDED_SELECT.
# C)
Continue
# Screen 4
# Drag select first three items (move pointer to first item,
# press and hold MB1 and drag pointer through the first three items,
# then release MB1). The first three items should be highlighted
# and a message should appear in the term window.
LocatePointer List1 RListItem 0
DragComponent List1 RListItem 2
CompareVisual List1
# Drag select the last three items. The first three items should
# become unselected and the last three should be highlighted. A message
# should appear in the term window.
LocatePointer List1 RListItem 6
DragComponent List1 RListItem 8
CompareVisual List1
# Unselect all items (press and hold <ctrl> key and MB1 and drag pointer
# across all selected items). No items should be highlighted.
LocatePointer List1 RListItem 6
DragComponent List1 RListItem 8 <Ctrl> Btn1
CompareVisual List1
# Select item one (move pointer to first item and click MB1). The first
# item should be highlighted and a message should appear.
LocatePointer List1 RListItem 0
ClickMB Btn1
CompareVisual List1
# Move pointer to the fourth item, press and hold <shift> key and click MB1.
# Items one through four should become selected and a message should appear.
LocatePointer List1 RListItem 3
ClickMB <Shift> Btn1
CompareVisual List1
# Move the pointer to the sixth item, press and hold <ctrl> key and click MB1.
# Item six should be added to items selected and a message should appear.
LocatePointer List1 RListItem 5
ClickMB <Ctrl> Btn1
CompareVisual List1
# Unselect all items (press and hold <ctrl> key and MB1 and drag the pointer
# across all items). No item should be highlighted and a message should
# appear.
LocatePointer List1 RListItem 0
DragComponent List1 RListItem Max <Ctrl> Btn1
CompareVisual List1
# C)
Continue
# Screen 5
# There should be five visible items in the list and the selection mode
# should be SINGLE_SELECT.
CompareVisual List1
# Move the pointer into the client window. The first item should be
# outlined by a dashed black box 1 pixel wide.
LocatePointer List1 RListItem 0
# Press the down arrow key. The highlight should move downwards in the list
# with each press of the down arrow key.
ClickKey KDown
ClickKey KDown
ClickKey KDown
CompareVisual List1
# Press the space bar in the client window. The item currently being
# outlined should be selected but NO information should be printed
# in the term window.
ClickKey KSpace
CompareVisual List1
# Select item \"List\". The item should highlight but NO information should
# be printed in the term window.
LocatePointer List1 RListItem 2
ClickMB Btn1
CompareVisual List1
# C)
Continue
# Screen 6
# Item \"List\" should now be replaced with item \"NEWList\". Information
# will be printed in the term window stating that the SelectedItemCount is 1
# and that the SelectedItems is \"List\".
CompareVisual List1
# Select any item in the List.
LocatePointer List1 RListItem 1
ClickMB Btn1
CompareVisual List1
# C)
Continue
# Screen 7
# A Message should be printed to the term window that the SelectedItemCount
# is 0 and the SelectedItems are NULL.
# The List should now contain only one item (Same Item).
CompareVisual List1
# Select this item.
LocatePointer List1 RListItem 0
ClickMB Btn1
# C)
Continue
# Screen 8
# The selectedItemPos array will be printed to STDOUT. It should contain
# 10 items (1 - 10).
# The selectedItemCount will be printed to STDOUT. It should be 1.
LocatePointer List1
CompareVisual List1
# Deselect all the items by hitting <ctrl> \ (backslash).
ClickKey <Ctrl> KBackSlash
LocatePointer List1
CompareVisual List1
Continue
# Two messages should appear on STDOUT.
# The first one should say "No Selected Items".
# The second one should say "Position count from XmListGetSelectedPos = 0".
# If the second message shows a non-zero value, CR5228 has not been fixed.
# C)
Continue
# Screen 9
# The List should now be set insensitive.
LocatePointer List1 RListItem 0
ClickMB Btn1
CompareVisual List1
Continue
# Begin testing CR 5833.
# The List should now be sensitive.
# The selection mode should be SINGLE_SELECT.
# If any two items appear to be selected, 5833 has not been fixed.
LocatePointer List1
CompareVisual List1
# Done testing CR 5833.
# E)
Exit