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:
authorTon Roosendaal <ton@blender.org>2008-01-07 21:03:41 +0300
committerTon Roosendaal <ton@blender.org>2008-01-07 21:03:41 +0300
commit1363134dee60ce96ab0772b72283fb405b6a75ed (patch)
treeece7c62b984d1ebfa8fd1fe1890332c75efa234d /source/blender/makesdna/DNA_screen_types.h
parent1005d99ea5190f34c56f6b30d5eca6bf738a78e8 (diff)
Whole lot of changes.... here a shortlist:
- removed editors/area and put this all in screen - added first python calls (note, a new c file for scriptlinks) - added view3d editor callbacks (no drawing yet) - added files in editors/interface (Cmake and Scons has to be fixed, help welcome!) - now areas/headers are being converted on file read - note: previously saved 2.50 files will crash!!! (.B.blend) - area regions are being drawn, first handler for cursor added (on edge) - window duplicate and scale works correct for screen subdiv Todos for me: - need to fix things in syntax (function names) a bit still - more operators for screen - define how Context will work... still unresolved when it gets set - docs! Reviews of code structure is welcome! There are also more todos now for others, but it can wait a couple of days
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h75
1 files changed, 55 insertions, 20 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 127e658308a..953877953d9 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -35,24 +35,30 @@
#include "DNA_scriptlink_types.h"
struct Scene;
-struct wmSubWindow;
+struct SpaceType;
+struct SpaceLink;
+struct ARegionType;
+struct bContext;
+struct wmNotifier;
+struct wmWindowManager;
+
typedef struct bScreen {
ID id;
ListBase vertbase, edgebase, areabase;
struct Scene *scene;
- short startx, endx, starty, endy; /* framebuffer coords */
- short sizex, sizey;
+
short scenenr, screennr; /* only for pupmenu */
+
short full, winid; /* winid from WM, starts with 1 */
- int pad;
- short handler[8]; /* similar to space handler now */
+ short do_draw; /* notifier for drawing edges */
+ short do_refresh; /* notifier for scale screen, changed screen, etc */
- struct wmSubWindow *mainwin; /* screensize subwindow, for screenedges */
- struct wmSubWindow *subwinactive; /* active subwindow */
+ short mainwin; /* screensize subwindow, for screenedges and global menus */
+ short subwinactive; /* active subwindow */
- ListBase handlers; /* wmEventHandler */
+ short handler[8]; /* similar to space handler */
} bScreen;
typedef struct ScrVert {
@@ -100,21 +106,21 @@ typedef struct ScrArea {
ScrVert *v1, *v2, *v3, *v4;
bScreen *full; /* if area==full, this is the parent */
- float winmat[4][4];
- rcti totrct, headrct, winrct;
- int pad;
- short headertype; /* 0=no header, 1= down, 2= up */
- char spacetype, butspacetype; /* SPACE_... */
- short winx, winy; /* size */
- char head_swap, head_equal;
- char win_swap, win_equal;
+ rcti totrct; /* rect bound by v1 v2 v3 v4 */
+ rcti headrct, winrct; /* OLD! gets converted to region */
+
+ char spacetype, butspacetype; /* SPACE_..., butspacetype is button arg */
+ short winx, winy; /* size */
- short headbutlen, headbutofs;
+ short headertype; /* OLD! 0=no header, 1= down, 2= up */
+ short headbutlen, headbutofs; /* OLD! */
short cursor, flag;
ScriptLink scriptlink;
-
+
+ struct SpaceType *type; /* callbacks for this space type */
+
ListBase spacedata;
ListBase uiblocks;
ListBase panels;
@@ -126,13 +132,24 @@ typedef struct ARegion {
struct ARegion *next, *prev;
rcti winrct;
- struct wmSubWindow *subwin;
+ short swinid;
+ short regiontype; /* window, header, etc. identifier for drawing */
+ short alignment; /* how it should split */
+ short size; /* current split size in pixels */
+ short minsize; /* set by spacedata's region init */
+ short flag; /* hide, ... */
+
+ float fsize; /* current split size in float */
+
+ int pad;
+ short do_draw, do_refresh; /* cached notifier events */
+
+ struct ARegionType *type; /* callbacks for this region type */
ListBase handlers;
} ARegion;
-#define MAXWIN 128
/* area->flag */
#define HEADER_NO_PULLDOWN 1
@@ -182,5 +199,23 @@ typedef struct ARegion {
#define SCREEN_HANDLER_PYTHON 2
#define SCREEN_HANDLER_VERSE 3
+/* regiontype, first two are the default set */
+#define RGN_TYPE_WINDOW 0
+#define RGN_TYPE_HEADER 1
+
+/* region alignment */
+#define RGN_ALIGN_NONE 0
+#define RGN_ALIGN_TOP 1
+#define RGN_ALIGN_BOTTOM 2
+#define RGN_ALIGN_LEFT 3
+#define RGN_ALIGN_RIGHT 4
+#define RGN_ALIGN_HSPLIT 5
+#define RGN_ALIGN_VSPLIT 6
+
+/* region flag */
+#define RGN_FLAG_HIDDEN 1
+#define RGN_FLAG_TOO_SMALL 2
+
+
#endif