OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [generic/] [tixForm.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
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
#ifdef BUILD_tix
42
# undef TCL_STORAGE_CLASS
43
# define TCL_STORAGE_CLASS DLLEXPORT
44
#endif
45
 
46
/*
47
 * The following structures carry information about the client windows
48
 */
49
typedef union {
50
    int                 grid;
51
    struct _FormInfo  * widget;
52
} Attachment;
53
 
54
typedef struct {
55
    int pcnt;           /* percentage anchor point */
56
    int disp;           /* displacement from the percentage anchor point*/
57
} Side;
58
 
59
typedef struct _FormInfo {
60
    Tk_Window           tkwin;
61
    struct _MasterInfo* master;         /* The master of this window */
62
    struct _FormInfo  * next;
63
 
64
    int                 depend;         /* used to detect circular dependency*/
65
 
66
    /* These are specified by the user and set by the "tixForm" command
67
     */
68
    Attachment          att[2][2];      /* anchor of attachment */
69
    int                 off[2][2];      /* offset of attachment */
70
    char                isDefault[2][2];/* Is this side a default attachment*/
71
 
72
    char                attType[2][2];  /* type of attachment
73
                                           GRID or PIXEL*/
74
    int                 pad[2][2];      /* value of padding */
75
 
76
    /* These values are calculated by the PinnClient() functions
77
     * and are used to calculated the required size of the master
78
     * inside CalculateMasterGeometry(), as well as the positions
79
     * of the clients inside ArrangeGeometry()
80
     */
81
    Side                side[2][2];
82
    int                 sideFlags[2];
83
 
84
    /* These values are used to place the clients into the clients
85
     */
86
    int                 posn[2][2];
87
 
88
    /* These things are for Spring'ing */
89
    int                 spring[2][2];
90
    struct _FormInfo  * strWidget[2][2];
91
    int                 springFail[2];
92
    int                 fill[2];
93
} FormInfo;
94
 
95
 
96
/*
97
 * The following structures carry information about the master windows
98
 */
99
typedef struct {
100
    unsigned int        isDeleted : 1;
101
    unsigned int        repackPending : 1;
102
} MasterFlags;
103
 
104
typedef struct _MasterInfo {
105
    Tk_Window           tkwin;
106
    struct _FormInfo  * client;
107
    struct _FormInfo  * client_tail;
108
    int                 numClients;
109
    int                 reqSize[2];
110
    int                 numRequests;    /* This is used to detect
111
                                         * whether two geometry managers
112
                                         * are used to manage the same
113
                                         * master window
114
                                         */
115
    int                 grids[2];
116
    MasterFlags         flags;
117
} MasterInfo;
118
 
119
/* tixFormMisc.c */
120
 
121
 
122
EXTERN int              TixFm_Configure _ANSI_ARGS_((FormInfo *clientPtr,
123
                            Tk_Window topLevel,
124
                            Tcl_Interp* interp, int argc, char **argv));
125
 
126
/* tixForm.c */
127
EXTERN FormInfo *       TixFm_GetFormInfo _ANSI_ARGS_((Tk_Window tkwin,
128
                            int create));
129
EXTERN void             TixFm_StructureProc _ANSI_ARGS_((ClientData clientData,
130
                            XEvent * eventPtr));
131
EXTERN void             TixFm_AddToMaster _ANSI_ARGS_((MasterInfo *masterPtr,
132
                            FormInfo *clientPtr));
133
EXTERN void             TixFm_DeleteMaster _ANSI_ARGS_((
134
                            MasterInfo *masterPtr));
135
EXTERN void             TixFm_FreeMasterInfo _ANSI_ARGS_((
136
                            ClientData clientData));
137
EXTERN FormInfo *       TixFm_FindClientPtrByName _ANSI_ARGS_((
138
                            Tcl_Interp * interp, char * name,
139
                            Tk_Window topLevel));
140
EXTERN void             TixFm_ForgetOneClient _ANSI_ARGS_((
141
                            FormInfo *clientPtr));
142
EXTERN void             TixFm_Unlink _ANSI_ARGS_((FormInfo *clientPtr));
143
EXTERN void             TixFm_UnlinkFromMaster _ANSI_ARGS_((
144
                            FormInfo *clientPtr));
145
 
146
#undef TCL_STORAGE_CLASS
147
#define TCL_STORAGE_CLASS DLLIMPORT
148
 
149
#endif /* _TIX_FORM_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.