[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49793] trunk/blender/source/blender/ windowmanager/WM_types.h: docs for window structs
Campbell Barton
ideasman42 at gmail.com
Sat Aug 11 03:05:11 CEST 2012
Revision: 49793
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49793
Author: campbellbarton
Date: 2012-08-11 01:05:09 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
docs for window structs
Modified Paths:
--------------
trunk/blender/source/blender/windowmanager/WM_types.h
Modified: trunk/blender/source/blender/windowmanager/WM_types.h
===================================================================
--- trunk/blender/source/blender/windowmanager/WM_types.h 2012-08-11 00:59:47 UTC (rev 49792)
+++ trunk/blender/source/blender/windowmanager/WM_types.h 2012-08-11 01:05:09 UTC (rev 49793)
@@ -28,6 +28,73 @@
* \ingroup wm
*/
+/*
+ * Overview of WM structs
+ * ======================
+ *
+ * > wmWindowManager (window manager stores a list of windows)
+ * > > wmWindow (window has an active screen)
+ * > > > bScreen (link to ScrAreas via 'areabase')
+ * > > > > ScrArea (stores multiple spaces via space links via 'spacedata')
+ * > > > > > SpaceLink (base struct for space data for all different space types)
+ * > > > > ScrArea (stores multiple regions via 'regionbase')
+ * > > > > > ARegion
+ *
+ *
+ * Window Layout
+ * =============
+ *
+ * wmWindow -> bScreen
+ * +----------------------------------------------------------+
+ * |+-----------------------------------------+-------------+ |
+ * ||ScrArea (links to 3D view) |ScrArea | |
+ * ||+-------++----------+-------------------+|(links to | |
+ * |||ARegion|| |ARegion (quad view)|| properties) | |
+ * |||(tools)|| | || | |
+ * ||| || | || | |
+ * ||| || | || | |
+ * ||| || | || | |
+ * ||| |+----------+-------------------+| | |
+ * ||| || | || | |
+ * ||| || | || | |
+ * ||| || | || | |
+ * ||| || | || | |
+ * ||| || | || | |
+ * ||+-------++----------+-------------------+| | |
+ * |+-----------------------------------------+-------------+ |
+ * +----------------------------------------------------------+
+ *
+ *
+ * Space Data
+ * ==========
+ *
+ * ScrArea's store a list of space data (SpaceLinks), each of unique type.
+ * The first one is the displayed in the UI, others are added as needed.
+ *
+ * +----------------------------+ <-- sa->spacedata.first;
+ * | |
+ * | |---+ <-- other inactive SpaceLink's stored.
+ * | | |
+ * | | |---+
+ * | | | |
+ * | | | |
+ * | | | |
+ * | | | |
+ * +----------------------------+ | |
+ * | | |
+ * +-----------------------------+ |
+ * | |
+ * +------------------------------+
+ *
+ * A common way to get the space from the ScrArea:
+ *
+ * if (sa->spacetype == SPACE_VIEW3D) {
+ * View3D *v3d = sa->spacedata.first;
+ * ...
+ * }
+ *
+ */
+
#ifndef __WM_TYPES_H__
#define __WM_TYPES_H__
More information about the Bf-blender-cvs
mailing list