Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / lwlib / xlwtabs.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 /*
22  * This widget manages one or more child widgets, exactly one of which is
23  * visible.  Above the child widgets is a graphic that looks like index
24  * tabs from file folders.  Each tab corresponds to one of the child widgets.
25  * By clicking on a tab, the user can bring the corresponding widget to
26  * the top of the stack.
27  */
28
29
30 #ifndef _Tabs_h
31 #define _Tabs_h
32
33 #include <X11/Constraint.h>
34
35
36 /***********************************************************************
37  *
38  * Tabs Widget (subclass of CompositeClass)
39  *
40  ***********************************************************************/
41
42 /* Parameters:
43
44  Name                Class              RepType         Default Value
45  ----                -----              -------         -------------
46  font                Font               XFontStruct*    XtDefaultFont
47  internalWidth       Width              Dimension       4       *1
48  internalHeight      Height             Dimension       2       *1
49  topWidget           TopWidget          Widget                  *2
50  highlightWidget HighlightWidget Widget 4
51  callback            Callback           XtCallbackList  NULL    *3
52  popdownCallback     Callback           XtCallbackList  NULL    *4
53  selectInsensitive   SelectInsensitive  Boolean         True    *5
54  beNiceToColormap    BeNiceToColormap   Boolean         False   *6
55  topShadowContrast   TopShadowContrast  int             20
56  bottomShadowContrast BottomShadowContrast int          40
57  insensitiveContrast InsensitiveContrast int            33      *7
58
59  background          Background         Pixel           XtDefaultBackground
60  border              BorderColor        Pixel           XtDefaultForeground
61  borderWidth         BorderWidth        Dimension       1
62  destroyCallback     Callback           Pointer         NULL
63  hSpace              HSpace             Dimension       4
64  height              Height             Dimension       0
65  mappedWhenManaged   MappedWhenManaged  Boolean         True
66  orientation         Orientation        XtOrientation   vertical
67  vSpace              VSpace             Dimension       4
68  width               Width              Dimension       0
69  x                   Position           Position        0
70  y                   Position           Position        0
71
72  Notes:
73
74  1 internalWidth, internalHeight specify the margins around the text
75    in the tabs.
76  2 topWidget identifies the widget which is currently visible.
77  3 callbacks are called whenever the user selects a tab.  Call_data is
78    the new top widget.
79  4 popdownCallbacks are called whenever the user selects a tab.  Call_data is
80    the old (no longer visible) top widget.  Note that popdownCallbacks
81    are called before callbacks.
82  5 SelectInsensitive determines whether or not insensitive children may
83    be selected anyway.
84  6 BeNiceToColormap causes the Tabs widget to use fewer colors.
85  7 InsensitiveContrast sets the contrast used for labels of insensitive widgets.
86
87 */
88
89 /* Constraint parameters:
90  Name                Class              RepType         Default Value
91  ----                -----              -------         -------------
92  tabLabel            Label              String          widget name
93  tabLeftBitmap       LeftBitmap         Pixmap          None
94  tabForeground       Foreground         Pixel           XtDefaultForeground
95  resizable           Resizable          Boolean         False
96 */
97
98 /* New fields */
99
100 #ifndef XtNtabLabel
101 #define XtNtabLabel             "tabLabel"
102 #define XtNtabForeground        "tabForeground"
103 #endif
104
105 #ifndef XtNtabLeftBitmap
106 #define XtNtabLeftBitmap        "tabLeftBitmap"
107 #endif
108
109 #ifndef XtCLeftBitmap
110 #define XtCLeftBitmap   "LeftBitmap"
111 #endif
112
113 #ifndef XtCResizable
114 #define XtCResizable    "Resizable"
115 #endif
116
117 #ifndef XtNselectInsensitive
118 #define XtNselectInsensitive    "selectInsensitive"
119 #define XtCSelectInsensitive    "SelectInsensitive"
120 #endif
121
122 #ifndef XtNnlabels
123 #define XtNnlabels      "nlabels"
124 #define XtCNLabels      "NLabels"
125 #endif
126 #ifndef XtNlabels
127 #define XtNlabels       "labels"
128 #define XtCLabels       "Labels"
129 #endif
130
131 #ifndef XtNtopWidget
132 #define XtNtopWidget    "topWidget"
133 #define XtCTopWidget    "TopWidget"
134 #endif
135
136 #ifndef XtNhighlightWidget
137 #define XtNhighlightWidget "highlightWidget"
138 #define XtCHighlightWidget "HighlightWidget"
139 #endif
140
141 #ifndef XtNhSpace
142 #define XtNhSpace       "hSpace"
143 #define XtCHSpace       "HSpace"
144 #define XtNvSpace       "vSpace"
145 #define XtCVSpace       "VSpace"
146 #endif
147
148 #ifndef XtNresizable
149 #define XtNresizable    "resizable"
150 #endif
151
152 #ifndef XtNinsensitiveContrast
153 #define XtNinsensitiveContrast  "insensitiveContrast"
154 #define XtCInsensitiveContrast  "InsensitiveContrast"
155 #endif
156
157 #ifndef XtNshadowWidth
158 #define XtNshadowWidth "shadowWidth"
159 #define XtCShadowWidth "ShadowWidth"
160 #define XtNtopShadowPixel "topShadowPixel"
161 #define XtCTopShadowPixel "TopShadowPixel"
162 #define XtNbottomShadowPixel "bottomShadowPixel"
163 #define XtCBottomShadowPixel "BottomShadowPixel"
164 #define XtNtopShadowContrast "topShadowContrast"
165 #define XtCTopShadowContrast "TopShadowContrast"
166 #define XtNbottomShadowContrast "bottomShadowContrast"
167 #define XtCBottomShadowContrast "BottomShadowContrast"
168 #endif
169
170 #ifndef XtNtopShadowPixmap
171 #define XtNtopShadowPixmap      "topShadowPixmap"
172 #define XtCTopShadowPixmap      "TopShadowPixmap"
173 #define XtNbottomShadowPixmap   "bottomShadowPixmap"
174 #define XtCBottomShadowPixmap   "BottomShadowPixmap"
175 #endif
176
177 #ifndef XtNbeNiceToColormap
178 #define XtNbeNiceToColormap "beNiceToColormap"
179 #define XtCBeNiceToColormap "BeNiceToColormap"
180 #define XtNbeNiceToColourmap "beNiceToColormap"
181 #define XtCBeNiceToColourmap "BeNiceToColormap"
182 #endif
183
184 /* Class record constants */
185
186 extern WidgetClass tabsWidgetClass;
187
188 typedef struct _TabsClassRec *TabsWidgetClass;
189 typedef struct _TabsRec      *TabsWidget;
190
191 _XFUNCPROTOBEGIN
192
193 extern  void
194 XawTabsSetTop(
195 #if NeedFunctionPrototypes
196         Widget  w,
197         Bool    callCallbacks
198 #endif
199 ) ;
200
201 extern  void
202 XawTabsSetHighlight(
203 #if NeedFunctionPrototypes
204         Widget  tabs,
205         Widget  w
206 #endif
207 ) ;
208
209 _XFUNCPROTOEND
210
211 #endif /* _Tabs_h */