|
Blender V5.0
|
#include <algorithm>#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_screen_types.h"#include "DNA_userdef_types.h"#include "BLI_array.hh"#include "BLI_dynstr.h"#include "BLI_listbase.h"#include "BLI_math_base.h"#include "BLI_path_utils.hh"#include "BLI_rect.h"#include "BLI_string_ref.hh"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_idprop.hh"#include "BKE_lib_id.hh"#include "BKE_path_templates.hh"#include "BKE_screen.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "UI_interface_layout.hh"#include "ED_id_management.hh"#include "WM_api.hh"#include "WM_types.hh"#include "fmt/format.h"#include "interface_intern.hh"Go to the source code of this file.
Classes | |
| struct | uiLayoutRoot |
| struct | blender::ui::ItemInternal |
| struct | blender::ui::LayoutInternal |
| struct | uiButtonItem |
| struct | LayoutRow |
| struct | LayoutColumn |
| struct | LayoutRootPieMenu |
| struct | LayoutOverlap |
| struct | LayoutRadial |
| struct | LayoutAbsolute |
| struct | uiLayoutItemFlow |
| struct | uiLayoutItemGridFlow |
| struct | uiLayoutItemBx |
| struct | uiLayoutItemPanelHeader |
| struct | uiLayoutItemPanelBody |
| struct | uiLayoutItemSplit |
| struct | uiTextIconPadFactor |
| struct | MenuItemLevel |
| struct | UILayoutGridFlowInput |
| struct | UILayoutGridFlowOutput |
| struct | ItemInternal |
| struct | LayoutInternal |
Namespaces | |
| namespace | blender |
| namespace | blender::ui |
Macros | |
| #define | UI_PROP_DECORATE |
| #define | UI_PROP_SEP_ICON_WIDTH_EXCEPTION |
| #define | CASE_ITEM(type, name) |
Enumerations | |
| enum class | blender::ui::ItemType : int8_t { blender::ui::Button , blender::ui::LayoutRow , blender::ui::LayoutPanelHeader , blender::ui::LayoutPanelBody , blender::ui::LayoutColumn , blender::ui::LayoutColumnFlow , blender::ui::LayoutRowFlow , blender::ui::LayoutGridFlow , blender::ui::LayoutBox , blender::ui::LayoutAbsolute , blender::ui::LayoutSplit , blender::ui::LayoutOverlap , blender::ui::LayoutRadial , blender::ui::LayoutRoot } |
| enum class | blender::ui::ItemInternalFlag : uint8_t { blender::ui::AutoFixedSize = 1 << 0 , blender::ui::FixedSize = 1 << 1 , blender::ui::BoxItem = 1 << 2 , blender::ui::PropSep = 1 << 3 , blender::ui::InsidePropSep = 1 << 4 , blender::ui::PropDecorate = 1 << 5 , blender::ui::PropDecorateNoPad = 1 << 6 } |
Functions | |
| uiLayout & | blender::ui::block_layout (uiBlock *block, LayoutDirection direction, LayoutType type, int x, int y, int size, int em, int padding, const uiStyle *style) |
| void | blender::ui::block_layout_set_current (uiBlock *block, uiLayout *layout) |
| void | blender::ui::block_layout_free (uiBlock *block) |
| int2 | blender::ui::block_layout_resolve (uiBlock *block) |
| bool | blender::ui::block_layout_needs_resolving (const uiBlock *block) |
Special RNA Items | |
| static uiLayout * | ui_item_local_sublayout (uiLayout *test, uiLayout *layout, bool align) |
| static void | ui_layer_but_cb (bContext *C, void *arg_but, void *arg_index) |
| static void | ui_item_array (uiLayout *layout, uiBlock *block, const StringRef name, int icon, PointerRNA *ptr, PropertyRNA *prop, const int len, int x, const int y, int w, const int, const bool expand, const bool slider, const int toggle, const bool icon_only, const bool compact, const bool show_text) |
| static void | ui_item_enum_expand_handle (bContext *C, void *arg1, void *arg2) |
| static void | ui_item_enum_expand_elem_exec (uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const std::optional< StringRef > uiname, const int h, const ButType but_type, const bool icon_only, const EnumPropertyItem *item, const bool is_first) |
| static void | ui_item_enum_expand_exec (uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const std::optional< StringRef > uiname, const int h, const ButType but_type, const bool icon_only) |
| static void | ui_item_enum_expand (uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const std::optional< StringRef > uiname, const int h, const bool icon_only) |
| static void | ui_item_enum_expand_tabs (uiLayout *layout, bContext *C, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *ptr_highlight, PropertyRNA *prop_highlight, const std::optional< StringRef > uiname, const int h, const bool icon_only) |
| static void | ui_keymap_but_cb (bContext *, void *but_v, void *) |
| static uiBut * | ui_item_with_label (uiLayout *layout, uiBlock *block, const StringRef name, const int icon, PointerRNA *ptr, PropertyRNA *prop, const int index, const int x, const int y, const int w_hint, const int h, const int flag) |
| void | UI_context_active_but_prop_get_filebrowser (const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, bool *r_is_undo, bool *r_is_userdef) |
Button Items | |
| static void | ui_but_tip_from_enum_item (uiBut *but, const EnumPropertyItem *item) |
| static void | ui_item_disabled (uiLayout *layout, const char *name) |
| static uiBut * | uiItemFullO_ptr_ex (uiLayout *layout, wmOperatorType *ot, std::optional< StringRef > name, int icon, const blender::wm::OpCallContext context, const eUI_Item_Flag flag, PointerRNA *r_opptr) |
| static void | ui_item_menu_hold (bContext *C, ARegion *butregion, uiBut *but) |
| BLI_INLINE bool | ui_layout_is_radial (const uiLayout *layout) |
| static void | ui_item_rna_size (uiLayout *layout, StringRef name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, bool icon_only, bool compact, int *r_w, int *r_h) |
| static bool | ui_item_rna_is_expand (PropertyRNA *prop, int index, const eUI_Item_Flag item_flag) |
| static uiLayout * | ui_layout_heading_find (uiLayout *cur_layout) |
| static void | ui_layout_heading_label_add (uiLayout *layout, uiLayout *heading_layout, bool right_align, bool respect_prop_split) |
| static void | search_id_collection (StructRNA *ptype, PointerRNA *r_ptr, PropertyRNA **r_prop) |
| static void | ui_rna_collection_search_arg_free_fn (void *ptr) |
| uiBut * | ui_but_add_search (uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, PropertyRNA *item_searchprop, const bool results_are_suggestions) |
| void | ui_item_menutype_func (bContext *C, uiLayout *layout, void *arg_mt) |
| void | ui_item_paneltype_func (bContext *C, uiLayout *layout, void *arg_pt) |
| static uiBut * | ui_item_menu (uiLayout *layout, const StringRef name, int icon, uiMenuCreateFunc func, void *arg, void *argN, const std::optional< StringRef > tip, bool force_menu, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN) |
| static uiBut * | uiItem_simple (uiLayout *layout, const StringRef name, int icon, std::optional< blender::StringRef > tooltip=std::nullopt, const ButType but_type=ButType::Label) |
| uiBut * | uiItemL_ex (uiLayout *layout, const StringRef name, int icon, const bool highlight, const bool redalert) |
| uiPropertySplitWrapper | uiItemPropertySplitWrapperCreate (uiLayout *parent_layout) |
| uiLayout * | uiItemL_respect_property_split (uiLayout *layout, StringRef text, int icon) |
| void | uiItemLDrag (uiLayout *layout, PointerRNA *ptr, StringRef name, int icon) |
| static int | menu_item_enum_opname_menu_active (bContext *C, uiBut *but, MenuItemLevel *lvl) |
| static void | menu_item_enum_opname_menu (bContext *C, uiLayout *layout, void *arg) |
| static void | menu_item_enum_rna_menu (bContext *, uiLayout *layout, void *arg) |
Layout Items | |
| static int | ui_litem_min_width (int itemw) |
| static int | spaces_after_column_item (const uiLayout *litem, const uiItem *item, const uiItem *next_item, const bool is_box) |
| static RadialDirection | ui_get_radialbut_vec (float vec[2], short itemnum) |
| static bool | ui_item_is_radial_displayable (uiItem *item) |
| static bool | ui_item_is_radial_drawable (uiButtonItem *bitem) |
| static void | ui_litem_grid_flow_compute (blender::Span< uiItem * > items, const UILayoutGridFlowInput *parameters, UILayoutGridFlowOutput *results) |
| bool | uiLayoutEndsWithPanelHeader (const uiLayout &layout) |
| static uiLayoutItemBx * | ui_layout_box (uiLayout *layout, ButType type) |
| void | ui_layout_list_set_labels_active (uiLayout *layout) |
| int | uiLayoutListItemPaddingWidth () |
| void | uiLayoutListItemAddPadding (uiLayout *layout) |
Block Layout Search Filtering | |
| static bool | block_search_panel_label_matches (const uiBlock *block, const char *search_string) |
| static bool | button_matches_search_filter (uiBut *but, const char *search_filter) |
| static bool | button_group_has_search_match (const uiButtonGroup &group, const char *search_filter) |
| static bool | block_search_filter_tag_buttons (uiBlock *block, const char *search_filter) |
| bool | UI_block_apply_search_filter (uiBlock *block, const char *search_filter) |
Layout | |
| static void | ui_item_scale (uiLayout *litem, const float scale[2]) |
| static void | ui_item_align (uiLayout *litem, short nr) |
| static void | ui_item_flag (uiLayout *litem, int flag) |
| static blender::int2 | ui_layout_end (uiBlock *block, uiLayout *layout) |
| static void | ui_layout_free (uiLayout *layout) |
| static void | ui_layout_add_padding_button (uiLayoutRoot *root) |
| void | ui_layout_add_but (uiLayout *layout, uiBut *but) |
| void | ui_layout_remove_but (uiLayout *layout, const uiBut *but) |
| bool | ui_layout_replace_but_ptr (uiLayout *layout, const void *old_but_ptr, uiBut *new_but) |
| void | uiLayoutSetFunc (uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv) |
| void | uiLayoutSetTooltipFunc (uiLayout *layout, uiButToolTipFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg) |
| void | uiLayoutSetTooltipCustomFunc (uiLayout *layout, uiButToolTipCustomFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg) |
| wmOperatorType * | UI_but_operatortype_get_from_enum_menu (uiBut *but, PropertyRNA **r_prop) |
| MenuType * | UI_but_menutype_get (const uiBut *but) |
| PanelType * | UI_but_paneltype_get (const uiBut *but) |
| std::optional< blender::StringRefNull > | UI_but_asset_shelf_type_idname_get (const uiBut *but) |
| void | UI_menutype_draw (bContext *C, MenuType *mt, uiLayout *layout) |
| static bool | ui_layout_has_panel_label (const uiLayout *layout, const PanelType *pt) |
| static void | ui_paneltype_draw_impl (bContext *C, PanelType *pt, uiLayout *layout, bool show_header) |
| void | UI_paneltype_draw (bContext *C, PanelType *pt, uiLayout *layout) |
Layout (Debugging/Introspection) | |
Serialize the layout as a Python compatible dictionary,
| |
| static void | ui_layout_introspect_button (DynStr *ds, const uiButtonItem *bitem) |
| static void | ui_layout_introspect_items (DynStr *ds, blender::Span< const uiItem * > items) |
| const char * | UI_layout_introspect (uiLayout *layout) |
Alert Box with Big Icon | |
| uiLayout * | uiItemsAlertBox (uiBlock *block, const uiStyle *style, const int dialog_width, const eAlertIcon icon, const int icon_size) |
| uiLayout * | uiItemsAlertBox (uiBlock *block, const int size, const eAlertIcon icon) |
Structs and Defines | |
| #define | UI_OPERATOR_ERROR_RET(_ot, _opname) |
| #define | UI_ITEM_PROP_SEP_DIVIDE 0.4f |
| using | uiItemType = blender::ui::ItemType |
| using | uiItemInternalFlag = blender::ui::ItemInternalFlag |
Item | |
| #define | UI_ITEM_VARY_X 1 |
| #define | UI_ITEM_VARY_Y 2 |
| constexpr uiTextIconPadFactor | ui_text_pad_default = {1.50f, 0.25f, 0.0f} |
| constexpr uiTextIconPadFactor | ui_text_pad_compact = {1.25f, 0.35f, 0.0f} |
| constexpr uiTextIconPadFactor | ui_text_pad_none = {0.25f, 1.50f, 0.0f} |
| static StringRef | ui_item_name_add_colon (StringRef name, char namestr[UI_MAX_NAME_STR]) |
| static StringRefNull | ui_item_name_add_colon (StringRefNull name, char namestr[UI_MAX_NAME_STR]) |
| static int | ui_item_fit (const int item, const int pos, const int all, const int available, const bool is_last, const blender::ui::LayoutAlign alignment, float *extra_pixel) |
| static int | ui_layout_vary_direction (uiLayout *layout) |
| static bool | ui_layout_variable_size (uiLayout *layout) |
| static int | ui_text_icon_width_ex (uiLayout *layout, const StringRef name, int icon, const uiTextIconPadFactor &pad_factor, const uiFontStyle *fstyle) |
| static int | ui_text_icon_width (uiLayout *layout, const StringRef name, const int icon, const bool compact) |
| static void | ui_item_size (const uiItem *item, int *r_w, int *r_h) |
| static void | ui_item_offset (const uiItem *item, int *r_x, int *r_y) |
| static void | ui_item_position (uiItem *item, const int x, const int y, const int w, const int h) |
| static void | ui_item_move (uiItem *item, const int delta_xmin, const int delta_xmax) |
| #define CASE_ITEM | ( | type, | |
| name ) |
Referenced by ui_layout_introspect_items().
| #define UI_ITEM_PROP_SEP_DIVIDE 0.4f |
Definition at line 74 of file interface_layout.cc.
Referenced by uiLayout::prop(), and uiItemPropertySplitWrapperCreate().
| #define UI_ITEM_VARY_X 1 |
Definition at line 379 of file interface_layout.cc.
Referenced by ui_layout_variable_size(), and ui_layout_vary_direction().
| #define UI_ITEM_VARY_Y 2 |
Definition at line 380 of file interface_layout.cc.
Referenced by ui_layout_vary_direction().
| #define UI_OPERATOR_ERROR_RET | ( | _ot, | |
| _opname ) |
Definition at line 66 of file interface_layout.cc.
Referenced by uiLayout::op(), and uiLayout::op_menu_enum().
| #define UI_PROP_DECORATE |
Definition at line 57 of file interface_layout.cc.
Referenced by ui_item_with_label().
| #define UI_PROP_SEP_ICON_WIDTH_EXCEPTION |
Definition at line 60 of file interface_layout.cc.
Definition at line 197 of file interface_layout.cc.
| using uiItemType = blender::ui::ItemType |
Definition at line 196 of file interface_layout.cc.
|
static |
Apply the search filter, tagging all buttons with whether they match or not. Tag every button in the group as a result if any button in the group matches.
Definition at line 5225 of file interface_layout.cc.
References button_group_has_search_match(), uiBlock::button_groups, uiButtonGroup::buttons, uiBut::flag, and UI_SEARCH_FILTER_NO_MATCH.
Referenced by UI_block_apply_search_filter().
|
static |
Definition at line 5129 of file interface_layout.cc.
References BLI_strcasestr(), PanelType::label, uiBlock::panel, and Panel::type.
Referenced by UI_block_apply_search_filter().
|
static |
Test for a search result within a specific button group.
Definition at line 5205 of file interface_layout.cc.
References button_matches_search_filter(), and uiButtonGroup::buttons.
Referenced by block_search_filter_tag_buttons().
|
static |
Returns true if a button or the data / operator it represents matches the search filter.
Definition at line 5142 of file interface_layout.cc.
References BLI_strcasestr(), free(), i, MEM_freeN(), Menu, name, wmOperatorType::name, uiBut::optype, ptr, RNA_property_description(), RNA_property_enum_items_gettexted(), RNA_property_ui_name(), uiBut::rnapoin, uiBut::rnaprop, uiBut::str, and uiBut::type.
Referenced by button_group_has_search_match().
Definition at line 3422 of file interface_layout.cc.
References active, BLI_assert, uiLayout::block(), C, PointerRNA::data_as(), uiBut::func_argN, menu_item_enum_opname_menu_active(), uiLayout::op_enum(), MenuItemLevel::opcontext, uiLayout::operator_context_set(), MenuItemLevel::opname, uiBut::opptr, MenuItemLevel::propname, UI_block_direction_set(), UI_DIR_DOWN, and UI_ITEM_NONE.
Referenced by uiLayout::op_menu_enum(), and UI_but_operatortype_get_from_enum_menu().
|
static |
Definition at line 3394 of file interface_layout.cc.
References active, C, free(), MEM_freeN(), MenuItemLevel::opname, ot, MenuItemLevel::propname, ptr, RNA_enum_from_name(), RNA_property_enum_items_gettexted(), RNA_struct_find_property(), uiBut::str, WM_operator_properties_create_ptr(), WM_operator_properties_sanitize(), and WM_operatortype_find().
Referenced by menu_item_enum_opname_menu().
Definition at line 3512 of file interface_layout.cc.
References MenuItemLevel::opcontext, uiLayout::operator_context_set(), MenuItemLevel::propname, uiLayout::props_enum(), and MenuItemLevel::rnapoin.
Referenced by uiLayout::prop_menu_enum().
|
static |
Definition at line 2612 of file interface_layout.cc.
References G_MAIN, PROP_COLLECTION, RNA_main_pointer_create(), RNA_property_pointer_type(), RNA_property_type(), RNA_STRUCT_BEGIN, and RNA_STRUCT_END.
Referenced by ui_but_add_search().
|
static |
Definition at line 3787 of file interface_layout.cc.
References ELEM, uiLayout::items(), and uiItem::type().
Referenced by LayoutColumn::estimate_impl(), and LayoutColumn::resolve_impl().
| bool UI_block_apply_search_filter | ( | uiBlock * | block, |
| const char * | search_filter ) |
Apply property search behavior, setting panel flags and deactivating buttons that don't match.
Definition at line 5241 of file interface_layout.cc.
References block_search_filter_tag_buttons(), block_search_panel_label_matches(), PanelType::flag, uiBlock::panel, PANEL_TYPE_NO_SEARCH, Panel::type, and ui_panel_tag_search_filter_match().
Referenced by ed_panel_draw(), and panel_property_search().
| uiBut * ui_but_add_search | ( | uiBut * | but, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| PointerRNA * | searchptr, | ||
| PropertyRNA * | searchprop, | ||
| PropertyRNA * | item_searchprop, | ||
| bool | results_are_suggestions ) |
Definition at line 2641 of file interface_layout.cc.
References uiBut::block, uiRNACollectionSearch::butstore, uiRNACollectionSearch::butstore_block, uiBut::drawflag, uiBut::flag, uiBut::hardmax, uiRNACollectionSearch::item_search_prop, PointerRNA_NULL, PROP_ENUM, PROP_POINTER, PROP_STRING, ptr, RNA_property_is_unlink(), RNA_property_pointer_type(), RNA_property_string_search_flag(), RNA_property_type(), uiButSearch::rnasearchpoin, uiButSearch::rnasearchprop, uiRNACollectionSearch::search_but, search_id_collection(), uiRNACollectionSearch::search_prop, uiRNACollectionSearch::search_ptr, SearchMenu, uiBut::str, uiRNACollectionSearch::target_prop, uiRNACollectionSearch::target_ptr, uiBut::type, ui_but_change_type(), UI_BUT_DISABLED, UI_but_func_search_set(), UI_but_func_search_set_results_are_suggestions(), UI_BUT_ICON_LEFT, UI_BUT_TEXT_LEFT, UI_BUT_VALUE_CLEAR, UI_butstore_create(), UI_butstore_register(), ui_rna_collection_search_arg_free_fn(), ui_rna_collection_search_update_fn(), and ui_searchbox_create_generic().
Referenced by uiLayout::prop(), uiLayout::prop_search(), and uiDefAutoButR().
| std::optional< blender::StringRefNull > UI_but_asset_shelf_type_idname_get | ( | const uiBut * | but | ) |
This is a bit of a hack but best keep it in one place at least.
Definition at line 5860 of file interface_layout.cc.
References UI_asset_shelf_idname_from_button_context().
Referenced by shortcut_get_operator_property().
This is a bit of a hack but best keep it in one place at least.
Definition at line 5844 of file interface_layout.cc.
References uiBut::menu_create_func, uiBut::poin, and ui_item_menutype_func().
Referenced by menu_items_from_ui_create(), shortcut_get_operator_property(), ui_block_open_begin(), ui_but_copy_menu(), ui_but_event_operator_string(), ui_but_event_operator_string_from_menu(), ui_but_is_user_menu_compatible(), UI_but_string_get_rna_label(), UI_but_string_get_rna_label_context(), UI_but_string_get_rna_struct_identifier(), UI_but_string_get_rna_tooltip(), ui_but_user_menu_add(), and ui_but_user_menu_find().
| wmOperatorType * UI_but_operatortype_get_from_enum_menu | ( | uiBut * | but, |
| PropertyRNA ** | r_prop ) |
This is a bit of a hack but best keep it in one place at least.
Definition at line 5827 of file interface_layout.cc.
References uiBut::func_argN, uiBut::menu_create_func, menu_item_enum_opname_menu(), MenuItemLevel::opname, ot, MenuItemLevel::propname, RNA_struct_type_find_property(), and WM_operatortype_find().
Referenced by ui_but_is_user_menu_compatible(), UI_but_string_get_rna_label(), UI_but_string_get_rna_tooltip(), ui_but_user_menu_add(), ui_but_user_menu_find(), and ui_layout_introspect_button().
This is a bit of a hack but best keep it in one place at least.
Definition at line 5852 of file interface_layout.cc.
References uiBut::menu_create_func, uiBut::poin, and ui_item_paneltype_func().
Referenced by button_activate_state(), menu_items_from_ui_create(), shortcut_get_operator_property(), ui_but_copy_popover(), ui_but_event_operator_string(), ui_but_event_operator_string_from_panel(), UI_but_string_get_rna_label(), and UI_but_string_get_rna_struct_identifier().
|
static |
Update a buttons tip with an enum's description if possible.
Definition at line 1325 of file interface_layout.cc.
References EnumPropertyItem::description, wmOperatorType::get_description, uiBut::optype, and uiBut::tip.
Referenced by uiLayout::op_enum_items(), and uiLayout::props_enum().
| void UI_context_active_but_prop_get_filebrowser | ( | const bContext * | C, |
| PointerRNA * | r_ptr, | ||
| PropertyRNA ** | r_prop, | ||
| bool * | r_is_undo, | ||
| bool * | r_is_userdef ) |
Definition at line 1279 of file interface_layout.cc.
References C, CTX_wm_region(), CTX_wm_region_popup(), uiBut::flag, LISTBASE_FOREACH, PROP_STRING, RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, ARegion::runtime, UI_but_is_userdef(), UI_BUT_LAST_ACTIVE, and UI_BUT_UNDO.
Referenced by file_browse_invoke().
|
static |
Definition at line 3880 of file interface_layout.cc.
References PIE_MAX_ITEMS, printf, ui_but_pie_dir(), and ui_radial_dir_order.
Referenced by LayoutRadial::resolve_impl().
|
static |
Definition at line 5338 of file interface_layout.cc.
References uiLayout::align(), uiBut::alignnr, uiButtonItem::but, uiLayout::items(), uiLayoutItemBx::roundbox, uiItem::type(), and ui_item_align().
Referenced by uiLayout::resolve(), and ui_item_align().
|
static |
Definition at line 630 of file interface_layout.cc.
References uiLayout::absolute(), b, uiLayout::block(), blender::ui::block_layout_set_current(), uiStyle::buttonspacex, Checkbox, col, ELEM, uiBlock::emboss, Label, len, MEM_calloc_arrayN(), MEM_freeN(), min_ii(), name, blender::ui::None, Num, NumSlider, POINTER_FROM_INT, uiButNumber::precision, uiButNumberSlider::precision, PROP_AXISANGLE, PROP_BOOLEAN, PROP_COLOR, PROP_COLOR_GAMMA, PROP_DIRECTION, PROP_LAYER, PROP_LAYER_MEMBER, PROP_MATRIX, PROP_UNIT_ROTATION, ptr, blender::ui::Pulldown, RNA_property_array_dimension(), RNA_property_array_item_char(), RNA_property_boolean_get_array(), RNA_property_subtype(), RNA_property_type(), uiLayout::root(), uiButNumber::step_size, uiButNumberSlider::step_size, str, uiLayoutRoot::style, Toggle, uiBut::type, UI_block_align_begin(), UI_block_align_end(), ui_but_change_type(), UI_but_func_set(), UI_but_unit_type_set(), ui_item_local_sublayout(), ui_layer_but_cb(), ui_text_icon_width(), UI_UNIT_X, UI_UNIT_Y, uiDefAutoButR(), uiDefBut(), uiDefButR_prop(), Unitvec, w(), x, and y.
Referenced by uiLayout::prop().
|
static |
Definition at line 1337 of file interface_layout.cc.
References uiLayout::block(), blender::ui::block_layout_set_current(), Label, name, UI_but_disable(), ui_text_icon_width(), UI_UNIT_Y, uiDefBut(), and w().
Referenced by uiLayout::decorator(), uiLayout::op_enum(), uiLayout::op_menu_enum(), uiLayout::prop(), uiLayout::prop_enum(), uiLayout::prop_enum(), uiLayout::prop_enum(), uiLayout::prop_with_menu(), uiLayout::prop_with_popover(), and uiLayout::props_enum().
|
static |
Definition at line 1023 of file interface_layout.cc.
References ptr, Row, and ui_item_enum_expand_exec().
Referenced by uiLayout::prop().
|
static |
Draw a single enum button, a utility for ui_item_enum_expand_exec
Definition at line 879 of file interface_layout.cc.
References BLI_assert, ceilf, uiBlock::curlayout, uiBut::drawflag, ELEM, uiBut::flag, uiBlock::func, uiBut::func, blender::ui::Horizontal, EnumPropertyItem::icon, uiLayout::local_direction(), EnumPropertyItem::name, name, POINTER_FROM_INT, PROP_ENUM_FLAG, ptr, RNA_property_flag(), Tab, U, UI_BUT_DRAG_LOCK, UI_but_func_set(), UI_BUT_TEXT_LEFT, ui_item_enum_expand_handle(), ui_text_icon_width(), uiDefButR_prop(), uiDefIconButR_prop(), uiDefIconTextButR_prop(), EnumPropertyItem::value, and w().
Referenced by ui_item_enum_expand_exec().
|
static |
Definition at line 928 of file interface_layout.cc.
References BLI_assert, blender::ui::block_layout_set_current(), uiBlock::curlayout, ELEM, uiBlock::evil_C, free(), EnumPropertyItem::identifier, uiLayout::label(), uiLayoutRoot::layout, MEM_freeN(), blender::ui::Menu, uiLayout::menu_pie(), blender::ui::PieMenu, PROP_ENUM, ptr, RNA_property_enum_items_gettexted(), RNA_property_enum_items_gettexted_all(), RNA_property_type(), uiLayout::root(), uiLayout::separator(), uiItem::type(), uiLayoutRoot::type, ui_item_enum_expand_elem_exec(), and ui_item_local_sublayout().
Referenced by ui_item_enum_expand(), and ui_item_enum_expand_tabs().
|
static |
Definition at line 857 of file interface_layout.cc.
References C, CTX_wm_window(), wmWindow::eventstate, KM_SHIFT, wmEvent::modifier, POINTER_AS_INT, RNA_property_enum_get(), RNA_property_enum_set(), uiBut::rnapoin, and uiBut::rnaprop.
Referenced by ui_item_enum_expand_elem_exec().
|
static |
Definition at line 1033 of file interface_layout.cc.
References BLI_assert, uiBlock::buttons, C, CTX_wm_region(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), uiBut::flag, i, Vector< T, InlineBufferCapacity, Allocator >::is_empty(), ptr, RNA_property_array_length(), RNA_property_boolean_get_array(), SET_FLAG_FROM_TEST, Vector< T, InlineBufferCapacity, Allocator >::size(), Tab, ui_but_align_opposite_to_area_align_get(), UI_but_drawflag_enable(), UI_BUT_HAS_QUICK_TOOLTIP, UI_BUT_INACTIVE, and ui_item_enum_expand_exec().
Referenced by uiLayout::prop_tabs_enum().
|
static |
Definition at line 341 of file interface_layout.cc.
References all(), ELEM, blender::ui::Expand, and pos.
Referenced by LayoutRow::resolve_impl().
|
static |
Definition at line 5369 of file interface_layout.cc.
References uiButtonItem::but, flag, uiBut::flag, uiLayout::items(), uiItem::type(), and ui_item_flag().
Referenced by uiLayout::resolve(), and ui_item_flag().
|
static |
Definition at line 3894 of file interface_layout.cc.
References Label, and uiItem::type().
Referenced by LayoutRadial::resolve_impl().
|
static |
Definition at line 3906 of file interface_layout.cc.
References uiButtonItem::but, ELEM, Sepr, SeprLine, SeprSpacer, and uiBut::type.
Referenced by LayoutRadial::resolve_impl().
Definition at line 589 of file interface_layout.cc.
References uiLayout::column(), blender::ui::Horizontal, uiLayout::local_direction(), uiLayout::row(), and uiLayout::space_.
Referenced by uiLayout::menu_pie(), ui_item_array(), and ui_item_enum_expand_exec().
|
static |
Definition at line 2832 of file interface_layout.cc.
References uiLayout::block(), blender::ui::block_layout_set_current(), ELEM, uiBut::func_argN, uiBut::func_argN_copy_fn, uiBut::func_argN_free_fn, blender::ui::Header, uiTextIconPadFactor::icon_only, MEM_dupallocN(), MEM_freeN(), blender::ui::Menu, name, blender::ui::Panel, uiBut::poin, uiLayout::root(), uiTextIconPadFactor::text, blender::ui::Toolbar, uiLayoutRoot::type, ui_block_new_button_group(), UI_but_drawflag_enable(), UI_BUT_ICON_LEFT, UI_but_type_set_menu_from_pulldown(), UI_FSTYLE_WIDGET, ui_layout_heading_find(), ui_layout_heading_label_add(), ui_text_icon_width_ex(), ui_text_pad_compact, UI_UNIT_Y, uiDefIconMenuBut(), uiDefIconTextMenuBut(), uiDefMenuBut(), and w().
Referenced by uiLayout::menu(), uiLayout::menu_fn(), uiLayout::menu_fn_argN_free(), uiLayout::op_menu_enum(), uiLayout::popover(), and uiLayout::prop_menu_enum().
Definition at line 1442 of file interface_layout.cc.
References ARegion::alignment, uiLayout::block(), C, uiLayout::context_set_from_but(), uiBut::drawstr, uiBlock::flag, uiBut::hold_argN, uiLayout::label(), RGN_ALIGN_BOTTOM, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RPT_, UI_block_direction_set(), UI_BLOCK_POPUP_HOLD, UI_DIR_DOWN, UI_DIR_LEFT, UI_DIR_RIGHT, UI_DIR_UP, UI_menutype_draw(), UI_popup_menu_begin(), UI_popup_menu_but_set(), UI_popup_menu_end(), UI_popup_menu_layout(), and WM_menutype_find().
Referenced by uiLayout::op_menu_hold().
Definition at line 2820 of file interface_layout.cc.
References C, and UI_menutype_draw().
Referenced by uiLayout::menu(), UI_but_menutype_get(), ui_def_but_rna__menu_type(), and ui_popup_menu_create_from_menutype().
|
static |
Definition at line 541 of file interface_layout.cc.
References uiButtonItem::but, uiBut::rect, uiItem::type(), ui_but_update(), uiLayout::w_, uiLayout::x_, rctf::xmax, and rctf::xmin.
Referenced by LayoutRow::resolve_impl().
Definition at line 313 of file interface_layout.cc.
References len, name, and UI_MAX_NAME_STR.
Referenced by uiLayout::prop(), uiLayout::prop_search(), and uiItemL_respect_property_split().
|
static |
Definition at line 327 of file interface_layout.cc.
References len, name, and UI_MAX_NAME_STR.
|
static |
Definition at line 497 of file interface_layout.cc.
References uiButtonItem::but, uiBut::rect, uiItem::type(), rctf::xmin, and rctf::ymin.
Referenced by LayoutAbsolute::estimate_impl(), LayoutAbsolute::resolve_impl(), and ui_item_scale().
Definition at line 2826 of file interface_layout.cc.
References C, and UI_paneltype_draw().
Referenced by blender::ui::asset_shelf_popover_invoke(), uiLayout::popover(), UI_but_paneltype_get(), ui_def_but_rna__panel_type(), and UI_popover_panel_invoke().
|
static |
Definition at line 519 of file interface_layout.cc.
References uiButtonItem::but, uiLayout::h_, uiBut::rect, uiItem::type(), ui_but_update(), w(), uiLayout::w_, x, uiLayout::x_, rctf::xmax, rctf::xmin, y, uiLayout::y_, rctf::ymax, and rctf::ymin.
Referenced by LayoutAbsolute::resolve_impl(), LayoutColumn::resolve_impl(), LayoutOverlap::resolve_impl(), LayoutRadial::resolve_impl(), LayoutRootPieMenu::resolve_impl(), LayoutRow::resolve_impl(), uiLayoutItemFlow::resolve_impl(), uiLayoutItemGridFlow::resolve_impl(), uiLayoutItemPanelHeader::resolve_impl(), uiLayoutItemSplit::resolve_impl(), and ui_item_scale().
|
static |
Definition at line 1858 of file interface_layout.cc.
References ELEM, PROP_COLOR, PROP_COLOR_GAMMA, PROP_DIRECTION, RNA_NO_INDEX, RNA_property_array_check(), RNA_property_subtype(), and UI_ITEM_R_EXPAND.
Referenced by uiLayout::decorator(), and uiLayout::prop().
|
static |
Definition at line 1750 of file interface_layout.cc.
References uiLayout::block(), ELEM, uiBlock::evil_C, free(), EnumPropertyItem::identifier, len, max_ii(), MEM_freeN(), name, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, PROP_LAYER, PROP_LAYER_MEMBER, PROP_MATRIX, PROP_POINTER, PROP_STRING, ptr, RNA_ENUM_VALUE, RNA_NO_INDEX, RNA_property_array_dimension(), RNA_property_array_length(), RNA_property_enum_items_gettexted(), RNA_property_subtype(), RNA_property_type(), ui_layout_variable_size(), ui_text_icon_width(), UI_UNIT_X, UI_UNIT_Y, uiLayout::use_property_split(), and w().
Referenced by uiLayout::prop(), and uiLayout::prop_search().
Definition at line 5278 of file interface_layout.cc.
References uiLayout::items(), uiItem::type(), ui_item_offset(), ui_item_position(), ui_item_scale(), ui_item_size(), w(), x, and y.
Referenced by uiLayout::estimate(), and ui_item_scale().
|
static |
Definition at line 473 of file interface_layout.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), uiButtonItem::but, uiLayout::h_, uiBut::rect, uiItem::type(), and uiLayout::w_.
Referenced by LayoutAbsolute::estimate_impl(), LayoutColumn::estimate_impl(), LayoutOverlap::estimate_impl(), LayoutRow::estimate_impl(), uiLayoutItemFlow::estimate_impl(), uiLayoutItemPanelHeader::estimate_impl(), blender::ui::LayoutInternal::layout_add_but(), LayoutAbsolute::resolve_impl(), LayoutColumn::resolve_impl(), LayoutOverlap::resolve_impl(), LayoutRadial::resolve_impl(), LayoutRootPieMenu::resolve_impl(), LayoutRow::resolve_impl(), uiLayoutItemFlow::resolve_impl(), uiLayoutItemGridFlow::resolve_impl(), uiLayoutItemPanelHeader::resolve_impl(), uiLayoutItemSplit::resolve_impl(), ui_item_scale(), and ui_litem_grid_flow_compute().
|
static |
Create label + button for RNA property
| w_hint | For varying width layout, this becomes the label width. Otherwise it's used to fit both items into it. |
Definition at line 1101 of file interface_layout.cc.
References uiLayout::align(), BKE_build_template_variables_for_prop(), BKE_path_contains_template_syntax(), BKE_path_validate_template(), BLI_assert, BLI_path_is_rel(), blender::ui::block_layout_set_current(), But, uiBut::drawstr, ELEM, uiBlock::evil_C, flag, HotkeyEvent, blender::wm::InvokeDefault, KeyEvent, Label, name, PROP_DIRPATH, PROP_ENUM, PROP_FILENAME, PROP_FILEPATH, PROP_NONE, PROP_PATH_SUPPORTS_BLEND_RELATIVE, PROP_PATH_SUPPORTS_TEMPLATES, ptr, RNA_property_flag(), RNA_property_string_get(), RNA_property_subtype(), RNA_property_type(), RNA_struct_identifier(), RNA_struct_is_a(), RNA_warning, uiLayout::row(), uiLayout::space_, str, Text, uiBut::type, UI_BUT_ACTIVATE_ON_INIT, UI_but_flag_enable(), UI_but_func_set(), UI_BUT_REDALERT, UI_FSTYLE_WIDGET, UI_ITEM_R_EVENT, UI_ITEM_R_FULL_EVENT, UI_ITEM_R_ICON_ONLY, UI_ITEM_R_IMMEDIATE, ui_keymap_but_cb(), ui_layout_variable_size(), UI_PROP_DECORATE, ui_text_icon_width_ex(), ui_text_pad_none, UI_UNIT_X, uiDefAutoButR(), uiDefBut(), uiDefButR_prop(), uiDefIconButO(), uiItemL_respect_property_split(), uiLayout::use_property_decorate(), ItemInternal::use_property_decorate_no_pad(), uiLayout::use_property_split(), WM_keymap_item_to_string(), x, and y.
Referenced by uiLayout::prop(), and uiLayout::prop_search().
|
static |
Definition at line 1077 of file interface_layout.cc.
References BLI_assert, HotkeyEvent, KM_ALT, KM_CTRL, KM_HYPER, KM_MOD_HELD, KM_NOTHING, KM_OSKEY, KM_SHIFT, uiButHotkeyEvent::modifier_key, RNA_int_set(), uiBut::rnapoin, and uiBut::type.
Referenced by ui_item_with_label().
|
static |
Definition at line 603 of file interface_layout.cc.
References BLI_assert, uiBut::block, uiBlock::buttons, C, CTX_wm_window(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), wmWindow::eventstate, blender::Array< T, InlineBufferCapacity, Allocator >::fill(), KM_SHIFT, len, wmEvent::modifier, POINTER_AS_INT, ptr, RNA_property_array_length(), RNA_property_boolean_set_array(), RNA_property_update(), uiBut::rnapoin, uiBut::rnaprop, and ui_but_update().
Referenced by ui_item_array().
Definition at line 5568 of file interface_layout.cc.
References blender::ui::LayoutInternal::layout_add_but().
Referenced by ui_def_but().
|
static |
Definition at line 5445 of file interface_layout.cc.
References uiLayoutRoot::block, uiBlock::curlayout, uiLayoutRoot::layout, uiLayoutRoot::padding, Sepr, and uiDefBut().
Referenced by blender::ui::block_layout(), and blender::ui::block_layout_resolve().
|
static |
Definition at line 4947 of file interface_layout.cc.
References uiLayout::block(), blender::ui::block_layout_set_current(), uiStyle::columnspace, blender::ui::LayoutInternal::init_from_parent(), uiLayout::root(), uiLayoutItemBx::roundbox, uiLayout::space_, uiLayoutRoot::style, and uiDefBut().
Referenced by uiLayout::box(), and uiLayout::list_box().
|
static |
Definition at line 5416 of file interface_layout.cc.
References uiLayoutRoot::argv, uiLayoutRoot::handlefunc, blender::ui::LayoutInternal::layout_estimate(), blender::ui::LayoutInternal::layout_resolve(), uiLayout::root(), UI_block_func_handle_set(), uiLayout::x_, and uiLayout::y_.
Referenced by blender::ui::block_layout_resolve().
|
static |
Definition at line 5427 of file interface_layout.cc.
References uiButtonItem::but, uiLayout::items(), uiBut::layout, and ui_layout_free().
Referenced by blender::ui::block_layout_free(), blender::ui::block_layout_resolve(), and ui_layout_free().
Definition at line 5899 of file interface_layout.cc.
References uiButtonItem::but, CTX_IFACE_, uiBut::flag, uiLayout::items(), PanelType::label, uiBut::str, PanelType::translation_context, UI_HIDDEN, and ui_layout_has_panel_label().
Referenced by ui_layout_has_panel_label(), and ui_paneltype_draw_impl().
Find first layout ancestor (or self) with a heading set.
Definition at line 1874 of file interface_layout.cc.
References uiLayout::parent().
Referenced by uiLayout::prop(), and ui_item_menu().
|
static |
Definition at line 1885 of file interface_layout.cc.
References uiLayout::alignment(), uiLayout::alignment_set(), uiLayout::heading(), uiLayout::heading_reset(), uiLayout::label(), blender::ui::Right, and uiItemL_respect_property_split().
Referenced by uiLayout::prop(), and ui_item_menu().
| const char * UI_layout_introspect | ( | uiLayout * | layout | ) |
Evaluate layout items as a Python dictionary.
Definition at line 6102 of file interface_layout.cc.
References BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), result, and ui_layout_introspect_items().
Referenced by bpy_rna_uilayout_introspect().
|
static |
Definition at line 6007 of file interface_layout.cc.
References BLI_dynstr_appendf(), uiBut::block, uiButtonItem::but, uiBut::drawstr, uiBlock::evil_C, uiBut::opptr, uiBut::optype, ot, RNA_property_identifier(), RNA_struct_identifier(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, uiBut::tip, PointerRNA::type, uiBut::type, UI_but_operatortype_get_from_enum_menu(), and WM_operator_pystring_ex().
Referenced by ui_layout_introspect_items().
|
static |
Definition at line 6045 of file interface_layout.cc.
References BLI_dynstr_append(), CASE_ITEM, blender::Span< T >::last(), ui_layout_introspect_button(), and ui_layout_introspect_items().
Referenced by UI_layout_introspect(), and ui_layout_introspect_items().
| BLI_INLINE bool ui_layout_is_radial | ( | const uiLayout * | layout | ) |
Definition at line 1518 of file interface_layout.cc.
References BLI_INLINE, blender::ui::PieMenu, uiLayout::root(), uiItem::type(), and uiLayoutRoot::type.
Referenced by uiLayout::op_enum(), and uiLayout::op_enum_items().
| void ui_layout_list_set_labels_active | ( | uiLayout * | layout | ) |
Check all buttons defined in this layout, and set any button flagged as UI_BUT_LIST_ITEM as active/selected. Needed to handle correctly text colors of active (selected) list item.
Definition at line 4990 of file interface_layout.cc.
References uiButtonItem::but, uiBut::flag, uiLayout::items(), UI_but_flag_enable(), UI_BUT_LIST_ITEM, ui_layout_list_set_labels_active(), and UI_SELECT.
Referenced by blender::ui::TreeViewLayoutBuilder::build_row(), ui_layout_list_set_labels_active(), and ui_template_list_layout_draw().
Definition at line 5616 of file interface_layout.cc.
References blender::ui::LayoutInternal::layout_remove_but().
Referenced by UI_but_active_only_ex().
Definition at line 5621 of file interface_layout.cc.
References uiButtonItem::but, and blender::ui::LayoutInternal::ui_layout_find_button_item().
Referenced by ui_but_change_type().
|
static |
Definition at line 392 of file interface_layout.cc.
References UI_ITEM_VARY_X, ui_layout_vary_direction(), and uiLayout::variable_size().
Referenced by ui_item_rna_size(), ui_item_with_label(), and ui_text_icon_width_ex().
|
static |
Definition at line 382 of file interface_layout.cc.
References uiLayout::alignment(), ELEM, blender::ui::Expand, blender::ui::Header, blender::ui::PieMenu, uiLayout::root(), uiLayoutRoot::type, UI_ITEM_VARY_X, and UI_ITEM_VARY_Y.
Referenced by ui_layout_variable_size().
|
static |
Definition at line 4264 of file interface_layout.cc.
References BLI_assert, ceilf, col, UILayoutGridFlowOutput::cos_x_array, UILayoutGridFlowOutput::cos_y_array, UILayoutGridFlowInput::even_columns, UILayoutGridFlowInput::even_rows, float, UILayoutGridFlowOutput::global_avg_w, UILayoutGridFlowOutput::global_max_h, UILayoutGridFlowOutput::heights_array, i, blender::Span< T >::is_empty(), UILayoutGridFlowInput::litem_w, UILayoutGridFlowInput::litem_x, UILayoutGridFlowInput::litem_y, max_ii(), UILayoutGridFlowInput::row_major, UILayoutGridFlowInput::space_x, UILayoutGridFlowInput::space_y, UILayoutGridFlowInput::tot_columns, UILayoutGridFlowOutput::tot_h, UILayoutGridFlowOutput::tot_items, UILayoutGridFlowInput::tot_rows, UILayoutGridFlowOutput::tot_w, ui_item_size(), and UILayoutGridFlowOutput::widths_array.
Referenced by uiLayoutItemGridFlow::estimate_impl(), and uiLayoutItemGridFlow::resolve_impl().
|
static |
Definition at line 3620 of file interface_layout.cc.
References UI_UNIT_X.
Referenced by LayoutRow::resolve_impl().
Definition at line 5865 of file interface_layout.cc.
References uiLayout::block(), C, uiLayout::context(), CTX_store_get(), CTX_store_set(), MenuType::draw, bContextStore::entries, Vector< T, InlineBufferCapacity, Allocator >::extend(), MenuType::flag, G, G_DEBUG_WM, MenuType::idname, Menu::layout, MenuType::listener, printf, SearchOnKeyPress, Menu::type, ui_block_add_dynamic_listener(), UI_block_flag_enable(), and UI_BLOCK_NO_ACCELERATOR_KEYS.
Referenced by blender::ed::asset_browser::AssetCatalogTreeViewItem::build_context_menu(), blender::ed::object::shapekey::ShapeKeyItem::build_context_menu(), blender::ui::bonecollections::BoneCollectionItem::build_context_menu(), blender::ui::greasepencil::LayerGroupViewItem::build_context_menu(), uiLayout::menu_contents(), menu_items_from_ui_create(), ui_item_menu_hold(), ui_item_menutype_func(), UI_pie_menu_invoke(), ui_popup_context_menu_for_button(), UI_popup_menu_invoke(), wm_block_about_create(), and wm_block_splash_create().
Used for popup panels only.
Definition at line 5981 of file interface_layout.cc.
References C, uiLayout::context(), CTX_store_set(), and ui_paneltype_draw_impl().
Referenced by ui_item_paneltype_func(), and UI_popover_panel_invoke().
|
static |
Definition at line 5921 of file interface_layout.cc.
References BKE_panel_free(), BKE_panel_new(), BLI_assert, uiLayout::block(), C, PanelType::children, col, uiLayout::column(), CTX_IFACE_, Panel_Runtime::custom_data_ptr, PanelType::draw, PanelType::draw_header, Panel::flag, uiBlock::handle, uiLayout::items(), PanelType::label, uiLayout::label(), Panel::layout, LISTBASE_FOREACH, PanelType::listener, nullptr, PNL_POPOVER, PanelType::poll, uiPopupBlockHandle::region, uiLayout::row(), Panel::runtime, uiLayout::separator(), PanelType::translation_context, ui_block_add_dynamic_listener(), ui_layout_has_panel_label(), ui_paneltype_draw_impl(), and UI_popup_dummy_panel_set().
Referenced by UI_paneltype_draw(), and ui_paneltype_draw_impl().
|
static |
Definition at line 2634 of file interface_layout.cc.
References uiRNACollectionSearch::butstore, uiRNACollectionSearch::butstore_block, ptr, and UI_butstore_free().
Referenced by ui_but_add_search().
|
static |
Definition at line 464 of file interface_layout.cc.
References name, UI_FSTYLE_WIDGET, ui_text_icon_width_ex(), ui_text_pad_compact, and ui_text_pad_default.
Referenced by uiLayout::panel_prop(), ui_item_array(), ui_item_disabled(), ui_item_enum_expand_elem_exec(), ui_item_rna_size(), and uiItemFullO_ptr_ex().
|
static |
Estimated size of text + icon.
Definition at line 429 of file interface_layout.cc.
References uiLayout::alignment(), uiBlock::aspect, uiLayout::block(), ceilf, blender::ui::Expand, uiItem::fixed_size_set(), uiTextIconPadFactor::icon, uiTextIconPadFactor::icon_only, name, uiLayout::scale_x(), uiTextIconPadFactor::text, UI_fontstyle_string_width_with_block_aspect(), ui_layout_variable_size(), and UI_UNIT_X.
Referenced by ui_item_menu(), ui_item_with_label(), ui_text_icon_width(), and uiItem_simple().
|
static |
Single button with an icon and/or text, using the given button type and no further data/behavior attached.
Definition at line 3124 of file interface_layout.cc.
References uiLayout::alignment(), uiLayout::block(), blender::ui::block_layout_set_current(), uiBut::drawflag, uiBlock::flag, uiBut::flag, Label, blender::ui::Menu, name, uiLayout::red_alert(), blender::ui::Right, uiLayout::root(), uiLayoutRoot::type, UI_BLOCK_LIST_ITEM, ui_block_new_button_group(), UI_but_flag_enable(), UI_BUT_LIST_ITEM, UI_BUT_REDALERT, UI_BUT_TEXT_LEFT, UI_BUT_TEXT_RIGHT, UI_FSTYLE_WIDGET, ui_text_icon_width_ex(), ui_text_pad_none, UI_UNIT_Y, uiDefBut(), uiDefIconBut(), uiDefIconTextBut(), and w().
Referenced by uiLayout::button(), uiLayout::label(), uiItemL_ex(), uiItemL_respect_property_split(), and uiItemLDrag().
|
static |
Operator Item
| r_opptr | Optional, initialize with operator properties when not nullptr. Will always be written to even in the case of errors. |
Definition at line 1358 of file interface_layout.cc.
References uiLayout::active_default(), BLI_assert, uiLayout::block(), blender::ui::block_layout_set_current(), But, blender::bke::idprop::create_group(), PointerRNA::data, uiLayout::emboss_or_undefined(), uiLayout::emboss_set(), flag, uiBut::flag, blender::ui::Menu, name, blender::ui::NoneOrStatus, uiBut::optype, ot, uiLayout::red_alert(), uiLayout::root(), uiLayoutRoot::type, ui_block_new_button_group(), UI_BUT_ACTIVE_DEFAULT, UI_but_drawflag_disable(), UI_but_flag_enable(), UI_BUT_ICON_LEFT, UI_but_operator_ptr_ensure(), UI_BUT_REDALERT, UI_ITEM_O_DEPRESS, UI_ITEM_R_ICON_ONLY, UI_ITEM_R_NO_BG, UI_SELECT_DRAW, ui_text_icon_width(), UI_UNIT_Y, uiDefButO_ptr(), uiDefIconButO_ptr(), uiDefIconTextButO_ptr(), w(), and WM_operatortype_name().
Referenced by uiLayout::op(), and uiLayout::op_menu_hold().
| uiBut * uiItemL_ex | ( | uiLayout * | layout, |
| const StringRef | name, | ||
| int | icon, | ||
| const bool | highlight, | ||
| const bool | redalert ) |
Definition at line 3171 of file interface_layout.cc.
References name, UI_but_flag_enable(), UI_BUT_REDALERT, UI_SELECT_DRAW, and uiItem_simple().
Referenced by block_create__close_file_dialog(), block_create_autorun_warning(), block_create_save_file_overwrite_dialog(), blender::ed::object::shapekey::ShapeKeyItem::build_row(), blender::ui::bonecollections::BoneCollectionItem::build_row(), blender::ui::template_breadcrumbs(), ui_alert_create(), uiTemplateInputStatus(), wm_block_about_create(), wm_block_create_redo(), wm_block_dialog_create(), and wm_block_insert_unicode_create().
| uiLayout * uiItemL_respect_property_split | ( | uiLayout * | layout, |
| blender::StringRef | text, | ||
| int | icon ) |
Helper to add a label using a property split layout if needed. After calling this the active layout will be the one to place the labeled items in. An additional layout may be returned to place decorator buttons in.
Definition at line 3211 of file interface_layout.cc.
References uiLayout::block(), blender::ui::block_layout_set_current(), uiPropertySplitWrapper::decorate_column, uiPropertySplitWrapper::label_column, uiPropertySplitWrapper::property_row, ui_item_name_add_colon(), UI_MAX_NAME_STR, uiItem_simple(), uiItemPropertySplitWrapperCreate(), and uiLayout::use_property_split().
Referenced by draw_matrix_template(), graph_panel_key_properties(), template_ID(), template_search_buttons(), ui_item_with_label(), and ui_layout_heading_label_add().
| void uiItemLDrag | ( | uiLayout * | layout, |
| PointerRNA * | ptr, | ||
| blender::StringRef | name, | ||
| int | icon ) |
Label icon for dragging.
Definition at line 3231 of file interface_layout.cc.
References name, ptr, RNA_struct_is_ID(), UI_but_drag_set_id(), and uiItem_simple().
Referenced by buttons_panel_context_draw().
| uiPropertySplitWrapper uiItemPropertySplitWrapperCreate | ( | uiLayout * | parent_layout | ) |
Normally, we handle the split layout in uiLayout::prop(), but there are other cases where the logic is needed. Ideally, uiLayout::prop() could just call this, but it currently has too many special needs.
The returned #uiPropertySplitWrapper.decorator_column may be null when decorators are disabled (#uiLayoutGetPropDecorate() returns false).
Definition at line 3193 of file interface_layout.cc.
References uiLayout::alignment_set(), uiLayout::column(), uiPropertySplitWrapper::decorate_column, uiPropertySplitWrapper::label_column, uiPropertySplitWrapper::property_row, blender::ui::Right, uiLayout::row(), uiLayout::split(), UI_ITEM_PROP_SEP_DIVIDE, blender::ui::LayoutInternal::ui_item_prop_split_layout_hack(), and uiLayout::use_property_decorate().
Referenced by blender::ed::space_node::ui_node_draw_input(), and uiItemL_respect_property_split().
| uiLayout * uiItemsAlertBox | ( | uiBlock * | block, |
| const int | size, | ||
| const eAlertIcon | icon ) |
Definition at line 6173 of file interface_layout.cc.
References uiFontStyle::points, size(), UI_SCALE_FAC, UI_style_get_dpi(), uiItemsAlertBox(), and uiStyle::widget.
| uiLayout * uiItemsAlertBox | ( | uiBlock * | block, |
| const uiStyle * | style, | ||
| const int | dialog_width, | ||
| const eAlertIcon | icon, | ||
| const int | icon_size ) |
Helpers to add a big icon and create a split layout for alert popups. Returns the layout to place further items into the alert box.
Definition at line 6118 of file interface_layout.cc.
References ALERT_ICON_ERROR, ALERT_ICON_INFO, ALERT_ICON_QUESTION, ALERT_ICON_WARNING, uiBlock::alert_level, uiLayout::alignment_set(), blender::ui::block_layout(), uiLayout::column(), uiStyle::columnspace, Error, float, Info, blender::ui::Left, None, blender::ui::Panel, uiLayout::row(), uiLayout::split(), UI_SCALE_FAC, uiDefButAlert(), blender::ui::Vertical, and Warning.
Referenced by block_create__close_file_dialog(), block_create_autorun_warning(), block_create_save_file_overwrite_dialog(), ui_alert_create(), uiItemsAlertBox(), and wm_block_dialog_create().
| bool uiLayoutEndsWithPanelHeader | ( | const uiLayout & | layout | ) |
Definition at line 4882 of file interface_layout.cc.
References uiLayout::items(), and uiItem::type().
Referenced by ed_panel_draw().
| void uiLayoutListItemAddPadding | ( | uiLayout * | layout | ) |
Definition at line 5107 of file interface_layout.cc.
References uiLayout::block(), blender::ui::block_layout_set_current(), uiItem::fixed_size_set(), uiLayout::row(), Sepr, uiDefBut(), and uiLayoutListItemPaddingWidth().
Referenced by blender::ui::TreeViewLayoutBuilder::build_row(), and ui_template_list_layout_draw().
| int uiLayoutListItemPaddingWidth | ( | ) |
Definition at line 5102 of file interface_layout.cc.
References UI_SCALE_FAC.
Referenced by uiLayoutListItemAddPadding().
| void uiLayoutSetFunc | ( | uiLayout * | layout, |
| uiMenuHandleFunc | handlefunc, | ||
| void * | argv ) |
Definition at line 5648 of file interface_layout.cc.
References uiLayoutRoot::argv, uiLayoutRoot::handlefunc, and uiLayout::root().
| void uiLayoutSetTooltipCustomFunc | ( | uiLayout * | layout, |
| uiButToolTipCustomFunc | func, | ||
| void * | arg, | ||
| uiCopyArgFunc | copy_arg, | ||
| uiFreeArgFunc | free_arg ) |
Same as above but should be used when building a fully custom tooltip instead of just generating a description.
Definition at line 5779 of file interface_layout.cc.
References uiButtonItem::but, Decorator, uiLayout::items(), uiBut::type, UI_but_func_tooltip_custom_set(), and uiLayoutSetTooltipCustomFunc().
Referenced by blender::ed::space_node::node_socket_add_tooltip(), blender::ed::space_node::node_socket_add_tooltip_in_node_editor(), and uiLayoutSetTooltipCustomFunc().
| void uiLayoutSetTooltipFunc | ( | uiLayout * | layout, |
| uiButToolTipFunc | func, | ||
| void * | arg, | ||
| uiCopyArgFunc | copy_arg, | ||
| uiFreeArgFunc | free_arg ) |
Set tooltip function for all buttons in the layout. func, arg and free_arg are passed on to UI_but_func_tooltip_set, so their meaning is the same.
| func | The callback function that gets called to get tooltip content |
| arg | An optional opaque pointer that gets passed to func |
| free_arg | An optional callback for freeing arg (can be set to e.g. MEM_freeN) |
| copy_arg | An optional callback for duplicating arg in case UI_but_func_tooltip_set is being called on multiple buttons (can be set to e.g. MEM_dupallocN). If set to NULL, arg will be passed as-is to all buttons. |
Definition at line 5744 of file interface_layout.cc.
References uiButtonItem::but, Decorator, uiLayout::items(), uiBut::type, UI_but_func_tooltip_set(), and uiLayoutSetTooltipFunc().
Referenced by blender::nodes::draw_interface_panel_as_panel(), and uiLayoutSetTooltipFunc().
|
constexpr |
ui_text_pad_default scaled down.
Definition at line 421 of file interface_layout.cc.
Referenced by ui_item_menu(), and ui_text_icon_width().
|
constexpr |
This adds over an icons width of padding even when no icon is used, this is done because most buttons need additional space (drop-down chevron for example). menus and labels use much smaller text values compared to this default.
Definition at line 418 of file interface_layout.cc.
Referenced by ui_text_icon_width().
|
constexpr |
Least amount of padding not to clip the text or icon.
Definition at line 424 of file interface_layout.cc.
Referenced by ui_item_with_label(), and uiItem_simple().