1 /*************************************<+>*************************************
2 *****************************************************************************
8 ** Description: Private include file for the Form class
10 *****************************************************************************
12 ** Copyright (c) 1988 by Hewlett-Packard Company
13 ** Copyright (c) 1988 by the Massachusetts Institute of Technology
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
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 */
45 Boolean y_vary_offset
;
47 Boolean y_attach_bottom
;
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 */
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
;
84 extern XwFormClassRec XwformClassRec
;
87 /* The Form tree structure used for containing the constraint tree */
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
118 /* The Form instance record */
120 typedef struct _XwFormPart
122 XwFormRef
* width_tree
;
123 XwFormRef
* height_tree
;
127 /* Full instance record declaration */
129 typedef struct _XwFormRec
132 CompositePart composite
;
133 ConstraintPart constraint
;
134 XwManagerPart manager
;