Blob Blame History Raw
# $TOG: Form1a.scr /main/5 1999/02/03 17:42:10 jff $
# 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

# Try the following steps.
# Only Child1 is visible.

CompareVisual form


# Attach the TOP edge of Child2 to WIDGET. Child2 appears below Child1.

LocatePointer sides0
ClickMB Btn1
LocatePointer attaches3
ClickMB Btn1
LocatePointer button2
ClickMB Btn1
CompareVisual form


# Attach the RIGHT edge of Child2 to FORM. Child2 resizes to the size of
# the Form.

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches1
ClickMB Btn1
LocatePointer button2
ClickMB Btn1
CompareVisual form


# Attach the RIGHT edge of Child2 to WIDGET. Child2 disappears.

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches3
ClickMB Btn1
LocatePointer button2
ClickMB Btn1
CompareVisual form


# Attach the RIGHT edge of Child2 to OPPOSITE_WIDGET. Child2 reappears the
# same size as Child1.

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches4
ClickMB Btn1
LocatePointer button2
ClickMB Btn1
CompareVisual form


# Attach the RIGHT edge of Child1 to FORM. The edge of Child2, which is
# attached to the right edge of Child1, should resize with it.

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches1
ClickMB Btn1
LocatePointer button1
ClickMB Btn1
CompareVisual form


# Attach the RIGHT edge of Child1 to POSITION-6.  The Form should resize
# larger so that the buttons fill 60% of the form.

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches5
ClickMB Btn1
LocatePointer positionScale RScaleSlider
DragSliderValue Right 6
LocatePointer button1
ClickMB Btn1
CompareVisual form
Continue

# Attach the RIGHT edge of CHILD2 to SELF. Note that the corresponding label
# in the bottom pane shows "ATTACH_POSITION".

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches6
ClickMB Btn1
LocatePointer button2
ClickMB Btn1
CompareVisual form


# Attach the RIGHT edge of BUTTON1 to FORM. The edges of the two buttons are
# no longer attached, so PushButton2 should NOT resize.

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches1
ClickMB Btn1
LocatePointer button1
ClickMB Btn1
CompareVisual form



# Attach the LEFT edge of BUTTON1 to WIDGET. The form will resize very 
# small and a warning about circular attachments will appear.

LocatePointer sides2
ClickMB Btn1
LocatePointer attaches3
ClickMB Btn1
LocatePointer button1
ClickMB Btn1
CompareVisual form


# Attach the LEFT edge of BUTTON1 to FORM. The form resizes so the buttons
# are visible.

LocatePointer sides2
ClickMB Btn1
LocatePointer attaches1
ClickMB Btn1
LocatePointer button1
ClickMB Btn1
CompareVisual form


# Attach the RIGHT edge of BUTTON2 to POSITION-4. The form grows and Push
# Button1 continues to fill the form left-to-right.

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches5
ClickMB Btn1
LocatePointer positionScale RScaleSlider
DragSliderValue Left 4
LocatePointer button2
ClickMB Btn1
CompareVisual form
Continue

# Error Conditions.
# Attach the BOTTOM of BUTTON1 to ATTACH_WIDGET.
# In stdout, you should see an error message.
# Use the two CLEAR buttons to reset both buttons.

LocatePointer sides1
ClickMB Btn1
LocatePointer attaches3
ClickMB Btn1
LocatePointer button1
ClickMB Btn1
CompareVisual form
LocatePointer clear1
ClickMB Btn1
LocatePointer clear2
ClickMB Btn1


# Attach the BOTTOM of BUTTON1 to POSITION-8. Child2 is not visible and
# the form will grow slightly.

LocatePointer sides1
ClickMB Btn1
LocatePointer attaches5
ClickMB Btn1
LocatePointer positionScale RScaleSlider
DragSliderValue Right 8
LocatePointer button1
ClickMB Btn1
CompareVisual form


# More error conditions.
# Attach LEFT edge of BUTTON2 to WIDGET. Child2 appears to the right of
# Child1.

LocatePointer sides2
ClickMB Btn1
LocatePointer attaches3
ClickMB Btn1
LocatePointer button2
ClickMB Btn1
CompareVisual form


# Attach RIGHT edge of BUTTON2 to WIDGET.

LocatePointer sides3
ClickMB Btn1
LocatePointer attaches3
ClickMB Btn1
LocatePointer button2
ClickMB Btn1


# This is an impossible case to render, so Button2 will disappear and
# the following message appears in stdout:
#  Warning: 
#    Name: form
#    Class: XmForm
#    Circular dependency in Form children.

CompareVisual form

# Use the CLEAR buttons to reset. 

LocatePointer clear1
ClickMB Btn1
LocatePointer clear2
ClickMB Btn1
Continue


# Experiment for awhile

CompareVisual form
Exit