XEmacs 21.2.38 (Peisino)
[chise/xemacs-chise.git.1] / lwlib / xlwtabsP.h
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    realRows;               /* XEmacs addition */
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         Boolean         visible; /* XEmacs change */
133         Dimension       width ;         /* tab width */
134         Position        x,y ;           /* tab base position */
135         short           row ;           /* tab row */
136         Position        l_x, l_y ;      /* label position */
137         Position        lbm_x, lbm_y ;  /* bitmap position */
138         unsigned int    lbm_width, lbm_height, lbm_depth ;
139 } TabsConstraintsPart ;
140
141 typedef struct _TabsConstraintsRec {
142 #ifdef  NEED_MOTIF
143         XmManagerConstraintPart manager;
144 #endif
145         TabsConstraintsPart     tabs ;
146 } TabsConstraintsRec, *TabsConstraints ;
147
148
149 #endif /* _TabsP_h */