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>2004-10-03 17:49:54 +0400
committerTon Roosendaal <ton@blender.org>2004-10-03 17:49:54 +0400
commit3a840670a52701e8690a5d201bcb57eac45e2c8a (patch)
tree0341f7c09a337d8d43d0fca51376314476ac2905 /source/blender/include
parent6e4b9ad96b3894e432a1561d1902f656aaa799c0 (diff)
Lots of small changes, all for UI in Blender;
----- Killed UI frontbuffer draw The interface toolkit was drawing all live updates (while using menus/buttons) in the frontbuffer. This isn't well supported cross-platform, so time to be killed once. Now it uses *only* glReadPixels and glCopyPixels for frontbuffer access. Live updates or menus now are drawn in backbuffer always, and copied to front when needed. NOTE: it was tested, but needs thorough review! On PC systems I suspects backbuffer selection to screw up (check!). On SGI/SUN workstations it should work smooth; but I need evidence ----- Smaller fixes; - AA fonts were garbled on ATI systems. Now the AA fonts are drawn exact on pixel positions. Needs the new FTGL libb too, patch is on maillist - Rounded theme uses antialiased outlines - Pulldown and popup menus have nice softshadow now - New button type 'PULLDOWN', thats the one that callsup a pulldown menu. Should be added to themes, as is the full menu/pulldown drawing - Screendump for 1 window does the full window now, including header - Empty pulldowns (for example running blender without scripts) give no drawing error anymore For review & fun; - added curved lines as connectors, for Oops window
Diffstat (limited to 'source/blender/include')
-rw-r--r--source/blender/include/BIF_interface.h4
-rw-r--r--source/blender/include/BIF_screen.h6
-rw-r--r--source/blender/include/interface.h24
3 files changed, 23 insertions, 11 deletions
diff --git a/source/blender/include/BIF_interface.h b/source/blender/include/BIF_interface.h
index a006c1ef44f..9f8afd76ea6 100644
--- a/source/blender/include/BIF_interface.h
+++ b/source/blender/include/BIF_interface.h
@@ -147,6 +147,7 @@ struct ScrArea;
#define KEYEVT (24<<9)
#define ICONTEXTROW (25<<9)
#define HSVCUBE (26<<9)
+#define PULLDOWN (27<<9)
#define BUTTYPE (31<<9)
@@ -156,7 +157,7 @@ typedef struct uiBut uiBut;
typedef struct uiBlock uiBlock;
void uiEmboss(float x1, float y1, float x2, float y2, int sel);
-void uiRoundBoxEmboss(float minx, float miny, float maxx, float maxy, float rad);
+void uiRoundBoxEmboss(float minx, float miny, float maxx, float maxy, float rad, int active);
void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad);
void uiSetRoundBox(int type);
void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad);
@@ -237,6 +238,7 @@ void uiDefIDPoinBut(struct uiBlock *block,
typedef uiBlock* (*uiBlockFuncFP) (void *arg1);
uiBut *uiDefBlockBut(uiBlock *block, uiBlockFuncFP func, void *func_arg1, char *str, short x1, short y1, short x2, short y2, char *tip);
+uiBut *uiDefPulldownBut(uiBlock *block, uiBlockFuncFP func, void *func_arg1, char *str, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockFuncFP func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip);
diff --git a/source/blender/include/BIF_screen.h b/source/blender/include/BIF_screen.h
index c99ea545bb1..021ce12dea5 100644
--- a/source/blender/include/BIF_screen.h
+++ b/source/blender/include/BIF_screen.h
@@ -89,7 +89,11 @@ void add_readfile_event(char *filename);
short ext_qtest(void);
unsigned short extern_qread(short *val);
unsigned short extern_qread_ext(short *val, char *ascii);
-void markdirty_all(void);
+
+extern void markdirty_all(void); // also sets redraw event
+extern void markdirty_all_back(void);
+extern void markdirty_win_back(short winid);
+
void screen_swapbuffers(void);
void set_debug_swapbuffers_ovveride(struct bScreen *sc, int mode);
int is_allowed_to_change_screen(struct bScreen *newp);
diff --git a/source/blender/include/interface.h b/source/blender/include/interface.h
index 7ebc9ffb72e..281e2e4be10 100644
--- a/source/blender/include/interface.h
+++ b/source/blender/include/interface.h
@@ -51,9 +51,8 @@
/* warn: rest of uiBut->flag in BIF_interface.c */
-/* block->frontbuf: (only internal here), to nice localize the old global var uiFrontBuf */
-#define UI_NEED_DRAW_FRONT 1
-#define UI_HAS_DRAW_FRONT 2
+/* block->frontbuf: (only internal here). this signals something was drawn, for flush */
+#define UI_HAS_DRAWN 1
/* internal panel drawing defines */
@@ -141,7 +140,7 @@ struct uiBut {
BIFIconID icon;
short but_align; /* aligning buttons, horiz/vertical */
short lock, win;
- short iconadd;
+ short iconadd, dt;
/* IDPOIN data */
uiIDPoinFuncFP idpoin_func;
@@ -187,34 +186,41 @@ struct uiBlock {
int afterval, flag;
void *curfont;
- short autofill, win, winq, direction, dt, frontbuf, auto_open; //frontbuf see below
- void *saveunder;
+ short autofill, win, winq, direction, dt, frontbuf, auto_open, pad; //frontbuf see below
+ void *overdraw;
float xofs, yofs; // offset to parent button
rctf parentrct; // for pulldowns, rect the mouse is allowed outside of menu (parent button)
rctf safety; // pulldowns, to detect outside, can differ per case how it is created
+ rctf flush; // rect to be flushed to frontbuffer
int handler; // for panels in other windows than buttonswin... just event code
};
/* interface.c */
+
+extern void ui_graphics_to_window(int win, float *x, float *y);
+extern void ui_window_to_graphics(int win, float *x, float *y);
+
+extern void ui_block_flush_back(uiBlock *block);
+extern void ui_block_set_flush(uiBlock *block, uiBut *but);
+
extern void ui_check_but(uiBut *but);
extern double ui_get_but_val(uiBut *but);
extern void ui_get_but_vectorf(uiBut *but, float *vec);
extern void ui_set_but_vectorf(uiBut *but, float *vec);
extern void ui_autofill(uiBlock *block);
-extern void ui_graphics_to_window(int win, float *x, float *y);
-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(int mode, float minx, float miny, float maxx, float maxy, float rad);
-extern void gl_round_box_shade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shade);
+extern void gl_round_box_shade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown);
/* interface_draw.c */
extern void ui_set_embossfunc(uiBut *but, int drawtype);
extern void ui_draw_but(uiBut *but);
+extern void ui_rasterpos_safe(float x, float y, float aspect);
#endif