rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / libXaw4 / src / Xaw3_1FormP.h
blob25d0fad521ca40b963fd89b9ae1144054d55e7c3
1 /* $XConsortium: FormP.h,v 1.17 89/07/21 01:51:27 kit Exp $ */
2 /* Copyright Massachusetts Institute of Technology 1987 */
5 /***********************************************************
6 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
7 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
9 All Rights Reserved
11 Permission to use, copy, modify, and distribute this software and its
12 documentation for any purpose and without fee is hereby granted,
13 provided that the above copyright notice appear in all copies and that
14 both that copyright notice and this permission notice appear in
15 supporting documentation, and that the names of Digital or MIT not be
16 used in advertising or publicity pertaining to distribution of the
17 software without specific, written prior permission.
19 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
20 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
21 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
22 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
23 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
24 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
25 SOFTWARE.
27 ******************************************************************/
29 /* Form widget private definitions */
31 #ifndef _XawFormP_h
32 #define _XawFormP_h
34 #include <./Xaw3_1Form.h>
35 #include <X11/ConstrainP.h>
37 #define XtREdgeType "EdgeType"
39 typedef enum {LayoutPending, LayoutInProgress, LayoutDone} LayoutState;
40 #define XtInheritLayout ((Boolean (*)())_XtInherit)
42 typedef struct {
43 Boolean (*layout)(/* FormWidget, Dimension, Dimension */);
44 } FormClassPart;
47 * Layout(
48 * FormWidget w - the widget whose children are to be configured
49 * Dimension w, h - bounding box of layout to be calculated
51 * Stores preferred geometry in w->form.preferred_{width,height}.
52 * If w->form.resize_in_layout is True, then a geometry request
53 * may be made for the preferred bounding box if necessary.
55 * Returns True if a geometry request was granted, False otherwise.
58 typedef struct _FormClassRec {
59 CoreClassPart core_class;
60 CompositeClassPart composite_class;
61 ConstraintClassPart constraint_class;
62 FormClassPart form_class;
63 } FormClassRec;
65 extern FormClassRec formClassRec;
67 typedef struct _FormPart {
68 /* resources */
69 int default_spacing; /* default distance between children */
70 /* private state */
71 Dimension old_width, old_height; /* last known dimensions */
72 int no_refigure; /* no re-layout while > 0 */
73 Boolean needs_relayout; /* next time no_refigure == 0 */
74 Boolean resize_in_layout; /* should layout() do geom request? */
75 Dimension preferred_width, preferred_height; /* cached from layout */
76 } FormPart;
78 typedef struct _FormRec {
79 CorePart core;
80 CompositePart composite;
81 ConstraintPart constraint;
82 FormPart form;
83 } FormRec;
85 typedef struct _FormConstraintsPart {
87 * Constraint Resources.
89 XtEdgeType top, bottom, /* where to drag edge on resize */
90 left, right;
91 int dx; /* desired horiz offset */
92 int dy; /* desired vertical offset */
93 Widget horiz_base; /* measure dx from here if non-null */
94 Widget vert_base; /* measure dy from here if non-null */
95 Boolean allow_resize; /* TRUE if child may request resize */
98 * Private contstraint resources.
101 int virtual_width, virtual_height;
104 * What the size of this child would be if we did not impose the
105 * constraint the width and height must be greater than zero (0).
108 LayoutState layout_state; /* temporary layout state */
109 } FormConstraintsPart;
111 typedef struct _FormConstraintsRec {
112 FormConstraintsPart form;
113 } FormConstraintsRec, *FormConstraints;
115 #endif /* _XawFormP_h */