Blob Blame History Raw
# $TOG: ComboBox3c.scr /main/5 1998/02/05 10:27:45 csn $
#
# 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 DROP_DOWN_LIST ComboBox will appear on your screen along with a
#  control panel with which you can set and get various resources of
#  the ComboBox.
#  Click MB1 on the downward pointing arrow of the ComboBox widget
#  to post the drop down List.
#  The list should contain 10 items. Six items should be visible.
#  Scroll through the list until you come to the "Wallaby" item. Select it.
#  \"Wallaby\" should now be displayed in the ComboBox Text field.

CompareVisual ComboBox
LocatePointer ComboBox RComboBoxDropDownButton
ClickMB Btn1
CompareVisual ComboBox
LocatePointer List RVertScrollBarDownArrow
ClickMB Btn1 4
CompareVisual ComboBox
LocatePointer List RListItem 9
ClickMB Btn1
CompareVisual ComboBox
Continue

# Set the value of the "Highlight Thickness" scale to 50.
# Select "Set Highlight Thickness" from the "Set ComboBox Values" menu.
# The thickness of the highlighting rectangle around the ComboBox should
# be set to 50 pixels.
#
LocatePointer ComboScale0 RScaleSlider
DragSliderValue Right 50
LocatePointer ComboCascade1
PressMB Btn1
LocatePointer ComboSetPB0
ReleaseMB Btn1
LocatePointer ComboBox
CompareVisual ComboBox
Continue

#  Set the value of the "Arrow Size" scale to 25.
#  Select "Set Arrow Size" from the "Set ComboBox Values" menu.
#  The width of the arrow should be set to 25 pixels.
#  Set the value of the "Arrow Spacing" scale to 25.
#  Select "Set Arrow Spacing" from the "Set ComboBox Values" menu.
#  The space between the Text widget and the arrow should be set to 25 
#  pixels.

LocatePointer ComboScale1 RScaleSlider
DragSliderValue Right 25
LocatePointer ComboCascade1
PressMB Btn1
LocatePointer ComboSetPB1
ReleaseMB Btn1
CompareVisual ComboBox

LocatePointer ComboScale2 RScaleSlider
DragSliderValue Right 25
LocatePointer ComboCascade1
PressMB Btn1
LocatePointer ComboSetPB2
ReleaseMB Btn1
CompareVisual ComboBox

Continue

#  Set the value of the "Margin Width" scale to 50.
#  Select "Set Margin Width" from the "Set ComboBox Values" menu.
#  The horizontal spacing between the ComboBox and its children should be set
#  to 50 pixels.
#  Set the value of the "Set Margin Height" scale to 50.
#  Select "Set Margin Height" from the "Set ComboBox Values" menu.
#  The vertical spacing between the ComboBox and its children should be set
#  to 50 pixels.



LocatePointer ComboScale3 RScaleSlider
DragSliderValue Right 50
LocatePointer ComboCascade1
PressMB Btn1
LocatePointer ComboSetPB3 
ReleaseMB Btn1
CompareVisual ComboBox

LocatePointer ComboScale4 RScaleSlider
DragSliderValue Right 50
LocatePointer ComboCascade1
PressMB Btn1
LocatePointer ComboSetPB4
ReleaseMB Btn1
CompareVisual ComboBox

Continue


#  Post the "Set Font" menu.
#  Select each of the available fonts. 
#  The font in the List should change to the selected font. If
#  the ComboBox is of type COMBO_BOX or DROP_DOWN_COMBO_BOX, type
#  in the Text widget. The font should be what was selected.

LocatePointer FontCascade1
PressMB Btn1
LocatePointer FontPB0
ReleaseMB Btn1
CompareVisual ComboBox

LocatePointer ComboBox RComboBoxDropDownButton
PressMB Btn1
CompareVisual List
ReleaseMB Btn1

LocatePointer FontCascade1
PressMB Btn1
LocatePointer FontPB1
ReleaseMB Btn1
CompareVisual ComboBox

LocatePointer ComboBox RComboBoxDropDownButton
PressMB Btn1
CompareVisual List
ReleaseMB Btn1

LocatePointer FontCascade1
PressMB Btn1
LocatePointer FontPB2
ReleaseMB Btn1
CompareVisual ComboBox

LocatePointer ComboBox RComboBoxDropDownButton
PressMB Btn1
CompareVisual List
ReleaseMB Btn1

LocatePointer FontCascade1
PressMB Btn1
LocatePointer FontPB3
ReleaseMB Btn1
CompareVisual ComboBox

LocatePointer ComboBox RComboBoxDropDownButton
PressMB Btn1
CompareVisual List
ReleaseMB Btn1

Continue

#  Set the value of the "Selected Position" scale to 3.
#  Select "Set Selected Position" from the "Set ComboBox Values" menu.
#  The 3rd item of the list should be selected.
#  There will be a message in the term window indicating the the 
#  selectionCallback has been called. The reason should be XmCR_SELECT.
#  Click on an item in the list. The selection callback should be invoked.
#  The name of the item should appear in the Text field.
#  Type "Kangaroo" into the Text field. The selectionCallback should
#  be invoked.

LocatePointer ComboScale5 RScaleSlider
DragSliderValue Right 3
LocatePointer ComboCascade1
PressMB Btn1
LocatePointer ComboSetPB6
ReleaseMB Btn1
CompareVisual ComboBox

LocatePointer ComboBox RComboBoxDropDownButton
PressMB Btn1
CompareVisual List
ReleaseMB Btn1

LocatePointer List RListItem 2
ClickMB Btn1
CompareVisual ComboBox

LocatePointer ComboBox RComboBoxDropDownButton
PressMB Btn1
CompareVisual List
ReleaseMB Btn1

Continue

# Set matchBehavior to QUICK_NAVIGATE.
# Select "Set Match Behavior" from the "Set ComboBox Values" menu.
# Post the List of the ComboBox by clicking MB1 on the downward pointing
# arrow.
# Type "W" in the Text widget.
# The "Watermelon" item should be displayed in the Text Field and
# become highlighted in the List.
# Type "W" again.
# The "Wallaby" item should now be displayed in the Text Field
# and should be highlighted in the List.

LocatePointer ToggleMatch1
ClickMB Btn1
LocatePointer ComboCascade1
PressMB Btn1
LocatePointer ComboSetPB5
ReleaseMB Btn1
LocatePointer ComboBox RComboBoxDropDownButton
ClickMB Btn1
LocatePointer List
ClickKey <Shift> Kw 
CompareVisual Text
CompareVisual List
ClickKey <Shift> Kw 
CompareVisual Text
CompareVisual List

Continue
Exit