From a42fd3de5d82deff4b7d9b1f14a58fd95d9d20ff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Jun 2018 10:36:40 +0200 Subject: UI: Add 'interface_query.c' Interface files are increasingly mixing up too much functionality, add a file only to handle queries. More functions can be moved/added here. --- source/blender/editors/interface/interface.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'source/blender/editors/interface/interface.c') diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 90fb477480a..645f776db17 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -93,18 +93,6 @@ static void ui_but_free(const bContext *C, uiBut *but); -bool ui_block_is_menu(const uiBlock *block) -{ - return (((block->flag & UI_BLOCK_LOOP) != 0) && - /* non-menu popups use keep-open, so check this is off */ - ((block->flag & UI_BLOCK_KEEP_OPEN) == 0)); -} - -bool ui_block_is_pie_menu(const uiBlock *block) -{ - return ((block->flag & UI_BLOCK_RADIAL) != 0); -} - static bool ui_but_is_unit_radians_ex(UnitSettings *unit, const int unit_type) { return (unit->system_rotation == USER_UNIT_ROT_RADIANS && unit_type == PROP_UNIT_ROTATION); @@ -4007,16 +3995,6 @@ int UI_blocklist_min_y_get(ListBase *lb) return min; } -bool UI_block_is_empty(const uiBlock *block) -{ - for (const uiBut *but = block->buttons.first; but; but = but->next) { - if (!ELEM(but->type, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE)) { - return false; - } - } - return true; -} - void UI_block_direction_set(uiBlock *block, char direction) { block->direction = direction; -- cgit v1.2.3