diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-15 08:42:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-15 08:42:23 +0300 |
commit | eb8458b064c5a7553a3bd51c214c9669aaf550f9 (patch) | |
tree | 85063dfae53b799f6bceca854ecb4f338458d833 /source/blender/editors/include/UI_interface.h | |
parent | acd7b81c2d3fa7828d28c1562fad10663d911783 (diff) |
Centralized operator UI drawing into a new function uiLayoutOperatorButs(),
Operator drawing calls were duplicated in file selector panel, redo panels, redo & dialog popups.
note, uiDefAutoButsRNA's column's argument was misleading, renamed to label_align.
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 19e2a86f644..bab5fef5721 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -496,7 +496,7 @@ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxle void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval); uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x1, int y1, int x2, int y2); -void uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int columns); +int uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int (*check_prop)(struct PropertyRNA *), const char label_align); /* Links * @@ -633,6 +633,10 @@ void UI_exit(void); #define UI_ITEM_R_NO_BG 128 #define UI_ITEM_R_IMMEDIATE 256 +/* uiLayoutOperatorButs flags */ +#define UI_LAYOUT_OP_SHOW_TITLE 1 +#define UI_LAYOUT_OP_SHOW_EMPTY 2 + uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, struct uiStyle *style); void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout); void uiBlockLayoutResolve(uiBlock *block, int *x, int *y); @@ -642,6 +646,7 @@ uiBlock *uiLayoutGetBlock(uiLayout *layout); void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv); void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr); const char *uiLayoutIntrospect(uiLayout *layout); // XXX - testing +void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op, int (*check_prop)(struct PropertyRNA *), const char label_align, const short flag); void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext); void uiLayoutSetActive(uiLayout *layout, int active); |