diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-16 04:17:24 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-16 04:17:24 +0400 |
commit | c7618783fbfd7636adbd8df14ddc0feb563fa58e (patch) | |
tree | f0db4365d529fdecec5d44ece8f60c85edcd4cca /source/blender/include | |
parent | d518ca6bc60e99aa556ba2810a46a023752954d6 (diff) |
- further work on view3d panels:
- you can close them (x icon) or press ESC
- option to open panel at mouse location (try Nkey)
- using 'collapse' (triangle icon) stows header in bottom
- opening again restores at old location
- dragging panels or zooming clips nicely with window
evaluate: an 'auto close' when mouse goes outside panel
Warning: vertex selecting still broken! :) It's 2 am now, bedtime...
Diffstat (limited to 'source/blender/include')
-rw-r--r-- | source/blender/include/BIF_interface.h | 14 | ||||
-rw-r--r-- | source/blender/include/BIF_space.h | 6 | ||||
-rw-r--r-- | source/blender/include/interface.h | 4 |
3 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/include/BIF_interface.h b/source/blender/include/BIF_interface.h index 3d85a56ce43..77cdcaec9a7 100644 --- a/source/blender/include/BIF_interface.h +++ b/source/blender/include/BIF_interface.h @@ -82,9 +82,13 @@ struct ScrArea; #define UI_HELV 0 #define UI_HELVB 1 -/* panel style */ -#define UI_PNL_TRANSP 0 -#define UI_PNL_SOLID 1 +/* panel controls */ +#define UI_PNL_TRANSP 1 +#define UI_PNL_SOLID 2 + +#define UI_PNL_CLOSE 32 +#define UI_PNL_STOW 64 +#define UI_PNL_TO_MOUSE 128 /* definitions for icons (and their alignment) in buttons */ @@ -251,8 +255,8 @@ void uiPanelPush(uiBlock *block); void uiPanelPop(uiBlock *block); extern uiBlock *uiFindOpenPanelBlockName(ListBase *lb, char *name); extern int uiAlignPanelStep(struct ScrArea *sa, float fac); -extern void uiSetPanelStyle(int); - +extern void uiPanelControl(int); +extern void uiSetPanelHandler(int); #endif /* BIF_INTERFACE_H */ diff --git a/source/blender/include/BIF_space.h b/source/blender/include/BIF_space.h index dccf511c275..cd99d101880 100644 --- a/source/blender/include/BIF_space.h +++ b/source/blender/include/BIF_space.h @@ -49,10 +49,6 @@ struct BWinEvent; /* is hardcoded in DNA_space_types.h */ #define SPACE_MAXHANDLER 8 -/* values for events */ -#define HANDLER_MOUSEPOS 1 -#define HANDLER_CLOSE 2 - /* view3d handler codes */ #define VIEW3D_HANDLER_BACKGROUND 1 #define VIEW3D_HANDLER_VIEW 2 @@ -71,7 +67,7 @@ void scrarea_do_headdraw (struct ScrArea *sa); void scrarea_do_headchange (struct ScrArea *sa); /* space.c */ -extern void add_blockhandler(struct ScrArea *sa, short eventcode, short val); +extern void add_blockhandler(struct ScrArea *sa, short eventcode, short action); extern void rem_blockhandler(struct ScrArea *sa, short eventcode); extern void space_set_commmandline_options(void); diff --git a/source/blender/include/interface.h b/source/blender/include/interface.h index 0a277299f8c..b9cbbbc5332 100644 --- a/source/blender/include/interface.h +++ b/source/blender/include/interface.h @@ -189,11 +189,15 @@ struct uiBlock { float xofs, yofs; // offset to parent button rctf parentrct; // for pulldowns, rect the mouse is allowed outside of menu (parent button) + + int handler; // for panels in other windows than buttonswin... just event code }; /* interface.c */ extern void ui_check_but(uiBut *but); 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); |