17a84e134Smrg/*********************************************************** 27a84e134Smrg 37a84e134SmrgCopyright 1987, 1988, 1994, 1998 The Open Group 47a84e134Smrg 57a84e134SmrgPermission to use, copy, modify, distribute, and sell this software and its 67a84e134Smrgdocumentation for any purpose is hereby granted without fee, provided that 77a84e134Smrgthe above copyright notice appear in all copies and that both that 87a84e134Smrgcopyright notice and this permission notice appear in supporting 97a84e134Smrgdocumentation. 107a84e134Smrg 117a84e134SmrgThe above copyright notice and this permission notice shall be included in 127a84e134Smrgall copies or substantial portions of the Software. 137a84e134Smrg 147a84e134SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 157a84e134SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 167a84e134SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 177a84e134SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 187a84e134SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 197a84e134SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 207a84e134Smrg 217a84e134SmrgExcept as contained in this notice, the name of The Open Group shall not be 227a84e134Smrgused in advertising or otherwise to promote the sale, use or other dealings 237a84e134Smrgin this Software without prior written authorization from The Open Group. 247a84e134Smrg 257a84e134Smrg 267a84e134SmrgCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. 277a84e134Smrg 287a84e134Smrg All Rights Reserved 297a84e134Smrg 30421c997bSmrgPermission to use, copy, modify, and distribute this software and its 31421c997bSmrgdocumentation for any purpose and without fee is hereby granted, 327a84e134Smrgprovided that the above copyright notice appear in all copies and that 33421c997bSmrgboth that copyright notice and this permission notice appear in 347a84e134Smrgsupporting documentation, and that the name of Digital not be 357a84e134Smrgused in advertising or publicity pertaining to distribution of the 36421c997bSmrgsoftware without specific, written prior permission. 377a84e134Smrg 387a84e134SmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 397a84e134SmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 407a84e134SmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 417a84e134SmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 427a84e134SmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 437a84e134SmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 447a84e134SmrgSOFTWARE. 457a84e134Smrg 467a84e134Smrg******************************************************************/ 477a84e134Smrg 487a84e134Smrg/* Form widget private definitions */ 497a84e134Smrg 507a84e134Smrg#ifndef _XawFormP_h 517a84e134Smrg#define _XawFormP_h 527a84e134Smrg 537a84e134Smrg#include <X11/Xfuncproto.h> 547a84e134Smrg 557a84e134Smrg#include <X11/Xaw/Form.h> 567a84e134Smrg#include <X11/Xaw/XawInit.h> 577a84e134Smrg 587a84e134Smrg_XFUNCPROTOBEGIN 597a84e134Smrg 607a84e134Smrg#define XtREdgeType "EdgeType" 617a84e134Smrg 627a84e134Smrgtypedef enum { 637a84e134Smrg LayoutPending, 647a84e134Smrg LayoutInProgress, 657a84e134Smrg LayoutDone 667a84e134Smrg} LayoutState; 677a84e134Smrg 687a84e134Smrg#define XtInheritLayout \ 697a84e134Smrg((Boolean (*)(FormWidget, unsigned int, unsigned int, Bool))_XtInherit) 707a84e134Smrg 717a84e134Smrgtypedef struct { 727a84e134Smrg Boolean(*layout)(FormWidget, unsigned int, unsigned int, Bool); 737a84e134Smrg#ifndef OLDXAW 747a84e134Smrg XtPointer extension; 757a84e134Smrg#endif 767a84e134Smrg} FormClassPart; 777a84e134Smrg 787a84e134Smrgtypedef struct _FormClassRec { 797a84e134Smrg CoreClassPart core_class; 807a84e134Smrg CompositeClassPart composite_class; 817a84e134Smrg ConstraintClassPart constraint_class; 827a84e134Smrg FormClassPart form_class; 837a84e134Smrg} FormClassRec; 847a84e134Smrg 857a84e134Smrgextern FormClassRec formClassRec; 867a84e134Smrg 877a84e134Smrgtypedef struct _FormPart { 887a84e134Smrg /* resources */ 897a84e134Smrg int default_spacing; /* default distance between children */ 907a84e134Smrg 917a84e134Smrg /* private */ 927a84e134Smrg Dimension old_width, old_height; /* reference value for *_virtual */ 937a84e134Smrg int no_refigure; /* no re-layout while > 0 */ 947a84e134Smrg Boolean needs_relayout; /* next time no_refigure == 0 */ 957a84e134Smrg Boolean resize_in_layout; /* should layout() do geom request? */ 967a84e134Smrg Dimension preferred_width, preferred_height; /* cached from layout */ 977a84e134Smrg Boolean resize_is_no_op; /* Causes resize to take not action */ 987a84e134Smrg#ifndef OLDXAW 997a84e134Smrg XawDisplayList *display_list; 1005b16253fSmrg XtPointer pad[4]; /* for future use and keep binary compatibility */ 1017a84e134Smrg#endif 1027a84e134Smrg} FormPart; 1037a84e134Smrg 1047a84e134Smrgtypedef struct _FormRec { 1057a84e134Smrg CorePart core; 1067a84e134Smrg CompositePart composite; 1077a84e134Smrg ConstraintPart constraint; 1087a84e134Smrg FormPart form; 1097a84e134Smrg} FormRec; 1107a84e134Smrg 1117a84e134Smrgtypedef struct _FormConstraintsPart { 1127a84e134Smrg /* resources */ 1137a84e134Smrg XtEdgeType top, bottom, left, right;/* where to drag edge on resize */ 1147a84e134Smrg int dx; /* desired horiz offset */ 1157a84e134Smrg int dy; /* desired vertical offset */ 1167a84e134Smrg Widget horiz_base; /* measure dx from here if non-null */ 1177a84e134Smrg Widget vert_base; /* measure dy from here if non-null */ 1187a84e134Smrg Boolean allow_resize; /* True if child may request resize */ 1197a84e134Smrg 1207a84e134Smrg /* private */ 1217a84e134Smrg short virtual_width, virtual_height; 1227a84e134Smrg Position new_x, new_y; 1237a84e134Smrg LayoutState layout_state; /* temporary layout state */ 1247a84e134Smrg Boolean deferred_resize;/* was resized while no_refigure is set */ 1257a84e134Smrg#ifndef OLDXAW 1267a84e134Smrg short virtual_x, virtual_y; 1277a84e134Smrg XtPointer pad[2]; /* leave some space for further optimizations 1287a84e134Smrg * in the form widget geometry 1297a84e134Smrg */ 1307a84e134Smrg#endif 1317a84e134Smrg} FormConstraintsPart; 1327a84e134Smrg 1337a84e134Smrgtypedef struct _FormConstraintsRec { 1347a84e134Smrg FormConstraintsPart form; 1357a84e134Smrg} FormConstraintsRec, *FormConstraints; 1367a84e134Smrg 1377a84e134Smrg_XFUNCPROTOEND 1387a84e134Smrg 1397a84e134Smrg#endif /* _XawFormP_h */ 140