|
Blender
V2.59
|
00001 /* 00002 * $Id: UI_resources.h 39015 2011-08-04 10:05:14Z jbakker $ 00003 * 00004 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. The Blender 00010 * Foundation also sells licenses for use in proprietary software under 00011 * the Blender License. See http://www.blender.org/BL/ for information 00012 * about this. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software Foundation, 00021 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00022 * 00023 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00024 * All rights reserved. 00025 * 00026 * The Original Code is: all of this file. 00027 * 00028 * Contributor(s): none yet. 00029 * 00030 * ***** END GPL/BL DUAL LICENSE BLOCK ***** 00031 */ 00032 00037 #ifndef UI_RESOURCES_H 00038 #define UI_RESOURCES_H 00039 00040 /* elubie: TODO: move the typedef for icons to UI_interface_icons.h */ 00041 /* and add/replace include of UI_resources.h by UI_interface_icons.h */ 00042 #define DEF_ICON(name) ICON_##name, 00043 #define DEF_VICO(name) VICO_##name, 00044 00045 typedef enum { 00046 /* ui */ 00047 #include "UI_icons.h" 00048 BIFICONID_LAST 00049 } BIFIconID; 00050 00051 #define BIFICONID_FIRST (ICON_NONE) 00052 #define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1) 00053 00054 #undef DEF_ICON 00055 #undef DEF_VICO 00056 00057 00058 typedef enum { 00059 #define BIFCOLORSHADE_FIRST (COLORSHADE_DARK) 00060 COLORSHADE_DARK, 00061 COLORSHADE_GREY, 00062 COLORSHADE_MEDIUM, 00063 COLORSHADE_HILITE, 00064 COLORSHADE_LIGHT, 00065 COLORSHADE_WHITE 00066 #define BIFCOLORSHADE_LAST (COLORSHADE_WHITE) 00067 #define BIFNCOLORSHADES (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1) 00068 } BIFColorShade; 00069 00070 typedef enum { 00071 #define BIFCOLORID_FIRST (BUTGREY) 00072 BUTGREY = 0, 00073 BUTGREEN, 00074 BUTBLUE, 00075 BUTSALMON, 00076 MIDGREY, 00077 BUTPURPLE, 00078 BUTYELLOW, 00079 REDALERT, 00080 BUTRUST, 00081 BUTWHITE, 00082 BUTDBLUE, 00083 BUTPINK, 00084 BUTDPINK, 00085 BUTMACTIVE, 00086 00087 BUTIPO, 00088 BUTAUDIO, 00089 BUTCAMERA, 00090 BUTRANDOM, 00091 BUTEDITOBJECT, 00092 BUTPROPERTY, 00093 BUTSCENE, 00094 BUTMOTION, 00095 BUTMESSAGE, 00096 BUTACTION, 00097 BUTCD, 00098 BUTGAME, 00099 BUTVISIBILITY, 00100 BUTYUCK, 00101 BUTSEASICK, 00102 BUTCHOKE, 00103 BUTIMPERIAL, 00104 00105 BUTTEXTCOLOR, 00106 BUTTEXTPRESSED, 00107 BUTSBACKGROUND, 00108 00109 VIEWPORTBACKCOLOR, 00110 VIEWPORTGRIDCOLOR, 00111 VIEWPORTACTIVECOLOR, 00112 VIEWPORTSELECTEDCOLOR, 00113 VIEWPORTUNSELCOLOR, 00114 00115 EDITVERTSEL, 00116 EDITVERTUNSEL, 00117 EDITEDGESEL, 00118 EDITEDGEUNSEL 00119 00120 #define BIFCOLORID_LAST (EDITEDGEUNSEL) 00121 #define BIFNCOLORIDS (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1) 00122 00123 } BIFColorID; 00124 00125 enum { 00126 TH_REDALERT, 00127 00128 TH_THEMEUI, 00129 // common colors among spaces 00130 00131 TH_BACK, 00132 TH_TEXT, 00133 TH_TEXT_HI, 00134 TH_TITLE, 00135 00136 TH_HEADER, 00137 TH_HEADERDESEL, 00138 TH_HEADER_TEXT, 00139 TH_HEADER_TEXT_HI, 00140 00141 /* float panels */ 00142 TH_PANEL, 00143 TH_PANEL_TEXT, 00144 TH_PANEL_TEXT_HI, 00145 00146 TH_BUTBACK, 00147 TH_BUTBACK_TEXT, 00148 TH_BUTBACK_TEXT_HI, 00149 00150 TH_SHADE1, 00151 TH_SHADE2, 00152 TH_HILITE, 00153 00154 TH_GRID, 00155 TH_WIRE, 00156 TH_SELECT, 00157 TH_ACTIVE, 00158 TH_GROUP, 00159 TH_GROUP_ACTIVE, 00160 TH_TRANSFORM, 00161 TH_VERTEX, 00162 TH_VERTEX_SELECT, 00163 TH_VERTEX_SIZE, 00164 TH_OUTLINE_WIDTH, 00165 TH_EDGE, 00166 TH_EDGE_SELECT, 00167 TH_EDGE_SEAM, 00168 TH_EDGE_FACESEL, 00169 TH_FACE, 00170 TH_FACE_SELECT, 00171 TH_NORMAL, 00172 TH_VNORMAL, 00173 TH_FACE_DOT, 00174 TH_FACEDOT_SIZE, 00175 TH_CFRAME, 00176 TH_NURB_ULINE, 00177 TH_NURB_VLINE, 00178 TH_NURB_SEL_ULINE, 00179 TH_NURB_SEL_VLINE, 00180 00181 /* this eight colors should be in one block */ 00182 TH_HANDLE_FREE, 00183 TH_HANDLE_AUTO, 00184 TH_HANDLE_VECT, 00185 TH_HANDLE_ALIGN, 00186 TH_HANDLE_SEL_FREE, 00187 TH_HANDLE_SEL_AUTO, 00188 TH_HANDLE_SEL_VECT, 00189 TH_HANDLE_SEL_ALIGN, 00190 00191 TH_ACTIVE_SPLINE, 00192 TH_LASTSEL_POINT, 00193 00194 TH_SYNTAX_B, 00195 TH_SYNTAX_V, 00196 TH_SYNTAX_C, 00197 TH_SYNTAX_L, 00198 TH_SYNTAX_N, 00199 00200 TH_BONE_SOLID, 00201 TH_BONE_POSE, 00202 00203 TH_STRIP, 00204 TH_STRIP_SELECT, 00205 00206 TH_LAMP, 00207 00208 TH_NODE, 00209 TH_NODE_IN_OUT, 00210 TH_NODE_OPERATOR, 00211 TH_NODE_CONVERTOR, 00212 TH_NODE_GROUP, 00213 00214 TH_CONSOLE_OUTPUT, 00215 TH_CONSOLE_INPUT, 00216 TH_CONSOLE_INFO, 00217 TH_CONSOLE_ERROR, 00218 TH_CONSOLE_CURSOR, 00219 00220 TH_SEQ_MOVIE, 00221 TH_SEQ_IMAGE, 00222 TH_SEQ_SCENE, 00223 TH_SEQ_AUDIO, 00224 TH_SEQ_EFFECT, 00225 TH_SEQ_PLUGIN, 00226 TH_SEQ_TRANSITION, 00227 TH_SEQ_META, 00228 00229 TH_EDGE_SHARP, 00230 TH_EDITMESH_ACTIVE, 00231 00232 TH_HANDLE_VERTEX, 00233 TH_HANDLE_VERTEX_SELECT, 00234 TH_HANDLE_VERTEX_SIZE, 00235 00236 TH_DOPESHEET_CHANNELOB, 00237 TH_DOPESHEET_CHANNELSUBOB, 00238 00239 TH_PREVIEW_BACK, 00240 00241 TH_EDGE_CREASE, 00242 00243 TH_DRAWEXTRA_EDGELEN, 00244 TH_DRAWEXTRA_FACEAREA, 00245 TH_DRAWEXTRA_FACEANG, 00246 00247 TH_NODE_CURVING 00248 }; 00249 /* XXX WARNING: previous is saved in file, so do not change order! */ 00250 00251 /* specific defines per space should have higher define values */ 00252 00253 struct bTheme; 00254 struct PointerRNA; 00255 00256 // THE CODERS API FOR THEMES: 00257 00258 // sets the color 00259 void UI_ThemeColor(int colorid); 00260 00261 // sets the color plus alpha 00262 void UI_ThemeColor4(int colorid); 00263 00264 // sets color plus offset for shade 00265 void UI_ThemeColorShade(int colorid, int offset); 00266 00267 // sets color plus offset for alpha 00268 void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset); 00269 00270 // sets color, which is blend between two theme colors 00271 void UI_ThemeColorBlend(int colorid1, int colorid2, float fac); 00272 // same, with shade offset 00273 void UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset); 00274 void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int offset, int alphaoffset); 00275 00276 // returns one value, not scaled 00277 float UI_GetThemeValuef(int colorid); 00278 int UI_GetThemeValue(int colorid); 00279 00280 // get three color values, scaled to 0.0-1.0 range 00281 void UI_GetThemeColor3fv(int colorid, float *col); 00282 // get the color, range 0.0-1.0, complete with shading offset 00283 void UI_GetThemeColorShade3fv(int colorid, int offset, float *col); 00284 00285 // get the 3 or 4 byte values 00286 void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]); 00287 void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]); 00288 00289 // get a theme color from specified space type 00290 void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]); 00291 00292 // blends and shades between two color pointers 00293 void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset); 00294 00295 // get a 3 byte color, blended and shaded between two other char color pointers 00296 void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset); 00297 00298 // clear the openGL ClearColor using the input colorid 00299 void UI_ThemeClearColor(int colorid); 00300 00301 // internal (blender) usage only, for init and set active 00302 void UI_SetTheme(int spacetype, int regionid); 00303 00304 /* only for buttons in theme editor! */ 00305 const unsigned char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid); 00306 00307 void UI_make_axis_color(const unsigned char *src_col, unsigned char *dst_col, const char axis); 00308 00309 #endif /* UI_ICONS_H */