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:
authorCampbell Barton <ideasman42@gmail.com>2013-12-16 20:21:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-16 20:55:45 +0400
commita621d1e48828d02a5e097dcfc218cc11d149e75f (patch)
tree3cb9594e0b70fe0ac46d7fc22c05b1ec9b977c72 /source/blender/makesdna/DNA_screen_types.h
parent2231b565f011e984d4ee6eeb33a80567b404e032 (diff)
UI: Tabs categories for panels (D75)
- works by defining panel categories, currently restricted to the toolbar. - no panels define bl_categories yet, so no user visible changes since tabs only show when there are multiple. - panel pinning is available in rmb menu or alt+lmb.
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 6b90557113a..005b0bda041 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -112,6 +112,36 @@ typedef struct Panel { /* the part from uiBlock that needs saved in file */
void *activedata; /* runtime for panel manipulation */
} Panel;
+
+/* Notes on Panel Catogories:
+ *
+ * ar->panels_category (PanelCategoryDyn) is a runtime only list of categories collected during draw.
+ *
+ * ar->panels_category_active (PanelCategoryStack) is basically a list of strings (category id's).
+ *
+ * Clicking on a tab moves it to the front of ar->panels_category_active,
+ * If the context changes so this tab is no longer displayed,
+ * then the first-most tab in ar->panels_category_active is used.
+ *
+ * This way you can change modes and always have the tab you last clicked on.
+ */
+
+/* region level tabs */
+#
+#
+typedef struct PanelCategoryDyn {
+ struct PanelCategoryDyn *next, *prev;
+ char idname[64];
+ rcti rect;
+} PanelCategoryDyn;
+
+/* region stack of active tabs */
+typedef struct PanelCategoryStack {
+ struct PanelCategoryStack *next, *prev;
+ char idname[64];
+} PanelCategoryStack;
+
+
/* uiList dynamic data... */
/* These two Lines with # tell makesdna this struct can be excluded. */
#
@@ -209,8 +239,10 @@ typedef struct ARegion {
ListBase uiblocks; /* uiBlock */
ListBase panels; /* Panel */
+ ListBase panels_category_active; /* Stack of panel categories */
ListBase ui_lists; /* uiList */
ListBase handlers; /* wmEventHandler */
+ ListBase panels_category; /* Panel categories runtime */
struct wmTimer *regiontimer; /* blend in/out */
@@ -244,6 +276,16 @@ typedef struct ARegion {
#define SCREENNORMAL 0
#define SCREENFULL 1
+/* Panel->flag */
+enum {
+ PNL_SELECT = (1 << 0),
+ PNL_CLOSEDX = (1 << 1),
+ PNL_CLOSEDY = (1 << 2),
+ PNL_CLOSED = (PNL_CLOSEDX | PNL_CLOSEDY),
+ /*PNL_TABBED = (1 << 3), */ /*UNUSED*/
+ PNL_OVERLAP = (1 << 4),
+ PNL_PIN = (1 << 5),
+};
/* Panel->snap - for snapping to screen edges */
#define PNL_SNAP_NONE 0