Form.c revision 749
749N/A/* $XConsortium: Form.c,v 1.52 94/04/17 20:12:06 kaleb Exp $ */ 749N/A/*********************************************************** 749N/ACopyright (c) 1987, 1988, 1994 X Consortium 749N/APermission is hereby granted, free of charge, to any person obtaining a copy 749N/Aof this software and associated documentation files (the "Software"), to deal 749N/Ain the Software without restriction, including without limitation the rights 749N/Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell 749N/Acopies of the Software, and to permit persons to whom the Software is 749N/Afurnished to do so, subject to the following conditions: 749N/AThe above copyright notice and this permission notice shall be included in 749N/Aall copies or substantial portions of the Software. 749N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 749N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 749N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 749N/AX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 749N/AAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 749N/ACONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 749N/AExcept as contained in this notice, the name of the X Consortium shall not be 749N/Aused in advertising or otherwise to promote the sale, use or other dealings 749N/Ain this Software without prior written authorization from the X Consortium. 749N/ACopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. 749N/APermission to use, copy, modify, and distribute this software and its 749N/Adocumentation for any purpose and without fee is hereby granted, 749N/Aprovided that the above copyright notice appear in all copies and that 749N/Aboth that copyright notice and this permission notice appear in 749N/Asupporting documentation, and that the name of Digital not be 749N/Aused in advertising or publicity pertaining to distribution of the 749N/Asoftware without specific, written prior permission. 749N/ADIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 749N/AALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 749N/ADIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 749N/AANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 749N/AWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 749N/AARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 749N/A******************************************************************/ 749N/A/* Private Definitions */ 749N/A {
/* core_class fields */ 749N/A /* class_name */ "Form",
749N/A {
/* composite_class fields */ 749N/A {
/* constraint_class fields */ 749N/A {
/* form_class fields */ 749N/A/**************************************************************** 749N/A ****************************************************************/ 749N/A/* Function Name: ChangeFormGeometry 749N/A * Description: Ask the parent to change the form widget's geometry. 749N/A * Arguments: w - the Form widget. 749N/A * query_only - TRUE if this is only a query. 749N/A * width, height - the new width and height. 749N/A * ret_width, ret_height - the actual size the form is allowed 749N/A * Returns: TRUE of children may always be resized. 749N/A * If we are already at the desired size then there is no need 749N/A * to ask our parent of we can change size. 749N/A * Do no invoke the resize rules if our size changes here. 749N/A/* Function Name: Layout 749N/A * Description: Moves all the children around. 749N/A * Arguments: fw - the Form widget. 749N/A * width, height - ** UNUSED **. 749N/A * force_relayout - will force the children to be 749N/A * moved, even if some go past the edge 749N/A * Returns: True if the children are allowed to move from their 749N/A * current locations to the new ones. 749N/A/* Function Name: ResizeChildren 749N/A * Description: Resizes all children to new_x and new_y. 749N/A * Arguments: w - the form widget. 749N/A * I am changing the widget wrapper w/o modifing the window. This is 749N/A * risky, but I can get away with it since I am the parent of this 749N/A * widget, and he must ask me for any geometry changes. 749N/A * The window will be updated when no_refigure is set back to False. 749N/A "constraintLoop",
"xawFormLayout",
"XawToolkitError",
749N/A "constraint loop detected while laying out child '%s' in FormWidget '%s'",
749N/A /* I don't see any problem with returning values less than zero. */ 749N/A * I don't want to even think about what ``Almost'' would mean - Chris. 749N/A /* If GeometryManager is invoked during a SetValues call on a child 749N/A * then it is necessary to compute a new layout if ConstraintSetValues 749N/A * allowed any constraint changes. */ 749N/A /* If GeometryManager is invoked during a SetValues call on a child 749N/A * then it is necessary to compute a new layout if ConstraintSetValues 749N/A * allowed any constraint changes. */ 749N/A * Remember the old size, and then set the size to the requested size. 749N/A * Reset the size of this child back to what it used to be. 749N/A * I am changing the widget wrapper w/o modifing the window. This is 749N/A * risky, but I can get away with it since I am the parent of this 749N/A * widget, and he must ask me for any geometry changes. 749N/A * The window will be updated when no_refigure is set back to False. 749N/A /* If there are no subclass ConstraintSetValues procedures remaining 749N/A * to be invoked, and if there is no geometry request about to be 749N/A * made, then invoke the new layout now; else defer it. */ 749N/A * Reset virtual width and height for all children. 749N/A * If the size is one (1) then we must not change the virtual sizes, as 749N/A * they contain useful information. If someone actually wants a widget of 749N/A * width or height one (1) in a form widget he will lose, can't win them all. 749N/A * Chris D. Peterson 2/9/89. 749N/A/********************************************************************** 749N/A **********************************************************************/ 749N/A * Set or reset figuring (ignored if not realized) 749N/A * Xt Configure widget is too smart, and optimizes out