# $TOG: Form1a.scr /main/5 1999/02/03 17:42:10 jff $ # @OPENGROUP_COPYRIGHT@ # COPYRIGHT NOTICE # Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc. # Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group # ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for # the full copyright text. # # This software is subject to an open license. It may only be # used on, with or for operating systems which are themselves open # source systems. You must contact The Open Group for a license # allowing distribution and sublicensing of this software on, with, # or for operating systems which are not Open Source programs. # # See http://www.opengroup.org/openmotif/license for full # details of the license agreement. Any use, reproduction, or # distribution of the program constitutes recipient's acceptance of # this agreement. # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS # PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY # WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY # OR FITNESS FOR A PARTICULAR PURPOSE # # EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT # NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE # EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGES. # # 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