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:
authorMatt Ebb <matt@mke3.net>2006-04-26 18:47:04 +0400
committerMatt Ebb <matt@mke3.net>2006-04-26 18:47:04 +0400
commit444f4e894f0b70be2eba90dfc4d0a6fdee96c3f9 (patch)
tree93ca5753fca9a916ffd041ce28146ae0d7eb92e9 /source/blender/makesdna/DNA_screen_types.h
parentb69db8f090a2c49a9236893ece38aba2dd25e614 (diff)
== interface ==
* Floating panel edge snapping Floating panels now have a snapping mechanism that sticks them to the edge of a window when you drag them within a small range of it. This not only allows nice easy alignment of panels within a window, but also keeps them stuck to window edges when the window is resized. This means that you no longer get panels that were once on the edge of the window left drifting in the middle of your view if you resize it larger, which was rather annoying before. Another goodie is that panels snapped to the bottom edge of the screen will minimise down to the bottom when collapsed, and will move back up to be edge aligned when maximised again, preventing collapsed panels down here from hanging around in space.
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index e0b2a337d9f..82588b19886 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -85,7 +85,8 @@ typedef struct Panel { /* the part from uiBlock that needs saved in file */
char panelname[64], tabname[64]; /* defined as UI_MAX_NAME_STR */
short ofsx, ofsy, sizex, sizey;
short flag, active; /* active= used currently by a uiBlock */
- short control, pad;
+ short control;
+ short snap;
short old_ofsx, old_ofsy; /* for stow */
int sortcounter; /* when sorting panels, it uses this to put new ones in right place */
struct Panel *paneltab; /* this panel is tabbed in *paneltab */
@@ -147,6 +148,15 @@ typedef struct ScrArea {
#define B_SCROLL 8
#define HOR_SCROLL 12
+/* Panel->snap - for snapping to screen edges */
+#define PNL_SNAP_NONE 0
+#define PNL_SNAP_TOP 1
+#define PNL_SNAP_RIGHT 2
+#define PNL_SNAP_BOTTOM 4
+#define PNL_SNAP_LEFT 8
+
+#define PNL_SNAP_DIST 9.0
+
/* screen handlers */
#define SCREEN_MAXHANDLER 8