remove header text:
[blender.git] / source / blender / editors / include / UI_resources.h
1 /*
2  *
3  * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
20  * All rights reserved.
21  *
22  * The Original Code is: all of this file.
23  *
24  * Contributor(s): none yet.
25  * 
26  * ***** END GPL/BL DUAL LICENSE BLOCK *****
27  */
28
29 /** \file UI_resources.h
30  *  \ingroup editorui
31  */
32
33 #ifndef UI_RESOURCES_H
34 #define UI_RESOURCES_H
35
36 /* elubie: TODO: move the typedef for icons to UI_interface_icons.h */
37 /* and add/replace include of UI_resources.h by UI_interface_icons.h */
38 #define DEF_ICON(name) ICON_##name,
39 #define DEF_VICO(name) VICO_##name,
40
41 typedef enum {
42         /* ui */
43 #include "UI_icons.h"
44         BIFICONID_LAST
45 } BIFIconID;
46
47 #define BIFICONID_FIRST         (ICON_NONE)
48 #define BIFNICONIDS                     (BIFICONID_LAST-BIFICONID_FIRST + 1)
49
50 #undef DEF_ICON
51 #undef DEF_VICO
52
53
54 typedef enum {
55 #define BIFCOLORSHADE_FIRST     (COLORSHADE_DARK)
56                 COLORSHADE_DARK,
57                 COLORSHADE_GREY,
58                 COLORSHADE_MEDIUM,
59                 COLORSHADE_HILITE,
60                 COLORSHADE_LIGHT,
61                 COLORSHADE_WHITE
62 #define BIFCOLORSHADE_LAST      (COLORSHADE_WHITE)
63 #define BIFNCOLORSHADES         (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1)
64 } BIFColorShade;
65
66 typedef enum {
67 #define BIFCOLORID_FIRST        (BUTGREY)
68         BUTGREY = 0,
69         BUTGREEN,
70         BUTBLUE,
71         BUTSALMON,
72         MIDGREY,
73         BUTPURPLE,
74         BUTYELLOW,
75         REDALERT,
76         BUTRUST,
77         BUTWHITE,
78         BUTDBLUE,
79         BUTPINK,
80         BUTDPINK,
81         BUTMACTIVE,
82
83         BUTIPO,
84         BUTAUDIO,
85         BUTCAMERA,
86         BUTRANDOM,
87         BUTEDITOBJECT,
88         BUTPROPERTY,
89         BUTSCENE,
90         BUTMOTION,
91         BUTMESSAGE,
92         BUTACTION,
93         BUTCD,
94         BUTGAME,
95         BUTVISIBILITY,
96         BUTYUCK,
97         BUTSEASICK,
98         BUTCHOKE,
99         BUTIMPERIAL,
100
101         BUTTEXTCOLOR,
102         BUTTEXTPRESSED,
103         BUTSBACKGROUND,
104         
105         VIEWPORTBACKCOLOR,
106         VIEWPORTGRIDCOLOR,
107         VIEWPORTACTIVECOLOR,
108         VIEWPORTSELECTEDCOLOR,
109         VIEWPORTUNSELCOLOR,
110         
111         EDITVERTSEL, 
112         EDITVERTUNSEL, 
113         EDITEDGESEL, 
114         EDITEDGEUNSEL
115         
116 #define BIFCOLORID_LAST         (EDITEDGEUNSEL)
117 #define BIFNCOLORIDS            (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1)
118
119 } BIFColorID;
120
121 enum {
122         TH_REDALERT,
123
124         TH_THEMEUI,
125 // common colors among spaces
126         
127         TH_BACK,
128         TH_TEXT,
129         TH_TEXT_HI,
130         TH_TITLE,
131         
132         TH_HEADER,
133         TH_HEADERDESEL,
134         TH_HEADER_TEXT,
135         TH_HEADER_TEXT_HI,
136         
137         /* float panels */
138         TH_PANEL,
139         TH_PANEL_TEXT,
140         TH_PANEL_TEXT_HI,
141         
142         TH_BUTBACK,
143         TH_BUTBACK_TEXT,
144         TH_BUTBACK_TEXT_HI,
145         
146         TH_SHADE1,
147         TH_SHADE2,
148         TH_HILITE,
149
150         TH_GRID,
151         TH_WIRE,
152         TH_SELECT,
153         TH_ACTIVE,
154         TH_GROUP,
155         TH_GROUP_ACTIVE,
156         TH_TRANSFORM,
157         TH_VERTEX,
158         TH_VERTEX_SELECT,
159         TH_VERTEX_SIZE,
160         TH_OUTLINE_WIDTH,
161         TH_EDGE,
162         TH_EDGE_SELECT,
163         TH_EDGE_SEAM,
164         TH_EDGE_FACESEL,
165         TH_FACE,
166         TH_FACE_SELECT,
167         TH_NORMAL,
168         TH_VNORMAL,
169         TH_FACE_DOT,
170         TH_FACEDOT_SIZE,
171         TH_CFRAME,
172         TH_NURB_ULINE,
173         TH_NURB_VLINE,
174         TH_NURB_SEL_ULINE,
175         TH_NURB_SEL_VLINE,
176
177         /* this eight colors should be in one block */
178         TH_HANDLE_FREE,
179         TH_HANDLE_AUTO,
180         TH_HANDLE_VECT,
181         TH_HANDLE_ALIGN,
182         TH_HANDLE_AUTOCLAMP,
183         TH_HANDLE_SEL_FREE,
184         TH_HANDLE_SEL_AUTO,
185         TH_HANDLE_SEL_VECT,
186         TH_HANDLE_SEL_ALIGN,
187         TH_HANDLE_SEL_AUTOCLAMP,
188
189         TH_ACTIVE_SPLINE,
190         TH_LASTSEL_POINT,
191
192         TH_SYNTAX_B,
193         TH_SYNTAX_V,
194         TH_SYNTAX_C,
195         TH_SYNTAX_L,
196         TH_SYNTAX_N,
197         
198         TH_BONE_SOLID,
199         TH_BONE_POSE,
200         
201         TH_STRIP,
202         TH_STRIP_SELECT,
203         
204         TH_LAMP,
205
206         TH_SPEAKER,
207         
208         TH_NODE,
209         TH_NODE_IN_OUT,
210         TH_NODE_OPERATOR,
211         TH_NODE_CONVERTOR,
212         TH_NODE_GROUP,
213         
214         TH_CONSOLE_OUTPUT,
215         TH_CONSOLE_INPUT,
216         TH_CONSOLE_INFO,
217         TH_CONSOLE_ERROR,
218         TH_CONSOLE_CURSOR,
219         
220         TH_SEQ_MOVIE,
221         TH_SEQ_IMAGE,
222         TH_SEQ_SCENE,
223         TH_SEQ_AUDIO,
224         TH_SEQ_EFFECT,
225         TH_SEQ_PLUGIN,
226         TH_SEQ_TRANSITION,
227         TH_SEQ_META,
228         
229         TH_EDGE_SHARP,
230         TH_EDITMESH_ACTIVE,
231         
232         TH_HANDLE_VERTEX,
233         TH_HANDLE_VERTEX_SELECT,
234         TH_HANDLE_VERTEX_SIZE,
235         
236         TH_DOPESHEET_CHANNELOB,
237         TH_DOPESHEET_CHANNELSUBOB,
238         
239         TH_PREVIEW_BACK,
240         
241         TH_EDGE_CREASE,
242
243         TH_DRAWEXTRA_EDGELEN,
244         TH_DRAWEXTRA_FACEAREA,
245         TH_DRAWEXTRA_FACEANG,
246
247         TH_NODE_CURVING,
248
249         TH_MARKER_OUTLINE,
250         TH_MARKER,
251         TH_ACT_MARKER,
252         TH_SEL_MARKER,
253         TH_BUNDLE_SOLID,
254         TH_DIS_MARKER,
255         TH_PATH_BEFORE,
256         TH_PATH_AFTER,
257         TH_CAMERA_PATH,
258         TH_LOCK_MARKER
259 };
260 /* XXX WARNING: previous is saved in file, so do not change order! */
261
262 /* specific defines per space should have higher define values */
263
264 struct bTheme;
265 struct PointerRNA;
266
267 // THE CODERS API FOR THEMES:
268
269 // sets the color
270 void    UI_ThemeColor(int colorid);
271
272 // sets the color plus alpha
273 void    UI_ThemeColor4(int colorid);
274
275 // sets color plus offset for shade
276 void    UI_ThemeColorShade(int colorid, int offset);
277
278 // sets color plus offset for alpha
279 void    UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset);
280
281 // sets color, which is blend between two theme colors
282 void    UI_ThemeColorBlend(int colorid1, int colorid2, float fac);
283 // same, with shade offset
284 void    UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset);
285 void    UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int offset, int alphaoffset);
286
287 // returns one value, not scaled
288 float   UI_GetThemeValuef(int colorid);
289 int     UI_GetThemeValue(int colorid);
290
291 // get three color values, scaled to 0.0-1.0 range
292 void    UI_GetThemeColor3fv(int colorid, float *col);
293 // get the color, range 0.0-1.0, complete with shading offset
294 void    UI_GetThemeColorShade3fv(int colorid, int offset, float *col);
295
296 // get the 3 or 4 byte values
297 void    UI_GetThemeColor3ubv(int colorid, unsigned char col[3]);
298 void    UI_GetThemeColor4ubv(int colorid, unsigned char col[4]);
299
300 // get a theme color from specified space type
301 void    UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]);
302
303 // blends and shades between two color pointers
304 void    UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset);
305
306 // shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor)
307 void    UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset);
308
309 // get a 3 byte color, blended and shaded between two other char color pointers
310 void    UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset);
311
312 // clear the openGL ClearColor using the input colorid
313 void    UI_ThemeClearColor(int colorid);
314
315 // internal (blender) usage only, for init and set active
316 void    UI_SetTheme(int spacetype, int regionid);
317
318 // get current theme
319 struct bTheme *UI_GetTheme(void);
320
321 /* only for buttons in theme editor! */
322 const unsigned char     *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
323
324 void UI_make_axis_color(const unsigned char *src_col, unsigned char *dst_col, const char axis);
325
326 #endif /*  UI_ICONS_H */