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/interface.h
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/interface.h')
-rw-r--r--source/blender/include/interface.h24
1 files changed, 15 insertions, 9 deletions
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