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-11-28 07:01:35 +0300
committerJoshua Leung <aligorith@gmail.com>2008-11-28 07:01:35 +0300
commitc8098f953d5f6fa18a00d49d0577a72706b43b89 (patch)
tree9e447b71098f09e3a07dae175112f81690a0d42c /source/blender/makesdna/DNA_view2d_types.h
parentd6769d513e94a5552968f1ed79520e755183ca5d (diff)
View2D - Commented and finished off cleaning up code added so far
Diffstat (limited to 'source/blender/makesdna/DNA_view2d_types.h')
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h30
1 files changed, 22 insertions, 8 deletions
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