comparison lwlib/xlwtabsP.h @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents
children
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
1 /* Tabs Widget for XEmacs.
2 Copyright (C) 1999 Edward A. Falk
3
4 This file is part of XEmacs.
5
6 XEmacs 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 2, or (at your option) any
9 later version.
10
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with XEmacs; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21 /* Synched up with: TabsP.h 1.8 */
22
23 /*
24 * TabsP.h - Private definitions for Index Tabs widget
25 */
26
27 #ifndef _TabsP_h
28 #define _TabsP_h
29
30 /***********************************************************************
31 *
32 * Tabs Widget Private Data
33 *
34 ***********************************************************************/
35
36 #include <X11/IntrinsicP.h>
37
38 #ifdef NEED_MOTIF
39 #include <Xm/XmP.h>
40 #include <Xm/ManagerP.h>
41 #endif
42
43 #include "xlwtabs.h"
44
45 /* New fields for the Tabs widget class record */
46 typedef struct {XtPointer extension;} 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 /****************************************************************
64 *
65 * instance record declaration
66 *
67 ****************************************************************/
68
69 /* New fields for the Tabs widget record */
70 typedef struct {
71 /* resources */
72 XFontStruct *font ;
73 Dimension internalHeight, internalWidth ;
74 Widget topWidget ;
75 XtCallbackList callbacks ;
76 XtCallbackList popdownCallbacks ;
77 Boolean selectInsensitive ;
78 Boolean be_nice_to_cmap ;
79 int top_shadow_contrast ;
80 int bot_shadow_contrast ;
81 int insensitive_contrast ;
82
83 /* private state */
84 Widget hilight ;
85 GC foregroundGC ;
86 GC backgroundGC ;
87 GC greyGC ;
88 GC topGC ;
89 GC botGC ;
90 Dimension tab_height ; /* height of tabs (all the same) */
91 /* Note: includes top shadow only */
92 Dimension tab_total ; /* total height of all tabs */
93 Dimension child_width, child_height; /* child size, including borders */
94 Dimension max_cw, max_ch ; /* max child preferred size */
95 Cardinal numRows ;
96 Cardinal displayChildren ;
97 XtGeometryMask last_query_mode;
98 Boolean needs_layout ;
99 Pixmap grey50 ; /* TODO: cache this elsewhere */
100 } TabsPart;
101
102
103 typedef struct _TabsRec {
104 CorePart core;
105 CompositePart composite;
106 ConstraintPart constraint;
107 #ifdef NEED_MOTIF
108 XmManagerPart manager;
109 #endif
110 TabsPart tabs;
111 } TabsRec;
112
113
114
115
116 /****************************************************************
117 *
118 * constraint record declaration
119 *
120 ****************************************************************/
121
122 typedef struct _TabsConstraintsPart {
123 /* resources */
124 String label ;
125 Pixmap left_bitmap ;
126 Pixel foreground ;
127 Boolean resizable ;
128
129 /* private state */
130 Pixel grey ;
131 Boolean greyAlloc ;
132 Dimension width ; /* tab width */
133 Position x,y ; /* tab base position */
134 short row ; /* tab row */
135 Position l_x, l_y ; /* label position */
136 Position lbm_x, lbm_y ; /* bitmap position */
137 unsigned int lbm_width, lbm_height, lbm_depth ;
138 } TabsConstraintsPart ;
139
140 typedef struct _TabsConstraintsRec {
141 #ifdef NEED_MOTIF
142 XmManagerConstraintPart manager;
143 #endif
144 TabsConstraintsPart tabs ;
145 } TabsConstraintsRec, *TabsConstraints ;
146
147
148 #endif /* _TabsP_h */