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/editors/include
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/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index e931aad2722..b1fa36c8e3a 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -45,6 +45,7 @@ struct ListBase;
struct ARegion;
struct ARegionType;
struct ScrArea;
+struct wmEvent;
struct wmWindow;
struct wmWindowManager;
struct wmOperator;
@@ -176,6 +177,8 @@ enum {
#define UI_PANEL_WIDTH 340
#define UI_COMPACT_PANEL_WIDTH 160
+#define UI_PANEL_CATEGORY_MARGIN_WIDTH (U.widget_unit * 0.9f)
+
/* but->drawflag - these flags should only affect how the button is drawn. */
/* Note: currently, these flags _are not passed_ to the widget's state() or draw() functions
* (except for the 'align' ones)!
@@ -665,10 +668,23 @@ void uiBeginPanels(const struct bContext *C, struct ARegion *ar);
void uiEndPanels(const struct bContext *C, struct ARegion *ar, int *x, int *y);
void uiDrawPanels(const struct bContext *C, struct ARegion *ar);
-struct Panel *uiBeginPanel(struct ScrArea *sa, struct ARegion *ar, uiBlock *block, struct PanelType *pt, int *open);
+struct Panel *uiPanelFindByType(struct ARegion *ar, struct PanelType *pt);
+struct Panel *uiBeginPanel(struct ScrArea *sa, struct ARegion *ar, uiBlock *block,
+ struct PanelType *pt, struct Panel *pa, bool *r_open);
void uiEndPanel(uiBlock *block, int width, int height);
void uiScalePanels(struct ARegion *ar, float new_width);
+bool UI_panel_category_is_visible(struct ARegion *ar);
+void UI_panel_category_add(struct ARegion *ar, const char *name);
+struct PanelCategoryDyn *UI_panel_category_find(struct ARegion *ar, const char *idname);
+struct PanelCategoryStack *UI_panel_category_active_find(struct ARegion *ar, const char *idname);
+const char *UI_panel_category_active_get(struct ARegion *ar, bool set_fallback);
+void UI_panel_category_active_set(struct ARegion *ar, const char *idname);
+struct PanelCategoryDyn *UI_panel_category_find_mouse_over_ex(struct ARegion *ar, const int x, const int y);
+struct PanelCategoryDyn *UI_panel_category_find_mouse_over(struct ARegion *ar, const struct wmEvent *event);
+void UI_panel_category_clear_all(struct ARegion *ar);
+void UI_panel_category_draw_all(struct ARegion *ar, const char *category_id_active);
+
/* Handlers
*
* Handlers that can be registered in regions, areas and windows for