diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-12-01 14:37:05 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-12-01 14:37:05 +0300 |
commit | 1a354bd31097729b3e19b0a4786fcc7248c10ad2 (patch) | |
tree | b34e07e713e7ae91b261c1647850874c6d0e64bf /source/blender/makesdna | |
parent | 3ff7c28e7bcd5790afae0bf40ff9c421af14afd2 (diff) |
View2D - Zoom + More Scrollbar work
* Added basic (non-modal) zoom operators that use a uniform scale factor, with zoom centered using the view center as scaling point. Use Scrollwheel up/down and Pad +/- to use this.
* Added back the 'button'/bubble for the scrollbars. I've added dark lines on either end of it for some later work on zooming widgets.
This is not the final form they'll take. I still need to decide how to handle those scrollbars which act as grid-markers too (showing timescale, etc.), before trying to integrate that with some fancy scrollbar drawing (rounded, etc.)
Assorted changes:
* Moved vertical scrollbar for Outliner to right hand side
* Made Timeline use standard scrollbars, and turned on various clamping options
* Fixed ortho-matrix corrections for scrollbars, and added pixel offsets
* Made Timeline markers sit more snugly on the scrollbar. They were a bit far out...
* Fixed memory leak with view2d keymaps not being freed when Blender exited
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 12 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view2d_types.h | 18 |
2 files changed, 18 insertions, 12 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 2f25d96f285..28ec73a00d1 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -181,18 +181,6 @@ typedef struct ARegion { #define WIN_BACK_OK 2 #define WIN_EQUAL 3 -/* scrollbar flags for View2D */ - /* left scrollbar */ -#define L_SCROLL 1 -#define R_SCROLL 2 -#define VERT_SCROLL 3 -#define T_SCROLL 4 -#define B_SCROLL 8 -#define HOR_SCROLL 12 - /* special hack for outliner hscroll - prevent hanging older versions of Blender */ -#define B_SCROLLO 16 -#define HOR_SCROLLO 20 - /* Panel->snap - for snapping to screen edges */ #define PNL_SNAP_NONE 0 #define PNL_SNAP_TOP 1 diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 0a44b6b8759..683a40a3682 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -82,5 +82,23 @@ typedef struct View2D { /* width */ #define SCROLLB 16 +/* scrollbar flags for View2D */ + /* left scrollbar */ +#define L_SCROLL (1<<0) +#define R_SCROLL (1<<1) +#define VERT_SCROLL (L_SCROLL|R_SCROLL) + /* horizontal scrollbar */ +#define T_SCROLL (1<<2) +#define B_SCROLL (1<<3) +#define HOR_SCROLL (T_SCROLL|B_SCROLL) + /* special hacks for outliner hscroll - prevent hanging older versions of Blender */ +#define B_SCROLLO (1<<4) +#define HOR_SCROLLO (T_SCROLL|B_SCROLLO) + /* scale markings */ +#define LGRID_SCROLL (1<<5) +#define RGRID_SCROLL (1<<6) +#define BGRID_SCROLL (1<<7) +#define TGRID_SCROLL (1<<8) + #endif |