# $XConsortium: RowCol3a.scr /main/4 1995/07/17 20:28:32 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
# The RowColumn has been created as a child of a BulletinBoard widget.
# /* PIR 3192 */
# Verify that if XmNentryBorder has been set to a non-zero value and then
# subsequently gets set back to 0, the SetValues of 0 works. Do this by
# changing Button Label String to "new value" and pressing Return.
# Note that the client window will now contain a pushButton with "new
# value" as its label.
WindowFocus Popup
LocatePointer textf1
ClickMB Btn1
ClickKey Kn
ClickKey Ke
ClickKey Kw
ClickKey KSpace
ClickKey Kv
ClickKey Ka
ClickKey Kl
ClickKey Ku
ClickKey Ke
ClickKey KReturn
CompareVisual parent
# Now add several more children by moving the Number of Children slider
# to 5. The client window should now have 5 pushButton children.
# Change XmNentryBorder to be greater than zero by moving the
# slider next to it. The client window should reflect this change.
# Now move the slider back to zero. The client window should change so
# that XmNentryBorder is 0.
LocatePointer scale1 RScaleSlider
ClickMB Btn1
ClickKey KRight
ClickKey KRight
ClickKey KRight
ClickKey KRight
CompareVisual parent
LocatePointer entborscale RScaleSlider
DragSliderValue Right 2
CompareVisual parent
LocatePointer entborscale RScaleSlider
DragSliderValue Left 0
CompareVisual parent
Continue
# /* PIR 3193 */
# Verify that children can be added on-the-fly to the RowColumn and they
# actually appear where they are supposed to.
# Reset the RowColumn back to its initial state by using the Reset Panel
# pushButton. Use the Number of Children slider to create 2 additional
# children (set it to three). The RowColumn should grow in the vertical
# direction and two new pushbutton children, labeled 2 and 3 should appear.
LocatePointer Reset_Panel
ClickMB Btn1
LocatePointer scale1 RScaleSlider
ClickMB Btn1
DragSliderValue Right 3
CompareVisual parent
Continue
# /* PIR 3451, 3452 */
# Verify that the XmNentryBorder resource is functioning correctly.
# Reset the RowColumn back to its initial state by using the Reset Panel
# pushButton. Change the label of the button in the RowColumn to "New".
# Now change XmNentryBorder to 3. The border should be imposed correctly.
LocatePointer Reset_Panel
ClickMB Btn1
LocatePointer textf1
ClickMB Btn1
ClickKey Kn
ClickKey Ke
ClickKey Kw
ClickKey KReturn
LocatePointer entborscale RScaleSlider
DragSliderValue Right 3
CompareVisual parent
# Change XmNentryBorder to 0, which disables the feature. The entryBorder
# should disappear.
LocatePointer entborscale RScaleSlider
DragSliderValue Left 0
CompareVisual parent
# Incrementally increase the value of XmNentryBorder. Make sure that the
# border increases correctly. Now incrementally decrement XmNentryBorder.
# The entry border should be drawn correctly as it is being increased and
# decreased.
Continue
/* PIR 3453 */
# Verify that updating XmNorientation from HORIZONTAL to VERTICAL works.
# Reset the RowColumn back to its initial state by using the Reset Panel
# pushButton. Change the XmNorientation to be HORIZONTAL. Now change
# Number of Children to be 5. Change XmNmarginWidth, XmNmarginHeight
# and XmNspacing to be 5. The RowColumn should be displaying all of
# this appropriately.
# Now change XmNorientation to XmVERTICAL. The RowColumn should update
# correctly.
Continue
# /* PIR 3454 */
# Verify that on-the-fly changing of XmNpacking works.
# Reset the RowColumn back to its initial state by using the Reset Panel
# pushButton. Set XmNpacking to XmPACK_COLUMN and XmNnumColumns to 3.
# Set Number of Children to 6.
# The client RowColumn should display a 3 X 2 matrix, with 1, 3, and 5
# across the top row and 2, 4 and 6 across the bottom row.
# Change XmNpacking to XmPACK_TIGHT. Since the orientation is vertical,
# the RowColumn should display entries 1 through 6 in a vertical fashion,
# in one column.
Continue
# /* PIR 3459 */
# Verify that setting XmNwidth when XmNresizeWidth = True causes no
# change in the RowColumn.
# Reset the RowColumn back to its initial state by using the Reset Panel
# pushButton.
# Create several kids (like 11) of the rowColumn. Packing should be
# XmPACK_COLUMN, orientation should be XmVERTICAL. Set XmNnumColumns to
# 3.
# Specify an XmNwidth of 400. The right most children should not become
# clipped. Select one of the rightmost children. The term window should
# print the child's width and height. The width should not be 400.
Continue
# /* PIR 3464 */
# Verify PACK_TIGHT mode (XmNorientation = XmVERTICAL).
# Reset the RowColumn back to its initial state by using the Reset panel
# pushButton.
# Set XmNorientation to XmVERTICAL, XmNresizeHeight to False (or 'off'),
# XmNpacking to XmPACK_TIGHT, and XmNheight to 400. The RowColumn should
# become 400 pixels high.
# Set Number of Children to 14. The children should fit into the RowColumn.
# Now set Number of Children to 15. The RowColumn should place child 15
# in the next column, wrapping in the minor dimension.
Continue
# Verify PACK_TIGHT mode (XmNorientation = XmHORIZONTAL).
# Reset the RowColumn back to its initial state by using the Reset panel
# pushButton.
# Set XmNorientation to XmHORIZONTAL, XmNresizeWidth to False (or 'off'),
# XmNpacking to XmPACK_TIGHT, and XmNwidth to 400. The RowColumn should
# become 400 pixels wide.
# Set Number of Children to 16. The children should fit into the RowColumn.
# Now set Number of Children to 17. The RowColumn should place child 17
# in the next row, wrapping in the minor dimension.
Continue
Exit