diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-12-07 15:15:04 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-12-07 15:15:04 +0300 |
commit | ed015907df3f08874cd4ac4f21907e7257f0da9b (patch) | |
tree | bea31fcef8a4b2ac611eb4d9504a0e3b70531908 /source/blender/makesdna/DNA_view2d_types.h | |
parent | efdb726cf34b709148e72b5a29dfe8e500a7bb8d (diff) |
View2D: Scroller Manipulations
Implemented operator to work with scrollers. This should work reasonably well, but as always, more testing is needed.
* LMB-drag can now be used to initiate manipulations of scrollbars (so they can be dragged as per normal)
* By clicking on the 'dark regions' on the ends of the scroll bubble, it is possible to zoom the view (in a way similar to Sony Vegas scrollbars)
Tidied up code of other operators
* Re-labelled the current zoom operators, as there is still a modal click-drag zoom tool to be ported still
* Marked all of the existing view manipulation operators as redoable. Scrollers manipulator is not allowed to be redoable.
Assorted changes:
* Added more flags for Outliner on reading old files, to prevent more weird things happening as code expects certain flags these days
Diffstat (limited to 'source/blender/makesdna/DNA_view2d_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_view2d_types.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index 34a329a0646..4d027f2efea 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -77,11 +77,16 @@ typedef struct View2D { /* within region view2d vertical locking */ #define V2D_VIEWSYNC_Y (1<<1) -/* scrollbar thickness */ + +/* scroller thickness */ #define V2D_SCROLL_HEIGHT 16 #define V2D_SCROLL_WIDTH 16 -/* scrollbar flags for View2D (v2d->scroll) */ +/* half the size (in pixels) of scroller 'handles' */ +#define V2D_SCROLLER_HANDLE_SIZE 8 + + +/* scroller flags for View2D (v2d->scroll) */ /* left scrollbar */ #define V2D_SCROLL_LEFT (1<<0) #define V2D_SCROLL_RIGHT (1<<1) @@ -104,7 +109,7 @@ typedef struct View2D { /* alignment flags for totrect, flags use 'shading-out' convention (v2d->align) */ /* all quadrants free */ -#define V2D_ALIGN_FREE 0 +#define V2D_ALIGN_FREE 0 /* horizontal restrictions */ #define V2D_ALIGN_NO_POS_X (1<<0) #define V2D_ALIGN_NO_NEG_X (1<<1) |