# $XConsortium: ScrollList1.scr /main/5 1995/07/17 20:22:33 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: @(#)ScrollList1.scr 1.2 91/11/05
# A client with a scrolled list should appear. The list should have
# a white background and should have 20 items visible.
LocatePointer List1 RListItem 0
CompareVisual List1
# Press and hold MB1 on scrollbar slider and drag pointer up
# and down to scroll through the list.
LocatePointer List1 RVertScrollBarSlider
DragSliderValue Down Max
CompareVisual List1
LocatePointer List1 RVertScrollBarSlider
DragSliderValue Up Min
CompareVisual List1
# Click on one item in the list. The item should be highlighted
# and a message should appear in the term window.
LocatePointer List1 RListItem 3
ClickMB Btn1
CompareVisual List1
# Click on another item. The same characteristics should apply.
LocatePointer List1 RListItem 10
ClickMB Btn1
CompareVisual List1
# Continue to have selection mode become MULTIPLE_SELECT.
# C)
Continue
# Click on several items in the list. All items selected should
# be highlighted and a message should appear after each selection.
LocatePointer List1 RListItem 2
ClickMB Btn1
LocatePointer List1 RListItem 4
ClickMB Btn1
LocatePointer List1 RListItem 6
ClickMB Btn1
LocatePointer List1 RListItem 8
ClickMB Btn1
CompareVisual List1
# Click on a highlighted item. The item should be unselected
# and a message should appear.
LocatePointer List1 RListItem 2
ClickMB Btn1
CompareVisual List1
# Continue to have selection mode become BROWSE_SELECT.
# C)
Continue
# 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 10
DragComponent List1 RListItem 15
CompareVisual List1
# Press and hold MB1 in the client window. Drag the pointer
# outside of the client window to the left or the right.
# Drag the pointer up and down, the selection should follow the
# pointer. Drag the pointer below the client window, the list
# should scroll down if not at the end. Release MB1.
LocatePointer List1 RListItem 9
PressMB Btn1
LocatePointer List1 Right
LocatePointer List1 RVertScrollBarUpArrow
LocatePointer List1 Right
LocatePointer List1 RVertScrollBarDownArrow
LocatePointer List1 Right
ReleaseMB Btn1
# Continue to have selection mode become EXTENDED_SELECT.
# C)
Continue
# Drag select first three items (move pointer to first item, press
# and hold on 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
# 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 0
DragComponent List1 RListItem 2 <Ctrl> Btn1
CompareVisual List1
# Select an item (move pointer to desired item and click MB1).
# The selected item should be highlighted and a message should appear.
LocatePointer List1 RListItem 9
ClickMB Btn1
# Move pointer to the another item, press and hold <shift> key and click MB1.
# All items between these items selected should become selected and
# a message should appear.
LocatePointer List1 RListItem 13
ClickMB <Shift> Btn1
CompareVisual List1
# Move the pointer to the another item, press and hold <ctrl> key and click
# MB1. The selected item should be added to the items selected
# and a message should appear.
LocatePointer List1 RListItem 16
ClickMB <Ctrl> Btn1
LocatePointer List1 RListItem 18
ClickMB <Ctrl> Btn1
CompareVisual List1
# Unselect all items (press and hold <ctrl> key, and MB1 and drag
# the pointer across all selected items). No items should be highlighted and
# a message should appear.
LocatePointer List1 RListItem 9
DragComponent List1 RListItem 18 <Ctrl> Btn1
CompareVisual List1
# Add test to test CR5080
# C)
# Move the list down one position by clicking once on the down arrow of
# the vertical scroll bar. Item "btest1b" must be the first visible item.
# Double click on any visible list entry.
# This should not result in a core dump. But, the vertical scrollbar
# should disappear and only the first 20 items must be visible.
Continue
LocatePointer List1 RVertScrollBarDownArrow
ClickMB Btn1
CompareVisual List1
LocatePointer List1 RListItem 10
ClickMB Btn1 2
CompareVisual List1
# E)
Exit