diff options
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 9a59b69604d..07cba2bad1c 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -132,7 +132,9 @@ typedef struct ScrAreaMap { typedef struct Panel_Runtime { /* Applied to Panel.ofsx, but saved separately so we can track changes between redraws. */ int region_ofsx; - char _pad[4]; + + /* For instanced panels: Index of the list item the panel corresponds to. */ + int list_index; } Panel_Runtime; /** The part from uiBlock that needs saved in file. */ @@ -306,8 +308,8 @@ enum GlobalAreaFlag { }; typedef enum GlobalAreaAlign { - GLOBAL_AREA_ALIGN_TOP, - GLOBAL_AREA_ALIGN_BOTTOM, + GLOBAL_AREA_ALIGN_TOP = 0, + GLOBAL_AREA_ALIGN_BOTTOM = 1, } GlobalAreaAlign; typedef struct ScrArea_Runtime { @@ -531,6 +533,8 @@ enum { PNL_OVERLAP = (1 << 4), PNL_PIN = (1 << 5), PNL_POPOVER = (1 << 6), + /** The panel has been drag-drop reordered and the instanced panel list needs to be rebuilt. */ + PNL_INSTANCED_LIST_ORDER_CHANGED = (1 << 7), }; /** #Panel.snap - for snapping to screen edges */ @@ -543,9 +547,17 @@ enum { /* #define PNL_SNAP_DIST 9.0 */ /* paneltype flag */ -#define PNL_DEFAULT_CLOSED 1 -#define PNL_NO_HEADER 2 -#define PNL_LAYOUT_VERT_BAR 4 +enum { + PNL_DEFAULT_CLOSED = (1 << 0), + PNL_NO_HEADER = (1 << 1), + /** Makes buttons in the header shrink/stretch to fill full layout width. */ + PNL_LAYOUT_HEADER_EXPAND = (1 << 2), + PNL_LAYOUT_VERT_BAR = (1 << 3), + /** This panel type represents data external to the UI. */ + PNL_INSTANCED = (1 << 4), + /** Draw panel like a box widget. */ + PNL_DRAW_BOX = (1 << 6), +}; /* Fallback panel category (only for old scripts which need updating) */ #define PNL_CATEGORY_FALLBACK "Misc" |