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-11-14 03:44:48 +0300
committerTon Roosendaal <ton@blender.org>2003-11-14 03:44:48 +0300
commita291ea6683b02ac81c21e555652eeaa7653e7f95 (patch)
treed609cd266d469bd27b4a5b980371c32142ec3a7a /source/blender/include
parentbaf23c76486e136c0ae533c741e7e9ee45e64d81 (diff)
- Added button align code:
uiBlockBeginAlign(block, 'v'); 'v'= vertical. 'h'=horizontal ..... (button def calls) uiBlockEndAlign(block); this will allow new themes to have buttons nicely drawn together. - added new rounded draw theme, to test & illustrate the above. - only did parts of button code with align... rest for later - fixed 'minimal' theme to make it usable (with some decoration) - put back 'oldskool' theme... but it just looks plain ugly! remove? Lazy people: http://www.blender.org/bf/rt.jpg check the top header, or Nkey menu, to see the meaning of 'align'.
Diffstat (limited to 'source/blender/include')
-rw-r--r--source/blender/include/BIF_interface.h12
-rw-r--r--source/blender/include/interface.h11
2 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/include/BIF_interface.h b/source/blender/include/BIF_interface.h
index 1d8efa83efe..3340aec5c4a 100644
--- a/source/blender/include/BIF_interface.h
+++ b/source/blender/include/BIF_interface.h
@@ -74,6 +74,7 @@ struct ScrArea;
#define UI_BLOCK_BUSY 8
#define UI_BLOCK_NUMSELECT 16
#define UI_BLOCK_ENTER_OK 32
+ /* block->flag bits 12-15 are identical to but->flag bits */
/* block->font, for now: bold = medium+1 */
#define UI_HELV 0
@@ -100,6 +101,13 @@ struct ScrArea;
#define UI_MAKE_RIGHT 1024
/* dont draw hilite on mouse over */
#define UI_NO_HILITE 2048
+ /* button align flag, for drawing groups together */
+#define UI_BUT_ALIGN (15<<12)
+#define UI_BUT_ALIGN_TOP (1<<12)
+#define UI_BUT_ALIGN_LEFT (1<<13)
+#define UI_BUT_ALIGN_RIGHT (1<<14)
+#define UI_BUT_ALIGN_DOWN (1<<15)
+
/* Button types */
#define CHA 32
@@ -166,6 +174,10 @@ void uiFreeBlocks(struct ListBase *lb);
void uiFreeBlocksWin(struct ListBase *lb, int win);
uiBlock *uiNewBlock(struct ListBase *lb, char *name, short dt, short font, short win);
uiBlock *uiGetBlock(char *name, struct ScrArea *sa);
+
+void uiBlockBeginAlign(uiBlock *block, char dir);
+void uiBlockEndAlign(uiBlock *block);
+
uiBut *uiDefBut(uiBlock *block,
int type, int retval, char *str,
short x1, short y1,
diff --git a/source/blender/include/interface.h b/source/blender/include/interface.h
index 614ed0ede65..a753ab98016 100644
--- a/source/blender/include/interface.h
+++ b/source/blender/include/interface.h
@@ -111,8 +111,9 @@ typedef struct {
struct uiBut {
uiBut *next, *prev;
- short type, pointype, bit, bitnr, retval, flag, strwidth, ofs, pos;
-
+ short type, pointype, bit, bitnr, retval, strwidth, ofs, pos;
+ int flag;
+
char *str;
char strdata[UI_MAX_NAME_STR];
char drawstr[UI_MAX_DRAW_STR];
@@ -182,13 +183,12 @@ struct uiBlock {
void (*drawextra)();
int themecol; /* themecolor id */
- short but_align; /* aligning buttons, horiz/vertical */
short font; /* indices */
- int afterval;
+ int afterval, flag;
void *curfont;
- short autofill, flag, win, winq, direction, dt, frontbuf, auto_open; //frontbuf see below
+ short autofill, win, winq, direction, dt, frontbuf, auto_open; //frontbuf see below
void *saveunder;
float xofs, yofs; // offset to parent button
@@ -208,6 +208,7 @@ extern void ui_window_to_graphics(int win, float *x, float *y);
/* interface_panel.c */
extern void ui_draw_panel(uiBlock *block);
extern void ui_do_panel(uiBlock *block, uiEvent *uevent);
+extern void gl_round_box(float minx, float miny, float maxx, float maxy, float rad);
/* interface_draw.c */
extern void ui_set_embossfunc(uiBut *but, int drawtype);