Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2003-10-17 18:02:08 +0400
committerTon Roosendaal <ton@blender.org>2003-10-17 18:02:08 +0400
commit0321602b6524ee2f7139610824893695d2f59b68 (patch)
treed38b4cde5cfdb7ace2671f730c4c4ee515bb980c /source/blender/include
parent00cf36d6a5ce06f07960616bc06d06ceeea0f886 (diff)
- The basic layer for Themes in place!
- currently only implemented for 3d window - create as many themes you like, and name them - default theme is not editable, and always will be defined at startup (initTheme) - saves in .B.blend - themes for spaces can become local too, so you can set individual 3d windows at theme 'Maya' or so. (to be implemented) - it uses alpha as well...! API: This doesnt use the old method with BFCOLORID blahblah. The API is copied from OpenGL conventions (naming) as much as possible: - void BIF_ThemeColor(ScrArea *sa, int colorid) sets a color... id's are in BIF_resources.h (TH_GRID, TH_WIRE, etc) - void BIF_ThemeColorShade(ScrArea *sa, int colorid, int offset) sets a color with offset, no more weird COLORSHADE_LGREY stuff - void BIF_GetThemeColor3fv(ScrArea *sa, int colorid, float *col) like opengl, this gives you in *col the three rgb values - void BIF_GetThemeColor4ubv(ScrArea *sa, int colorid, char *col) or the one to get 4 bytes ThemeColor calls for globals (UI etc) can also call NULL for *sa... this is to be implemented still. Next step: cleaning up interface.c for all weird colorcalls.
Diffstat (limited to 'source/blender/include')
-rw-r--r--source/blender/include/BIF_interface.h2
-rw-r--r--source/blender/include/BIF_resources.h57
-rw-r--r--source/blender/include/BSE_drawoops.h3
-rw-r--r--source/blender/include/butspace.h7
4 files changed, 66 insertions, 3 deletions
diff --git a/source/blender/include/BIF_interface.h b/source/blender/include/BIF_interface.h
index 188caf77bae..579810a5903 100644
--- a/source/blender/include/BIF_interface.h
+++ b/source/blender/include/BIF_interface.h
@@ -89,7 +89,7 @@ struct ScrArea;
#define UI_PNL_CLOSE 32
#define UI_PNL_STOW 64
#define UI_PNL_TO_MOUSE 128
-
+#define UI_PNL_UNSTOW 256
/* definitions for icons (and their alignment) in buttons */
/* warning the first 4 flags are internal */
diff --git a/source/blender/include/BIF_resources.h b/source/blender/include/BIF_resources.h
index 01f04f0f35e..d81c18068f8 100644
--- a/source/blender/include/BIF_resources.h
+++ b/source/blender/include/BIF_resources.h
@@ -324,9 +324,61 @@ typedef enum {
#define BIFNCOLORIDS (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1)
} BIFColorID;
+
+/* ---------- theme ----------- */
+
+// uibutton colors
+
+
+#define TH_THEMEUI 99
+
+// common colors among spaces
+
+enum {
+ TH_BACK = 100,
+ TH_TEXT,
+ TH_TEXT_HI,
+ TH_HEADER,
+ TH_PANEL,
+ TH_SHADE1,
+ TH_SHADE2,
+ TH_HILITE,
+
+ TH_GRID,
+ TH_WIRE,
+ TH_SELECT,
+ TH_ACTIVE,
+ TH_TRANSFORM,
+ TH_VERTEX,
+ TH_VERTEX_SELECT,
+ TH_VERTEX_SIZE,
+ TH_EDGE,
+ TH_EDGE_SELECT,
+ TH_FACE,
+ TH_FACE_SELECT
+};
+
+/* specific defines per space should have higher define values */
+
+struct bTheme;
+
+void BIF_InitThemeColors(void);
+void BIF_ThemeColor(struct ScrArea *sa, int colorid);
+void BIF_ThemeColor4(struct ScrArea *sa, int colorid);
+void BIF_ThemeColorShade(struct ScrArea *sa, int colorid, int offset);
+
+// get only one value, not scaled
+float BIF_GetThemeColorf(struct ScrArea *sa, int colorid);
+// get three color values, scaled to 0.0-1.0 range
+void BIF_GetThemeColor3fv(struct ScrArea *sa, int colorid, float *col);
+// get the byte values
+void BIF_GetThemeColor3ubv(struct ScrArea *sa, int colorid, char *col);
+void BIF_GetThemeColor4ubv(struct ScrArea *sa, int colorid, char *col);
+
void BIF_resources_init (void);
void BIF_resources_free (void);
+
int BIF_get_icon_width (BIFIconID icon);
int BIF_get_icon_height (BIFIconID icon);
void BIF_draw_icon (BIFIconID icon);
@@ -334,4 +386,9 @@ void BIF_draw_icon_blended (BIFIconID icon, BIFColorID color, BIFColorShade shad
void BIF_set_color (BIFColorID color, BIFColorShade shade);
+/* only for buttons in theme editor! */
+char *BIF_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
+char *BIF_ThemeColorsPup(int spacetype);
+
+
#endif /* BIF_ICONS_H */
diff --git a/source/blender/include/BSE_drawoops.h b/source/blender/include/BSE_drawoops.h
index b042fc097fa..78a8107f8e2 100644
--- a/source/blender/include/BSE_drawoops.h
+++ b/source/blender/include/BSE_drawoops.h
@@ -35,7 +35,6 @@
struct ScrArea;
struct Oops;
-struct uiBlock;
void boundbox_oops(void);
void give_oopslink_line(struct Oops *oops, struct OopsLink *ol, float *v1, float *v2);
@@ -44,7 +43,7 @@ void draw_icon_oops(float *co, short type);
void mysbox(float x1, float y1, float x2, float y2);
unsigned int give_oops_color(short type, short sel, unsigned int *border);
void calc_oopstext(char *str, float *v1);
-void draw_oops(struct Oops *oops, struct uiBlock *block);
+void draw_oops(struct Oops *oops);
void drawoopsspace(struct ScrArea *sa, void *spacedata);
#endif /* BSE_DRAWOOPS */
diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h
index 013c2184bf6..aa196a8d32b 100644
--- a/source/blender/include/butspace.h
+++ b/source/blender/include/butspace.h
@@ -491,6 +491,13 @@ enum {
B_CONSTRAINT_CHANGENAME,
B_CONSTRAINT_CHANGETARGET
};
+/* *********************** */
+
+#define B_INFOBUTS 3400
+/* defines local in space.c only */
+
+/* *********************** */
+
/* *********************** */
/* BUTTON BUT: > 4000 */