One more check on valid display which is known to be in the startup
[xcircuit.git] / Xw / FormP.h
blob7716c51200129a455d5f1275e6e669195c764485
1 /*************************************<+>*************************************
2 *****************************************************************************
3 **
4 ** File: FormP.h
5 **
6 ** Project: X Widgets
7 **
8 ** Description: Private include file for the Form class
9 **
10 *****************************************************************************
11 **
12 ** Copyright (c) 1988 by Hewlett-Packard Company
13 ** Copyright (c) 1988 by the Massachusetts Institute of Technology
14 **
15 ** Permission to use, copy, modify, and distribute this software
16 ** and its documentation for any purpose and without fee is hereby
17 ** granted, provided that the above copyright notice appear in all
18 ** copies and that both that copyright notice and this permission
19 ** notice appear in supporting documentation, and that the names of
20 ** Hewlett-Packard or M.I.T. not be used in advertising or publicity
21 ** pertaining to distribution of the software without specific, written
22 ** prior permission.
23 **
24 *****************************************************************************
25 *************************************<+>*************************************/
28 /* Form constraint rec */
30 typedef struct _XwFormConstraintRec
32 String x_ref_name; /* the name of the widget to reference */
33 Widget x_ref_widget; /* the widget to reference */
34 int x_offset; /* the offset (pixels) from the reference */
35 Boolean x_add_width; /* add width of the reference to x coord */
36 Boolean x_vary_offset; /* able to vary the seperation */
37 Boolean x_resizable; /* able to resize in x direction */
38 Boolean x_attach_right; /* attached to the right edge of the form */
39 int x_attach_offset; /* offset (pixels) from attached edge */
41 String y_ref_name; /* y constraints are the same as x */
42 Widget y_ref_widget;
43 int y_offset;
44 Boolean y_add_height;
45 Boolean y_vary_offset;
46 Boolean y_resizable;
47 Boolean y_attach_bottom;
48 int y_attach_offset;
51 Boolean managed; /* whether the widget is managed or not */
52 int x, y; /* location after constraint processing */
53 Dimension width, height; /* size after constraint processing */
55 int set_x; /* original y */
56 int set_y; /* original x */
57 Dimension set_width; /* original or set values width of widget */
58 Dimension set_height; /* original or set values height of widget */
60 Dimension width_when_unmanaged;
61 Dimension height_when_unmanaged;
62 } XwFormConstraintRec;
65 /* Form class structure */
67 typedef struct _XwFormClassPart
69 int foo; /* No new fields needed */
70 } XwFormClassPart;
73 /* Full class record declaration for Form class */
75 typedef struct _XwFormClassRec
77 CoreClassPart core_class;
78 CompositeClassPart composite_class;
79 ConstraintClassPart constraint_class;
80 XwManagerClassPart manager_class;
81 XwFormClassPart form_class;
82 } XwFormClassRec;
84 extern XwFormClassRec XwformClassRec;
87 /* The Form tree structure used for containing the constraint tree */
89 struct _XwFormRef
91 Widget this; /* the widget these constaints are for */
92 Widget ref; /* the widget this constraint is for */
93 int offset; /* offset (pixels) from parent ref */
94 Boolean add; /* add (width or height) of parent ref */
95 Boolean vary; /* able to vary the seperation */
96 Boolean resizable; /* able to resize */
97 Boolean attach; /* attached to the edge (right or bottom) */
98 int attach_offset; /* offset (pixels) from attached edge */
100 int set_loc; /* the initial or set value location */
101 int set_size; /* the initial or set value size */
103 struct _XwFormRef ** ref_to; /* child references */
104 int ref_to_count; /* number of child references */
107 typedef struct _XwFormRef XwFormRef;
110 typedef struct _XwFormProcess
112 XwFormRef * ref;
113 int loc;
114 int size;
115 Boolean leaf;
116 } XwFormProcess;
118 /* The Form instance record */
120 typedef struct _XwFormPart
122 XwFormRef * width_tree;
123 XwFormRef * height_tree;
124 } XwFormPart;
127 /* Full instance record declaration */
129 typedef struct _XwFormRec
131 CorePart core;
132 CompositePart composite;
133 ConstraintPart constraint;
134 XwManagerPart manager;
135 XwFormPart form;
136 } XwFormRec;