From c8098f953d5f6fa18a00d49d0577a72706b43b89 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 28 Nov 2008 04:01:35 +0000 Subject: View2D - Commented and finished off cleaning up code added so far --- source/blender/makesdna/DNA_view2d_types.h | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'source/blender/makesdna/DNA_view2d_types.h') diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index d7c422407ca..d4425b43f76 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -24,7 +24,7 @@ * * The Original Code is: all of this file. * - * Contributor(s): none yet. + * Contributor(s): Joshua Leung * * ***** END GPL LICENSE BLOCK ***** */ @@ -33,32 +33,46 @@ #include "DNA_vec_types.h" +/* ---------------------------------- */ + +/* View 2D data - stored per region */ typedef struct View2D { rctf tot, cur; rcti vert, hor, mask; + float min[2], max[2]; float minzoom, maxzoom; - short scroll, keeptot; + + short scroll, keeptot; /* scroll - scrollbars to display (bitflag); keeptot - 'tot' rect */ short keepaspect, keepzoom; short oldwinx, oldwiny; - int flag; - float cursor[2]; /* only used in the UV view for now*/ - short around; + int flag; /* settings */ + + float cursor[2]; /* only used in the UV view for now (for 2D-cursor) */ + short around; /* pivot point for transforms (rotate and scale) */ char pad[6]; } View2D; +/* ---------------------------------- */ + /* v2d->keepzoom */ #define V2D_KEEPZOOM 0x0001 #define V2D_LOCKZOOM_X 0x0100 #define V2D_LOCKZOOM_Y 0x0200 /* event codes for locking function */ -#define V2D_LOCK_COPY 1 -#define V2D_LOCK_REDRAW 2 +#define V2D_LOCK_COPY 1 +#define V2D_LOCK_REDRAW 2 /* v2d->flag */ -#define V2D_VIEWLOCK 1 +#define V2D_VIEWLOCK (1<<0) + +/* scrollbar thickness */ + /* height */ +#define SCROLLH 16 + /* width */ +#define SCROLLB 16 #endif -- cgit v1.2.3