# $XConsortium: RIDrawArea1a.scr /main/4 1995/07/17 20:35:13 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
#
# Original History:
# Revision 1.2.4.3 1993/09/21 21:08:44 yak
# Removed blocks ifdef'ed by MOTIF1_1.
# And removed #ifdef and #endif lines for MOTIF1_2. CR 6418
# [1993/09/21 20:52:45 yak]
#
# Revision 1.2.4.2 1993/08/19 13:31:08 yak
# Expanded copyright marker
# [1993/07/30 19:27:23 yak]
#
# Revision 1.2.2.3 1992/04/20 19:23:16 qauser
# Out of sync number of Continues.
# [1992/04/20 19:22:55 qauser]
#
# Revision 1.2.2.2 1992/03/26 14:59:12 libby
# PIR 4502, correct behavior
# [1992/03/26 14:58:09 libby]
#
# Revision 1.2 1992/03/13 17:05:56 devsrc
# Converted to ODE
#
#
# Client window will contain the following items:
# a label "Resize Drawn Button", with arrowButtons on both sides;
# a square Box; two toggle buttons, "Resize Child" and "Resize Parent".
CompareVisual Shell1
Continue
# This is a test of the resize callback.
# Five messages about resize callback should appear in the xterm window.
# The messages are numbered to help you keep track of them.
# The toggles at the bottom let you choose between resizing the Parent of
# the Drawing Area -- a form -- and one of its children, the Drawn button.
# In this test, the Drawn button appears as a square box.
# This test is being run in BBParent mode. The Resize Parent Toggle button
# should be set insensitive.
# The UP arrow will INCREASE the size of the parent or child (depending on
# which toggle is set). The DOWN arrow will DECREASE the size.
Continue
# Increase the child size several times. It should not force the Drawing
# Area to resize until its right edge has to move beyond the right edge of
# the rightmost arrow button.
LocatePointer ArrowButton1
ClickMB Btn1 8
CompareVisual parent
ClickMB Btn1
CompareVisual parent
# Once you reach the edge of the drawing area, each increase in the size of
# the child should result in visible resizing and another resize callback
# message.
# Decrease the size of the child several times. At some point, the Drawing
# Area will stop growing smaller. At this point, no more resize callback
# messages should appear as you decrease the child's size.
LocatePointer ArrowButton2
ClickMB Btn1 4
CompareVisual parent
# Decrease the child to the minimum possible size, then increase it until
# it is visible.
ClickMB Btn1 18
LocatePointer ArrowButton1
ClickMB Btn1 12
CompareVisual parent
Continue
# Resize parent is off, so continue
Continue
# By clicking on arrow buttons, you will instead MOVE the child. The "Resize
# Parent" toggle is no longer useful. Use the UP arrow to move the drawn
# button until it forces the client to resize. Again, you should see
# resize callback messages each time the client appears to resize.
LocatePointer ArrowButton1
ClickMB Btn1 11
CompareVisual parent
Continue
# The Parent toggle was unmanaged and remanaged. There should be
# only TWO messages about an expose event having been generated.
# Note: You can also compile this test with -DBESTCASE, and you may see fewer
# expose events being generated.
Continue
# The Drawing Area was unmanaged, followed by its other children. One
# additional expose event message should be generated.
Continue
# Press on the push button labelled Push Me. Each time you press it
# the box above, which is a drawn button, show grow 20 pixels wider.
LocatePointer PB
ClickMB Btn1 3
CompareVisual DrawnButton1
Continue
# The drawing area should now contain an arrow button. The size
# of the drawing area should be approximately 520x620.
CompareVisual DrawingArea1
Continue
# A drawing Area has been created with resizePolicyGrow. It should
# contain an arrow button placed at (100,100).
CompareVisual DrawingArea1
Continue
# The arrow button has been moved to (50, 200). The drawing area
# should grow in the y direction, but remain the same in the x
# direction, giving a size of approximately (160, 260).
CompareVisual DrawingArea1
Continue
# Another drawing area should appear with an arrow button at (50,50).
# The size of the drawing area should be approximately (300,300).
CompareVisual DrawingArea1
Continue
WindowResize Shell1 East 350
CompareVisual Shell1
WindowResize Shell1 SouthEast 400 400
CompareVisual Shell1
Continue
Exit