Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / pTk / tixForm.h
CommitLineData
86530b38
AT
1/*
2 * tixForm.h --
3 *
4 * Declares the internal functions and data types for the Tix Form
5 * geometry manager.
6 *
7 * Copyright (c) 1996, Expert Interface Technologies
8 *
9 * See the file "license.terms" for information on usage and redistribution
10 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 *
12 */
13
14#ifndef _TIX_FORM_H
15#define _TIX_FORM_H
16
17#define SIDE0 0
18#define SIDE1 1
19
20#define NEXT_SIDE(x) (!x)
21
22#define SIDEX 0
23#define SIDEY 1
24
25#define AXIS_X 0
26#define AXIS_Y 1
27
28#define OPPO_SIDE0 1
29#define OPPO_SIDE1 2
30#define OPPO_ALL 3
31
32#define PINNED_SIDE0 4
33#define PINNED_SIDE1 8
34#define PINNED_ALL 12
35
36#define ATT_NONE 0
37#define ATT_GRID 1
38#define ATT_OPPOSITE 2
39#define ATT_PARALLEL 3
40
41/*
42 * The following structures carry information about the client windows
43 */
44typedef union {
45 int grid;
46 struct _FormInfo * widget;
47} Attachment;
48
49typedef struct {
50 int pcnt; /* percentage anchor point */
51 int disp; /* displacement from the percentage anchor point*/
52} Side;
53
54typedef struct _FormInfo {
55 Tk_Window tkwin;
56 struct _MasterInfo* master; /* The master of this window */
57 struct _FormInfo * next;
58
59 int depend; /* used to detect circular dependency*/
60
61 /* These are specified by the user and set by the "tixForm" command
62 */
63 Attachment att[2][2]; /* anchor of attachment */
64 int off[2][2]; /* offset of attachment */
65 char isDefault[2][2];/* Is this side a default attachment*/
66
67 char attType[2][2]; /* type of attachment
68 GRID or PIXEL*/
69 int pad[2][2]; /* value of padding */
70
71 /* These values are calculated by the PinnClient() functions
72 * and are used to calculated the required size of the master
73 * inside CalculateMasterGeometry(), as well as the positions
74 * of the clients inside ArrangeGeometry()
75 */
76 Side side[2][2];
77 int sideFlags[2];
78
79 /* These values are used to place the clients into the clients
80 */
81 int posn[2][2];
82
83 /* These things are for Spring'ing */
84 int spring[2][2];
85 struct _FormInfo * strWidget[2][2];
86 int springFail[2];
87 int fill[2];
88} FormInfo;
89
90
91/*
92 * The following structures carry information about the master windows
93 */
94typedef struct {
95 unsigned int isDeleted : 1;
96 unsigned int repackPending : 1;
97} MasterFlags;
98
99typedef struct _MasterInfo {
100 Tk_Window tkwin;
101 struct _FormInfo * client;
102 struct _FormInfo * client_tail;
103 int numClients;
104 int reqSize[2];
105 int numRequests; /* This is used to detect
106 * whether two geometry managers
107 * are used to manage the same
108 * master window
109 */
110 int grids[2];
111 MasterFlags flags;
112} MasterInfo;
113
114/* tixFormMisc.c */
115
116
117EXTERN int TixFm_Configure _ANSI_ARGS_((FormInfo *clientPtr,
118 Tk_Window topLevel,
119 Tcl_Interp* interp, int argc, Tcl_Obj **objv));
120
121/* tixForm.c */
122EXTERN FormInfo * TixFm_GetFormInfo _ANSI_ARGS_((Tk_Window tkwin,
123 int create));
124EXTERN void TixFm_StructureProc _ANSI_ARGS_((ClientData clientData,
125 XEvent * eventPtr));
126EXTERN void TixFm_AddToMaster _ANSI_ARGS_((MasterInfo *masterPtr,
127 FormInfo *clientPtr));
128EXTERN void TixFm_DeleteMaster _ANSI_ARGS_((
129 MasterInfo *masterPtr));
130EXTERN void TixFm_FreeMasterInfo _ANSI_ARGS_((
131 char *clientData));
132EXTERN FormInfo * TixFm_FindClientPtrByName _ANSI_ARGS_((
133 Tcl_Interp * interp, char * name,
134 Tk_Window topLevel));
135EXTERN void TixFm_ForgetOneClient _ANSI_ARGS_((
136 FormInfo *clientPtr));
137EXTERN void TixFm_Unlink _ANSI_ARGS_((FormInfo *clientPtr));
138EXTERN void TixFm_UnlinkFromMaster _ANSI_ARGS_((
139 FormInfo *clientPtr));
140#endif /* _TIX_FORM_H */