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