Blob Blame History Raw
# $XConsortium: SelectBox1a.scr /main/4 1995/07/17 20:38:17 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

# #) A client with a SelectionBox will appear; the dialogTitle should
#    be MyDialogTitle. The SelectionBox should consist of the following items:
# !)
#      a) a list, labeled \"Pick a Test\", with twenty
#         items visible; the label should be aligned to
#         the right.
#      b) a scrollbar to the left of the list,
#      c) a selection text widget, labeled \"test:\",
#         below the list, and aligned to the right, and
#      d) four pushbuttons at the bottom, labeled
#         \"Help\", \"Cancel\", \"Apply\", and \"Ok\".
LocatePointer SelectionBox1
CompareVisual SelectionBox1

# C)

Continue

# #) Click MB1 on the item \"decor00\" in the list.  The selected item
#    should be highlighted, and \"decor00\" should appear in the
#    selection text widget \"test:\".
LocatePointer SelectionBox1 RSelectionListItem 18
ClickMB Btn1

CompareVisual SelectionBox1

# #) Click MB1 on the item \"func04\" in the list.   The selected item
#    should be highlighted, and \"func04\" should appear in the
#    selection text widget \"test:\".
LocatePointer SelectionBox1 RSelectionListItem 18
ClickMB Btn1

CompareVisual SelectionBox1

# #) Press and hold down MB1 on \"btest3\" in the list.  \"btest3
#    should be highlighted.  Drag the pointer down to \"decor07\".
#    The item under the pointer should always be highlighted.  Release
#    MB1.  \"decor07\" should appear in the selection text widget \"test:\".
LocatePointer SelectionBox1 RSelectionListItem 3
DragComponent SelectionBox1 RSelectionListItem 11

# #) Click MB1 on the \"OK\" button.  \"ok: decor07\" should appear in
#    the xterm window.
LocatePointer SelectionBox1 ROkButton
ClickMB Btn1

# C)

Continue

# #) Move the client window.  Iconify the client window.  Normalize
#    the client window.  Resize the client window.
WindowMove SelectionBox1 50 50
WindowIconify Shell1
WindowDeiconify Shell1

# #) Move the pointer into the \"test:\" selection text widget.  Press
#    the backspace key repeatedly to remove \"decor07\" from the
#    \"test:\" selection text widget.  Press and hold down MB1 on the
#    bottom arrow of the scrollbar.  The slider should move down and
#    the list should scroll.  Release MB1.  Press and hold down MB1 on
#    the scrollbar slider.  Drag the slider to the bottom of the
#    scrollbar.  The list should scroll.  Release MB1.
LocatePointer SelectionBox1 RSelectionText
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey KBackSpace

LocatePointer SelectionBox1 RSelectListVertScrollBarDownArrow
ClickMB Btn1
ClickMB Btn1
ClickMB Btn1
ClickMB Btn1

LocatePointer SelectionBox1 RSelectListVertScrollBarSlider
DragSliderValue Down Max

CompareVisual SelectionBox1

# #) Move the pointer into the \"test:\" selection text widget.  Type
#    \"pitest1\".  Click MB1 on the \"OK\" button.  \"ok: pitest1
#    should appear in the xterm window.  Double click MB1 on \"parse00\"
#    in the list.  \"parse00\" should be highlighted, and \"parse00\"
#    should appear in the \"test:\" selection text widget.  \"ok: parse00\"
#    should also appear in the xterm window.
LocatePointer SelectionBox1 RSelectionText
ClickMB Btn1
InputString "pitest1"
LocatePointer SelectionBox1 ROkButton
ClickMB Btn1

CompareVisual SelectionBox1

LocatePointer SelectionBox1 RSelectionListItem 8
ClickMB Btn1 2

CompareVisual SelectionBox1

# C)

Continue

# #) Move the pointer into the client window.  Press the backspace key
#    once.  Type \"3\".  Press the return key.  \"ok: parse03\" should
#    appear in the xterm window.
LocatePointer SelectionBox1 RSelectionText
ClickMB Btn1
ClickKey KBackSpace
ClickKey K3
ClickKey KReturn

CompareVisual SelectionBox1

# #) Press and hold down MB1 on the \"OK\" button.  The button should
#    appear pressed in.  Drag the pointer off of the \"OK\" button.
#    The button should appear popped out.  Release MB1.
LocatePointer SelectionBox1 ROkButton
PressMB Btn1
LocatePointer SelectionBox1 Off
ReleaseMB Btn1

CompareVisual SelectionBox1

# #) Click MB1 on the \"Apply\" button.  \"apply: parse03\" should
#    appear in the xterm window.
LocatePointer SelectionBox1 RApplyButton
ClickMB Btn1

CompareVisual SelectionBox1

# #) Click MB1 on the \"Cancel\" button.  \"cancel: parse03\" should
#    appear in the xterm window.
LocatePointer SelectionBox1 RCancelButton
ClickMB Btn1

CompareVisual SelectionBox1

# #) Click MB1 on the \"Help\" button.
LocatePointer SelectionBox1 RHelpButton
ClickMB Btn1

CompareVisual SelectionBox1

# C)

Continue

# #) Move the pointer into the \"test:\" selection text widget.  Press
#    the backspace key twice.  Type \"25\".  Click MB1 on the \"OK
#    button.  \"noMatch: parse25\" should appear in the xterm window.
LocatePointer SelectionBox1 RSelectionText
ClickMB Btn1
ClickKey KBackSpace
ClickKey KBackSpace
ClickKey K2
ClickKey K5
LocatePointer SelectionBox1 ROkButton
ClickMB Btn1

CompareVisual SelectionBox1

# #) Move pointer out of the client window.  Press and hold down MB1.
#    Move pointer back into the client window.  Move the pointer out
#    of the client window.  Release MB1.
LocatePointer SelectionBox1 Off
PressMB Btn1
LocatePointer SelectionBox1
LocatePointer SelectionBox1 Off
ReleaseMB Btn1

CompareVisual SelectionBox1
# C)

Continue

# #) The InstructionBox's help button will now become sensitive and will
#    be labeled \"Measure\".
# #) Press the Measure button. A new dialog appears which allows
#    you to examine the relationship between textColumns and width.
#    Everytime the dialog pops up, the values displayed
#    are the current values for those resources of the SelectionBox.
LocatePointer InstructionBox RHelpButton
ClickMB Btn1

LocatePointer ScaleWidth RScaleSlider
DragSliderValue Right 300

LocatePointer ScaleColumns RScaleSlider
DragSliderValue Right 50

LocatePointer ScaleOK
ClickMB Btn1

CompareVisual SelectionBox1

# #) Try setting the width larger and smaller, pressing OK to actually
#    apply the change.
LocatePointer InstructionBox RHelpButton
ClickMB Btn1

LocatePointer ScaleWidth RScaleSlider
DragSliderValue Right 450

LocatePointer ScaleColumns RScaleSlider
DragSliderValue Right 60

LocatePointer ScaleOK
ClickMB Btn1

CompareVisual SelectionBox1

# #) Now set the number of columns larger and smaller.
LocatePointer InstructionBox RHelpButton
ClickMB Btn1

LocatePointer ScaleWidth RScaleSlider
DragSliderValue Left 250

LocatePointer ScaleColumns RScaleSlider
DragSliderValue Left 15

LocatePointer ScaleOK
ClickMB Btn1

CompareVisual SelectionBox1

# C)

Continue

# #) The text area of the selection box has been unmanaged.
CompareVisual SelectionBox1

# #) Try changing width and textColumns again.
LocatePointer InstructionBox RHelpButton
ClickMB Btn1

LocatePointer ScaleWidth RScaleSlider
DragSliderValue Left 200

LocatePointer ScaleColumns RScaleSlider
DragSliderValue Right 50

LocatePointer ScaleOK
ClickMB Btn1

CompareVisual SelectionBox1

# #) If you click on any of the buttons in the SelectionBox, that button will be
#    unmanaged. Unmanage each button in turn and observe the
#    effect on width and textColumns.

LocatePointer SelectionBox1  ROkButton
ClickMB Btn1
CompareVisual SelectionBox1

LocatePointer SelectionBox1  RCancelButton
ClickMB Btn1
CompareVisual SelectionBox1

LocatePointer SelectionBox1  RApplyButton
ClickMB Btn1
CompareVisual SelectionBox1

LocatePointer SelectionBox1  RHelpButton
ClickMB Btn1
CompareVisual SelectionBox1

# E)

Exit