Initial git import
[sxemacs] / src / ui / lwlib / xlwtabsP.h
1 /* Tabs Widget for SXEmacs.
2    Copyright (C) 1999 Edward A. Falk
3
4 This file is part of SXEmacs.
5
6 SXEmacs is free software: you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation, either version 3 of the License, or (at your
9 option) any later version.
10
11 SXEmacs is distributed in the hope that it will be
12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
18
19 /* Synched up with: TabsP.h 1.8 */
20
21 /*
22  * TabsP.h - Private definitions for Index Tabs widget
23  */
24
25 #ifndef _TabsP_h
26 #define _TabsP_h
27
28 /***********************************************************************
29  *
30  * Tabs Widget Private Data
31  *
32  ***********************************************************************/
33
34 #include <X11/IntrinsicP.h>
35
36 #ifdef        NEED_MOTIF
37 #include <Xm/XmP.h>
38 #include <Xm/ManagerP.h>
39 #endif
40
41 #include "xlwtabs.h"
42
43 /* New fields for the Tabs widget class record */
44 typedef struct {
45         XtPointer extension;
46 } TabsClassPart;
47
48 /* Full class record declaration */
49 typedef struct _TabsClassRec {
50         CoreClassPart core_class;
51         CompositeClassPart composite_class;
52         ConstraintClassPart constraint_class;
53 #ifdef  NEED_MOTIF
54         XmManagerClassPart manager_class;
55 #endif
56         TabsClassPart tabs_class;
57 } TabsClassRec;
58
59 extern TabsClassRec tabsClassRec;
60
61 /****************************************************************
62  *
63  * instance record declaration
64  *
65  ****************************************************************/
66
67 /* New fields for the Tabs widget record */
68 typedef struct {
69         /* resources */
70         XFontStruct *font;
71         Dimension internalHeight, internalWidth;
72         Widget topWidget;
73         XtCallbackList callbacks;
74         XtCallbackList popdownCallbacks;
75         Boolean selectInsensitive;
76         Boolean be_nice_to_cmap;
77         int top_shadow_contrast;
78         int bot_shadow_contrast;
79         int insensitive_contrast;
80
81         /* private state */
82         Widget hilight;
83         GC foregroundGC;
84         GC backgroundGC;
85         GC greyGC;
86         GC topGC;
87         GC botGC;
88         Dimension tab_height;   /* height of tabs (all the same) */
89         /* Note: includes top shadow only */
90         Dimension tab_total;    /* total height of all tabs */
91         Dimension child_width, child_height;    /* child size, including borders */
92         Dimension max_cw, max_ch;       /* max child preferred size */
93         Cardinal numRows;
94         Cardinal realRows;      /* XEmacs addition */
95         XtGeometryMask last_query_mode;
96         Boolean needs_layout;
97         Pixmap grey50;          /* TODO: cache this elsewhere */
98 } TabsPart;
99
100 typedef struct _TabsRec {
101         CorePart core;
102         CompositePart composite;
103         ConstraintPart constraint;
104 #ifdef  NEED_MOTIF
105         XmManagerPart manager;
106 #endif
107         TabsPart tabs;
108 } TabsRec;
109
110 /****************************************************************
111  *
112  * constraint record declaration
113  *
114  ****************************************************************/
115
116 typedef struct _TabsConstraintsPart {
117         /* resources */
118         String label;
119         Pixmap left_bitmap;
120         Pixel foreground;
121         Boolean resizable;
122
123         /* private state */
124         Pixel grey;
125         Boolean greyAlloc;
126         Boolean visible;        /* XEmacs change */
127         Dimension width;        /* tab width */
128         Position x, y;          /* tab base position */
129         short row;              /* tab row */
130         Position l_x, l_y;      /* label position */
131         Position lbm_x, lbm_y;  /* bitmap position */
132         unsigned int lbm_width, lbm_height, lbm_depth;
133 } TabsConstraintsPart;
134
135 typedef struct _TabsConstraintsRec {
136 #ifdef  NEED_MOTIF
137         XmManagerConstraintPart manager;
138 #endif
139         TabsConstraintsPart tabs;
140 } TabsConstraintsRec, *TabsConstraints;
141
142 #endif                          /* _TabsP_h */