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:
authorJoshua Leung <aligorith@gmail.com>2008-12-06 12:25:42 +0300
committerJoshua Leung <aligorith@gmail.com>2008-12-06 12:25:42 +0300
commitafb45ae7cf67d18c2749a172c2a4ec5d57ce8003 (patch)
tree989660478ca582a862216a00bcf4f4bf40772075 /source/blender/makesdna/DNA_view2d_types.h
parent8a04f039adc852644bbdc8231353cce215692874 (diff)
View2D: Code cleanup - UI_view2d_status_enforce()
This commit *should* bring UI_view2d_status_enforce() (formerly known in pre 2.5 as test_view2d) under control again. I've attempted to reduce the amount of duplicated code here, so hopefully there won't be any nasty bugs that will show up in some of the other views when they are ported. Summary of changes: * Restored V2D_KEEPZOOM flag which I had previously removed, having misunderstood its function. * Fixed bugs with resizing Outliner window * Outliner width is now columns + 1 again. Documented reasons for this (otherwise, stuff gets covered by scrollbars, but we cannot see it)
Diffstat (limited to 'source/blender/makesdna/DNA_view2d_types.h')
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h
index 9af50f7dd60..34a329a0646 100644
--- a/source/blender/makesdna/DNA_view2d_types.h
+++ b/source/blender/makesdna/DNA_view2d_types.h
@@ -41,12 +41,13 @@ typedef struct View2D {
rcti vert, hor; /* vert - vertical scrollbar region; hor - horizontal scrollbar region */
rcti mask; /* mask - region (in screenspace) within which 'cur' can be viewed */
- float min[2], max[2]; /* min/max sizes? */
- float minzoom, maxzoom; /* self explanatory. allowable zoom factor range */
+ float min[2], max[2]; /* min/max sizes of 'cur' rect (only when keepzoom not set) */
+ float minzoom, maxzoom; /* self explanatory. allowable zoom factor range (only when keepzoom set) */
short scroll; /* scroll - scrollbars to display (bitflag) */
- short keeptot; /* keeptot - 'tot' rect */
- short keepaspect, keepzoom; /* axes that zoomimg cannot occur on, and need to maintain aspect ratio */
+ short keeptot; /* keeptot - 'cur' rect cannot move outside the 'tot' rect? */
+ short keepaspect; /* keepaspect - need to maintain aspect ratio (0 or 1 boolean only) */
+ short keepzoom; /* keepzoom - axes that zooming cannot occur on, and also clamp within zoom-limits */
short keepofs; /* keepofs - axes that translation is not allowed to occur on */
short flag; /* settings */
@@ -62,6 +63,7 @@ typedef struct View2D {
/* ---------------------------------- */
/* view zooming restrictions, per axis (v2d->keepzoom) */
+#define V2D_KEEPZOOM 0x0001
#define V2D_LOCKZOOM_X 0x0100
#define V2D_LOCKZOOM_Y 0x0200