Blender V4.5
interface_layout.cc File Reference
#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.h"
#include "BLI_string_ref.hh"
#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.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  uiButtonItem
struct  uiLayoutItemFlow
struct  uiLayoutItemGridFlow
struct  uiLayoutItemBx
struct  uiLayoutItemPanelHeader
struct  uiLayoutItemPanelBody
struct  uiLayoutItemSplit
struct  uiLayoutItemRoot
struct  uiTextIconPadFactor
struct  MenuItemLevel
struct  UILayoutGridFlowInput
struct  UILayoutGridFlowOutput

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

Special RNA Items
int uiLayoutGetLocalDir (const uiLayout *layout)
static uiLayoutui_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 eButType 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 eButType 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 uiButui_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 uiButuiItemFullO_ptr_ex (uiLayout *layout, wmOperatorType *ot, std::optional< StringRef > name, int icon, const wmOperatorCallContext context, const eUI_Item_Flag flag, PointerRNA *r_opptr)
static void ui_item_menu_hold (bContext *C, ARegion *butregion, uiBut *but)
void uiItemFullOMenuHold_ptr (uiLayout *layout, wmOperatorType *ot, std::optional< StringRef > name, int icon, const wmOperatorCallContext context, const eUI_Item_Flag flag, const char *menu_id, PointerRNA *r_opptr)
static StringRef ui_menu_enumpropname (uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int retval)
void uiItemEnumO_ptr (uiLayout *layout, wmOperatorType *ot, std::optional< StringRef > name, int icon, const StringRefNull propname, int value)
void uiItemEnumO (uiLayout *layout, const StringRefNull opname, const std::optional< StringRef > name, int icon, const StringRefNull propname, int value)
BLI_INLINE bool ui_layout_is_radial (const uiLayout *layout)
void uiItemsFullEnumO_items (uiLayout *layout, wmOperatorType *ot, const PointerRNA &ptr, PropertyRNA *prop, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, const EnumPropertyItem *item_array, int totitem, int active)
void uiItemsFullEnumO (uiLayout *layout, const StringRefNull opname, const StringRefNull propname, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, const int active)
void uiItemsEnumO (uiLayout *layout, const StringRefNull opname, const StringRefNull propname)
void uiItemEnumO_value (uiLayout *layout, const StringRefNull name, int icon, const StringRefNull opname, const StringRefNull propname, int value)
void uiItemEnumO_string (uiLayout *layout, const StringRef name, int icon, const StringRefNull opname, const StringRefNull propname, const char *value_str)
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 uiLayoutui_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 uiLayoutui_item_prop_split_layout_hack (uiLayout *layout_parent, uiLayout *layout_split)
void uiItemFullR_with_popover (uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, const eUI_Item_Flag flag, const std::optional< StringRefNull > name, int icon, const char *panel_type)
void uiItemFullR_with_menu (uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, const eUI_Item_Flag flag, const std::optional< StringRefNull > name, int icon, const char *menu_type)
void uiItemEnumR_prop (uiLayout *layout, const std::optional< StringRefNull > name, int icon, PointerRNA *ptr, PropertyRNA *prop, int value)
void uiItemEnumR_string_prop (uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, const char *value, const std::optional< StringRefNull > name, int icon)
void uiItemEnumR_string (uiLayout *layout, PointerRNA *ptr, const StringRefNull propname, const char *value, const std::optional< StringRefNull > name, int icon)
void uiItemsEnumR (uiLayout *layout, PointerRNA *ptr, const StringRefNull propname)
static void search_id_collection (StructRNA *ptype, PointerRNA *r_ptr, PropertyRNA **r_prop)
static void ui_rna_collection_search_arg_free_fn (void *ptr)
uiButui_but_add_search (uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, const bool results_are_suggestions)
void uiItemPointerR_prop (uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, const std::optional< StringRefNull > name_opt, int icon, bool results_are_suggestions)
void uiItemPointerR (uiLayout *layout, PointerRNA *ptr, const StringRefNull propname, PointerRNA *searchptr, const StringRefNull searchpropname, const std::optional< StringRefNull > name, int icon)
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 uiButui_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)
void uiItemMContents (uiLayout *layout, const StringRef menuname)
void uiItemDecoratorR_prop (uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index)
void uiItemDecoratorR (uiLayout *layout, PointerRNA *ptr, const std::optional< StringRefNull > propname, int index)
void uiItemPopoverPanel_ptr (uiLayout *layout, const bContext *C, PanelType *pt, const std::optional< StringRef > name_opt, int icon)
void uiItemPopoverPanel (uiLayout *layout, const bContext *C, const StringRef panel_type, std::optional< blender::StringRef > name_opt, int icon)
void uiItemPopoverPanelFromGroup (uiLayout *layout, bContext *C, int space_id, int region_id, const char *context, const char *category)
static uiButuiItemL_ (uiLayout *layout, const StringRef name, int icon)
uiButuiItemL_ex (uiLayout *layout, const StringRef name, int icon, const bool highlight, const bool redalert)
uiPropertySplitWrapper uiItemPropertySplitWrapperCreate (uiLayout *parent_layout)
uiLayoutuiItemL_respect_property_split (uiLayout *layout, StringRef text, int icon)
void uiItemLDrag (uiLayout *layout, PointerRNA *ptr, StringRef name, int icon)
void uiItemProgressIndicator (uiLayout *layout, const char *text, const float factor, const eButProgressType progress_type)
void uiItemSpacer (uiLayout *layout)
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)
void uiItemMenuEnumFullO_ptr (uiLayout *layout, const bContext *C, wmOperatorType *ot, const StringRefNull propname, std::optional< StringRefNull > name, int icon, PointerRNA *r_opptr)
void uiItemMenuEnumFullO (uiLayout *layout, const bContext *C, const StringRefNull opname, const StringRefNull propname, StringRefNull name, int icon, PointerRNA *r_opptr)
void uiItemMenuEnumO (uiLayout *layout, const bContext *C, const StringRefNull opname, const StringRefNull propname, StringRefNull name, int icon)
static void menu_item_enum_rna_menu (bContext *, uiLayout *layout, void *arg)
void uiItemMenuEnumR_prop (uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, const std::optional< StringRefNull > name, int icon)
void uiItemTabsEnumR_prop (uiLayout *layout, bContext *C, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *ptr_highlight, PropertyRNA *prop_highlight, bool icon_only)
Layout Items
static void ui_litem_estimate_row (uiLayout *litem)
static int ui_litem_min_width (int itemw)
static void ui_litem_layout_row (uiLayout *litem)
static int spaces_after_column_item (const uiLayout *litem, const uiItem *item, const uiItem *next_item, const bool is_box)
static void ui_litem_estimate_column (uiLayout *litem, bool is_box)
static void ui_litem_layout_column (uiLayout *litem, bool is_box, bool is_menu)
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_layout_radial (uiLayout *litem)
static void ui_litem_estimate_root (uiLayout *)
static void ui_litem_layout_root_radial (uiLayout *litem)
static void ui_litem_layout_root (uiLayout *litem)
static void ui_litem_estimate_panel_header (uiLayout *litem)
static void ui_litem_layout_panel_header (uiLayout *litem)
static void ui_litem_estimate_panel_body (uiLayout *litem)
static void ui_litem_layout_panel_body (uiLayout *litem)
static void ui_litem_estimate_box (uiLayout *litem)
static void ui_litem_layout_box (uiLayout *litem)
static void ui_litem_estimate_column_flow (uiLayout *litem)
static void ui_litem_layout_column_flow (uiLayout *litem)
static void ui_litem_grid_flow_compute (blender::Span< uiItem * > items, const UILayoutGridFlowInput *parameters, UILayoutGridFlowOutput *results)
static void ui_litem_estimate_grid_flow (uiLayout *litem)
static void ui_litem_layout_grid_flow (uiLayout *litem)
static void ui_litem_estimate_absolute (uiLayout *litem)
static void ui_litem_layout_absolute (uiLayout *litem)
static void ui_litem_estimate_split (uiLayout *litem)
static void ui_litem_layout_split (uiLayout *litem)
static void ui_litem_estimate_overlap (uiLayout *litem)
static void ui_litem_layout_overlap (uiLayout *litem)
static void ui_litem_init_from_parent (uiLayout *litem, uiLayout *layout, int align)
static void ui_layout_heading_set (uiLayout *layout, const StringRef heading)
bool uiLayoutEndsWithPanelHeader (const uiLayout &layout)
static uiLayoutItemBxui_layout_box (uiLayout *layout, int type)
void ui_layout_list_set_labels_active (uiLayout *layout)
void uiLayoutSetActive (uiLayout *layout, bool active)
void uiLayoutSetActiveDefault (uiLayout *layout, bool active_default)
void uiLayoutSetActivateInit (uiLayout *layout, bool activate_init)
void uiLayoutSetEnabled (uiLayout *layout, bool enabled)
void uiLayoutSetRedAlert (uiLayout *layout, bool redalert)
void uiLayoutSetKeepAspect (uiLayout *layout, bool keepaspect)
void uiLayoutSetAlignment (uiLayout *layout, char alignment)
void uiLayoutSetScaleX (uiLayout *layout, float scale)
void uiLayoutSetScaleY (uiLayout *layout, float scale)
void uiLayoutSetUnitsX (uiLayout *layout, float unit)
void uiLayoutSetUnitsY (uiLayout *layout, float unit)
void uiLayoutSetEmboss (uiLayout *layout, blender::ui::EmbossType emboss)
bool uiLayoutGetPropSep (uiLayout *layout)
void uiLayoutSetPropSep (uiLayout *layout, bool is_sep)
bool uiLayoutGetPropDecorate (uiLayout *layout)
void uiLayoutSetPropDecorate (uiLayout *layout, bool is_sep)
void uiLayoutSetSearchWeight (uiLayout *layout, const float weight)
float uiLayoutGetSearchWeight (uiLayout *layout)
PaneluiLayoutGetRootPanel (uiLayout *layout)
bool uiLayoutGetActive (uiLayout *layout)
bool uiLayoutGetActiveDefault (uiLayout *layout)
bool uiLayoutGetActivateInit (uiLayout *layout)
bool uiLayoutGetEnabled (uiLayout *layout)
bool uiLayoutGetRedAlert (uiLayout *layout)
bool uiLayoutGetKeepAspect (uiLayout *layout)
int uiLayoutGetAlignment (uiLayout *layout)
int uiLayoutGetWidth (uiLayout *layout)
float uiLayoutGetScaleX (uiLayout *layout)
float uiLayoutGetScaleY (uiLayout *layout)
float uiLayoutGetUnitsX (uiLayout *layout)
float uiLayoutGetUnitsY (uiLayout *layout)
blender::ui::EmbossType uiLayoutGetEmboss (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_estimate (uiItem *item)
static void ui_item_align (uiLayout *litem, short nr)
static void ui_item_flag (uiLayout *litem, int flag)
static void ui_item_layout (uiItem *item)
static void ui_layout_end (uiBlock *block, uiLayout *layout, int *r_x, int *r_y)
static void ui_layout_free (uiLayout *layout)
static void ui_layout_add_padding_button (uiLayoutRoot *root)
uiLayoutUI_block_layout (uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const uiStyle *style)
uiBlockuiLayoutGetBlock (uiLayout *layout)
wmOperatorCallContext uiLayoutGetOperatorContext (uiLayout *layout)
void UI_block_layout_set_current (uiBlock *block, uiLayout *layout)
void ui_layout_add_but (uiLayout *layout, uiBut *but)
static uiButtonItemui_layout_find_button_item (const uiLayout *layout, const 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 uiLayoutSetFixedSize (uiLayout *layout, bool fixed_size)
bool uiLayoutGetFixedSize (uiLayout *layout)
void uiLayoutSetOperatorContext (uiLayout *layout, wmOperatorCallContext opcontext)
void uiLayoutSetFunc (uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv)
void UI_block_layout_free (uiBlock *block)
void UI_block_layout_resolve (uiBlock *block, int *r_x, int *r_y)
bool UI_block_layout_needs_resolving (const uiBlock *block)
void uiLayoutSetContextPointer (uiLayout *layout, StringRef name, PointerRNA *ptr)
void uiLayoutSetContextString (uiLayout *layout, StringRef name, blender::StringRef value)
void uiLayoutSetContextInt (uiLayout *layout, StringRef name, int64_t value)
bContextStoreuiLayoutGetContextStore (uiLayout *layout)
void uiLayoutContextCopy (uiLayout *layout, const bContextStore *context)
void uiLayoutSetTooltipFunc (uiLayout *layout, uiButToolTipFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg)
void uiLayoutSetContextFromBut (uiLayout *layout, uiBut *but)
wmOperatorTypeUI_but_operatortype_get_from_enum_menu (uiBut *but, PropertyRNA **r_prop)
MenuTypeUI_but_menutype_get (const uiBut *but)
PanelTypeUI_but_paneltype_get (const uiBut *but)
std::optional< blender::StringRefNullUI_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,

Note
Proper string escaping isn't used, triple quotes are used to prevent single quotes from interfering with Python syntax. If we want this to be fool-proof, we would need full Python compatible string escape support. As we don't use triple quotes in the UI it's good-enough in practice.
static void ui_layout_introspect_button (DynStr *ds, const uiButtonItem *bitem)
static void ui_layout_introspect_items (DynStr *ds, blender::Span< uiItem * > items)
const char * UI_layout_introspect (uiLayout *layout)
Alert Box with Big Icon
uiLayoutuiItemsAlertBox (uiBlock *block, const uiStyle *style, const int dialog_width, const eAlertIcon icon, const int icon_size)
uiLayoutuiItemsAlertBox (uiBlock *block, const int size, const eAlertIcon icon)

Structs and Defines

#define UI_OPERATOR_ERROR_RET(_ot, _opname, return_statement)
#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 int 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)

Macro Definition Documentation

◆ CASE_ITEM

#define CASE_ITEM ( type,
name )
Value:
case type: { \
BLI_dynstr_append(ds, "'type': '"); \
BLI_dynstr_append(ds, name); \
BLI_dynstr_append(ds, "', "); \
break; \
} \
((void)0)

Referenced by ui_layout_introspect_items().

◆ UI_ITEM_PROP_SEP_DIVIDE

#define UI_ITEM_PROP_SEP_DIVIDE   0.4f

Definition at line 73 of file interface_layout.cc.

Referenced by uiLayout::prop(), and uiItemPropertySplitWrapperCreate().

◆ UI_ITEM_VARY_X

#define UI_ITEM_VARY_X   1

Definition at line 258 of file interface_layout.cc.

Referenced by ui_layout_variable_size(), and ui_layout_vary_direction().

◆ UI_ITEM_VARY_Y

#define UI_ITEM_VARY_Y   2

Definition at line 259 of file interface_layout.cc.

Referenced by ui_layout_vary_direction().

◆ UI_OPERATOR_ERROR_RET

#define UI_OPERATOR_ERROR_RET ( _ot,
_opname,
return_statement )
Value:
if (ot == nullptr) { \
ui_item_disabled(layout, _opname); \
RNA_warning("'%s' unknown operator", _opname); \
return_statement; \
} \
(void)0
wmOperatorType * ot
Definition wm_files.cc:4225

Definition at line 65 of file interface_layout.cc.

Referenced by uiLayout::op(), uiItemEnumO_string(), uiItemEnumO_value(), and uiItemMenuEnumFullO().

◆ UI_PROP_DECORATE

#define UI_PROP_DECORATE

Definition at line 56 of file interface_layout.cc.

Referenced by ui_item_with_label().

◆ UI_PROP_SEP_ICON_WIDTH_EXCEPTION

#define UI_PROP_SEP_ICON_WIDTH_EXCEPTION

Definition at line 59 of file interface_layout.cc.

Typedef Documentation

◆ uiItemInternalFlag

◆ uiItemType

Definition at line 140 of file interface_layout.cc.

Function Documentation

◆ block_search_filter_tag_buttons()

bool block_search_filter_tag_buttons ( uiBlock * block,
const char * search_filter )
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.

Note
It would be great to return early here if we found a match, but because the results may be visible we have to continue searching the entire block.
Returns
True if the block has any search results.

Definition at line 5390 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().

◆ block_search_panel_label_matches()

bool block_search_panel_label_matches ( const uiBlock * block,
const char * search_string )
static

◆ button_group_has_search_match()

bool button_group_has_search_match ( const uiButtonGroup & group,
const char * search_filter )
static

Test for a search result within a specific button group.

Definition at line 5370 of file interface_layout.cc.

References button_matches_search_filter(), and uiButtonGroup::buttons.

Referenced by block_search_filter_tag_buttons().

◆ button_matches_search_filter()

bool button_matches_search_filter ( uiBut * but,
const char * search_filter )
static

Returns true if a button or the data / operator it represents matches the search filter.

Definition at line 5307 of file interface_layout.cc.

References BLI_strcasestr(), free(), i, MEM_freeN(), wmOperatorType::name, uiBut::optype, ptr, RNA_property_description(), RNA_property_enum_items_gettexted(), RNA_property_ui_name(), uiBut::rnapoin, uiBut::rnaprop, uiBut::str, uiBut::type, and UI_BTYPE_MENU.

Referenced by button_group_has_search_match().

◆ menu_item_enum_opname_menu()

◆ menu_item_enum_opname_menu_active()

◆ menu_item_enum_rna_menu()

void menu_item_enum_rna_menu ( bContext * ,
uiLayout * layout,
void * arg )
static

◆ search_id_collection()

void search_id_collection ( StructRNA * ptype,
PointerRNA * r_ptr,
PropertyRNA ** r_prop )
static

◆ spaces_after_column_item()

int spaces_after_column_item ( const uiLayout * litem,
const uiItem * item,
const uiItem * next_item,
const bool is_box )
static

◆ UI_block_apply_search_filter()

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.

Note
Must not be run after UI_block_layout_resolve.

Definition at line 5406 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().

◆ UI_block_layout()

uiLayout * UI_block_layout ( uiBlock * block,
int dir,
int type,
int x,
int y,
int size,
int em,
int padding,
const uiStyle * style )

Definition at line 5712 of file interface_layout.cc.

References uiLayout::active_, BLI_addtail(), uiLayoutRoot::block, uiLayout::context_, uiBlock::curlayout, ELEM, uiLayout::emboss_, uiLayoutRoot::emh, uiLayoutRoot::emw, uiLayout::enabled_, uiItem::flag_, uiLayout::h_, uiLayoutRoot::layout, uiBlock::layouts, MEM_callocN(), uiLayoutRoot::opcontext, padding(), uiLayoutRoot::padding, uiLayout::root_, size(), uiLayout::space_, uiLayoutRoot::style, uiStyle::templatespace, uiLayoutRoot::type, uiItem::type_, ui_layout_add_padding_button(), UI_LAYOUT_HORIZONTAL, UI_LAYOUT_MENU, UI_LAYOUT_PIEMENU, UI_LAYOUT_VERT_BAR, UI_UNIT_X, UI_UNIT_Y, blender::ui::Undefined, uiLayout::w_, WM_OP_INVOKE_REGION_WIN, x, uiLayout::x_, y, and uiLayout::y_.

Referenced by colorband_tools_fn(), component_menu(), blender::ed::space_node::draw_tree_path(), ed_panel_draw(), ED_region_header_layout(), ED_time_scrub_channel_search_draw(), menu_add_shortcut(), menu_change_shortcut(), menu_items_from_ui_create(), blender::ed::space_node::node_update_basis_buttons(), blender::ed::space_node::node_update_basis_from_declaration(), blender::ed::space_node::node_update_basis_socket(), panel_property_search(), blender::ed::asset::shelf::region_layout(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), UI_pie_menu_begin(), ui_popover_create_block(), ui_popup_menu_create_block(), uiItemsAlertBox(), wm_block_about_create(), wm_block_create_redo(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_splash_create(), and wm_operator_ui_create().

◆ UI_block_layout_free()

void UI_block_layout_free ( uiBlock * block)

Used for property search when the layout process needs to be cancelled in order to avoid computing the locations for buttons, but the layout items created while adding the buttons must still be freed.

Definition at line 5896 of file interface_layout.cc.

References uiBlock::layouts, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), and ui_layout_free().

Referenced by panel_property_search().

◆ UI_block_layout_needs_resolving()

bool UI_block_layout_needs_resolving ( const uiBlock * block)

Definition at line 5929 of file interface_layout.cc.

References BLI_listbase_is_empty(), and uiBlock::layouts.

Referenced by ui_textedit_begin().

◆ UI_block_layout_resolve()

◆ UI_block_layout_set_current()

void UI_block_layout_set_current ( uiBlock * block,
uiLayout * layout )

Definition at line 5776 of file interface_layout.cc.

References uiBlock::curlayout.

Referenced by uiLayout::absolute(), blender::ui::TreeViewLayoutBuilder::build_from_tree(), blender::ui::GridViewLayoutBuilder::build_from_view(), blender::ui::GridViewBuilder::build_grid_view(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), blender::ui::TreeViewLayoutBuilder::build_row(), blender::ui::TreeViewBuilder::build_tree_view(), colorband_tools_fn(), uiLayout::column(), uiLayout::column_flow(), ED_time_scrub_channel_search_draw(), blender::ed::asset_browser::file_create_asset_catalog_tree_view_in_layout(), uiLayout::grid_flow(), uiLayout::menu_pie(), uiLayout::overlap(), uiLayout::panel_prop(), uiLayout::prop(), uiLayout::row(), uiLayout::separator(), uiLayout::split(), blender::ed::spreadsheet::spreadsheet_data_set_panel_draw(), ui_def_but_rna__menu(), ui_imageuser_layer_menu(), ui_imageuser_pass_menu(), ui_imageuser_view_menu_multiview(), ui_imageuser_view_menu_rr(), ui_item_array(), ui_item_disabled(), ui_item_enum_expand_exec(), ui_item_menu(), ui_item_with_label(), ui_layout_box(), blender::ed::space_node::ui_node_menu_column(), blender::ed::space_node::ui_template_node_link_menu(), uiItemDecoratorR_prop(), uiItemFullO_ptr_ex(), uiItemL_(), uiItemL_respect_property_split(), uiItemProgressIndicator(), uiItemsFullEnumO_items(), uiItemSpacer(), uiItemTabsEnumR_prop(), uiLayoutListItemAddPadding(), uiTemplateMenuSearch(), uiTemplateNodeLink(), uiTemplateOperatorSearch(), and uiTemplateRunningJobs().

◆ ui_but_add_search()

◆ UI_but_asset_shelf_type_idname_get()

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 6045 of file interface_layout.cc.

References UI_asset_shelf_idname_from_button_context().

Referenced by shortcut_get_operator_property().

◆ UI_but_menutype_get()

◆ UI_but_operatortype_get_from_enum_menu()

◆ UI_but_paneltype_get()

◆ ui_but_tip_from_enum_item()

void ui_but_tip_from_enum_item ( uiBut * but,
const EnumPropertyItem * item )
static

Update a buttons tip with an enum's description if possible.

Definition at line 1200 of file interface_layout.cc.

References EnumPropertyItem::description, wmOperatorType::get_description, uiBut::optype, and uiBut::tip.

Referenced by uiItemsEnumR(), and uiItemsFullEnumO_items().

◆ UI_context_active_but_prop_get_filebrowser()

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 )

◆ ui_get_radialbut_vec()

RadialDirection ui_get_radialbut_vec ( float vec[2],
short itemnum )
static

Definition at line 3873 of file interface_layout.cc.

References PIE_MAX_ITEMS, printf, ui_but_pie_dir(), and ui_radial_dir_order.

Referenced by ui_litem_layout_radial().

◆ ui_item_align()

◆ ui_item_array()

◆ ui_item_disabled()

◆ ui_item_enum_expand()

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

Definition at line 897 of file interface_layout.cc.

References ptr, UI_BTYPE_ROW, and ui_item_enum_expand_exec().

Referenced by uiLayout::prop().

◆ ui_item_enum_expand_elem_exec()

◆ ui_item_enum_expand_exec()

◆ ui_item_enum_expand_handle()

void ui_item_enum_expand_handle ( bContext * C,
void * arg1,
void * arg2 )
static

◆ ui_item_enum_expand_tabs()

◆ ui_item_estimate()

◆ ui_item_fit()

int ui_item_fit ( const int item,
const int pos,
const int all,
const int available,
const bool is_last,
const int alignment,
float * extra_pixel )
static

Definition at line 220 of file interface_layout.cc.

References all(), ELEM, pos, and UI_LAYOUT_ALIGN_EXPAND.

Referenced by ui_litem_layout_row().

◆ ui_item_flag()

◆ ui_item_is_radial_displayable()

bool ui_item_is_radial_displayable ( uiItem * item)
static

Definition at line 3887 of file interface_layout.cc.

References uiItem::type_, and UI_BTYPE_LABEL.

Referenced by ui_litem_layout_radial().

◆ ui_item_is_radial_drawable()

bool ui_item_is_radial_drawable ( uiButtonItem * bitem)
static

◆ ui_item_layout()

◆ ui_item_local_sublayout()

uiLayout * ui_item_local_sublayout ( uiLayout * test,
uiLayout * layout,
bool align )
static

◆ ui_item_menu()

◆ ui_item_menu_hold()

◆ ui_item_menutype_func()

void ui_item_menutype_func ( bContext * C,
uiLayout * layout,
void * arg_mt )

◆ ui_item_move()

void ui_item_move ( uiItem * item,
const int delta_xmin,
const int delta_xmax )
static

◆ ui_item_name_add_colon() [1/2]

StringRef ui_item_name_add_colon ( StringRef name,
char namestr[UI_MAX_NAME_STR] )
static

◆ ui_item_name_add_colon() [2/2]

StringRefNull ui_item_name_add_colon ( StringRefNull name,
char namestr[UI_MAX_NAME_STR] )
static

◆ ui_item_offset()

void ui_item_offset ( const uiItem * item,
int * r_x,
int * r_y )
static

◆ ui_item_paneltype_func()

void ui_item_paneltype_func ( bContext * C,
uiLayout * layout,
void * arg_pt )

◆ ui_item_position()

◆ ui_item_prop_split_layout_hack()

uiLayout * ui_item_prop_split_layout_hack ( uiLayout * layout_parent,
uiLayout * layout_split )
static

Hack to add further items in a row into the second part of the split layout, so the label part keeps a fixed size.

Returns
The layout to place further items in for the split layout.

Definition at line 1917 of file interface_layout.cc.

References uiLayout::child_items_layout_, uiItem::flag_, uiLayout::row(), uiItem::type_, and uiLayoutSetPropSep().

Referenced by uiLayout::prop(), and uiItemPropertySplitWrapperCreate().

◆ ui_item_rna_is_expand()

bool ui_item_rna_is_expand ( PropertyRNA * prop,
int index,
const eUI_Item_Flag item_flag )
static

◆ ui_item_rna_size()

◆ ui_item_scale()

◆ ui_item_size()

◆ ui_item_with_label()

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 )
static

◆ ui_keymap_but_cb()

void ui_keymap_but_cb ( bContext * ,
void * but_v,
void *  )
static

◆ ui_layer_but_cb()

◆ ui_layout_add_but()

◆ ui_layout_add_padding_button()

void ui_layout_add_padding_button ( uiLayoutRoot * root)
static

◆ ui_layout_box()

◆ ui_layout_end()

void ui_layout_end ( uiBlock * block,
uiLayout * layout,
int * r_x,
int * r_y )
static

◆ ui_layout_find_button_item()

uiButtonItem * ui_layout_find_button_item ( const uiLayout * layout,
const uiBut * but )
static

◆ ui_layout_free()

void ui_layout_free ( uiLayout * layout)
static

◆ ui_layout_has_panel_label()

◆ ui_layout_heading_find()

uiLayout * ui_layout_heading_find ( uiLayout * cur_layout)
static

Find first layout ancestor (or self) with a heading set.

Returns
the layout to add the heading to as a fallback (i.e. if it can't be placed in a split layout). Its #uiLayout.heading member can be cleared to mark the heading as added (so it's not added multiple times). Returns a pointer to the heading

Definition at line 1877 of file interface_layout.cc.

References uiLayout::parent_.

Referenced by uiLayout::prop(), and ui_item_menu().

◆ ui_layout_heading_label_add()

void ui_layout_heading_label_add ( uiLayout * layout,
uiLayout * heading_layout,
bool right_align,
bool respect_prop_split )
static

◆ ui_layout_heading_set()

void ui_layout_heading_set ( uiLayout * layout,
const StringRef heading )
static

◆ UI_layout_introspect()

const char * UI_layout_introspect ( uiLayout * layout)

Evaluate layout items as a Python dictionary.

Definition at line 6287 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().

◆ ui_layout_introspect_button()

◆ ui_layout_introspect_items()

void ui_layout_introspect_items ( DynStr * ds,
blender::Span< uiItem * > items )
static

◆ ui_layout_is_radial()

BLI_INLINE bool ui_layout_is_radial ( const uiLayout * layout)

◆ ui_layout_list_set_labels_active()

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 5025 of file interface_layout.cc.

References uiButtonItem::but, uiBut::flag, uiLayout::items_, uiItem::type_, 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().

◆ ui_layout_remove_but()

◆ ui_layout_replace_but_ptr()

bool ui_layout_replace_but_ptr ( uiLayout * layout,
const void * old_but_ptr,
uiBut * new_but )
Returns
true if the button was successfully replaced.

Definition at line 5858 of file interface_layout.cc.

References uiButtonItem::but, and ui_layout_find_button_item().

Referenced by ui_but_change_type().

◆ ui_layout_variable_size()

bool ui_layout_variable_size ( uiLayout * layout)
static

◆ ui_layout_vary_direction()

◆ ui_litem_estimate_absolute()

void ui_litem_estimate_absolute ( uiLayout * litem)
static

◆ ui_litem_estimate_box()

void ui_litem_estimate_box ( uiLayout * litem)
static

◆ ui_litem_estimate_column()

◆ ui_litem_estimate_column_flow()

◆ ui_litem_estimate_grid_flow()

◆ ui_litem_estimate_overlap()

void ui_litem_estimate_overlap ( uiLayout * litem)
static

Definition at line 4740 of file interface_layout.cc.

References uiLayout::h_, uiLayout::items_, ui_item_size(), and uiLayout::w_.

Referenced by ui_item_estimate().

◆ ui_litem_estimate_panel_body()

void ui_litem_estimate_panel_body ( uiLayout * litem)
static

Definition at line 4058 of file interface_layout.cc.

References ui_litem_estimate_column().

Referenced by ui_item_estimate().

◆ ui_litem_estimate_panel_header()

◆ ui_litem_estimate_root()

void ui_litem_estimate_root ( uiLayout * )
static

Definition at line 3988 of file interface_layout.cc.

Referenced by ui_item_estimate().

◆ ui_litem_estimate_row()

◆ ui_litem_estimate_split()

void ui_litem_estimate_split ( uiLayout * litem)
static

Definition at line 4689 of file interface_layout.cc.

References uiItem::flag_, and ui_litem_estimate_row().

Referenced by ui_item_estimate().

◆ ui_litem_grid_flow_compute()

◆ ui_litem_init_from_parent()

◆ ui_litem_layout_absolute()

void ui_litem_layout_absolute ( uiLayout * litem)
static

◆ ui_litem_layout_box()

◆ ui_litem_layout_column()

◆ ui_litem_layout_column_flow()

◆ ui_litem_layout_grid_flow()

◆ ui_litem_layout_overlap()

void ui_litem_layout_overlap ( uiLayout * litem)
static

◆ ui_litem_layout_panel_body()

◆ ui_litem_layout_panel_header()

◆ ui_litem_layout_radial()

◆ ui_litem_layout_root()

◆ ui_litem_layout_root_radial()

◆ ui_litem_layout_row()

◆ ui_litem_layout_split()

◆ ui_litem_min_width()

int ui_litem_min_width ( int itemw)
static

Definition at line 3616 of file interface_layout.cc.

References UI_UNIT_X.

Referenced by ui_litem_layout_row().

◆ ui_menu_enumpropname()

StringRef ui_menu_enumpropname ( uiLayout * layout,
PointerRNA * ptr,
PropertyRNA * prop,
int retval )
static

◆ UI_menutype_draw()

◆ UI_paneltype_draw()

void UI_paneltype_draw ( bContext * C,
PanelType * pt,
uiLayout * layout )

Used for popup panels only.

Definition at line 6166 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().

◆ ui_paneltype_draw_impl()

◆ ui_rna_collection_search_arg_free_fn()

void ui_rna_collection_search_arg_free_fn ( void * ptr)
static

◆ ui_text_icon_width()

int ui_text_icon_width ( uiLayout * layout,
const StringRef name,
const int icon,
const bool compact )
static

◆ ui_text_icon_width_ex()

◆ uiItemDecoratorR()

void uiItemDecoratorR ( uiLayout * layout,
PointerRNA * ptr,
std::optional< blender::StringRefNull > propname,
int index )

Insert a decorator item for a button with the same property as prop. To force inserting a blank dummy element, NULL can be passed for ptr and propname.

Definition at line 3009 of file interface_layout.cc.

References ptr, RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, ui_item_disabled(), and uiItemDecoratorR_prop().

Referenced by blender::nodes::add_attribute_search_or_value_buttons(), data_panel_draw(), panel_draw(), panel_draw(), template_search_buttons(), blender::ed::space_node::ui_node_draw_input(), and uiTemplateCacheFileTimeSettings().

◆ uiItemDecoratorR_prop()

◆ uiItemEnumO()

◆ uiItemEnumO_ptr()

◆ uiItemEnumO_string()

◆ uiItemEnumO_value()

◆ uiItemEnumR_prop()

void uiItemEnumR_prop ( uiLayout * layout,
const std::optional< StringRefNull > name,
int icon,
PointerRNA * ptr,
PropertyRNA * prop,
int value )

◆ uiItemEnumR_string()

void uiItemEnumR_string ( uiLayout * layout,
PointerRNA * ptr,
const StringRefNull propname,
const char * value,
const std::optional< StringRefNull > name,
int icon )

◆ uiItemEnumR_string_prop()

◆ uiItemFullO_ptr_ex()

◆ uiItemFullOMenuHold_ptr()

void uiItemFullOMenuHold_ptr ( uiLayout * layout,
wmOperatorType * ot,
std::optional< StringRef > name,
int icon,
const wmOperatorCallContext context,
const eUI_Item_Flag flag,
const char * menu_id,
PointerRNA * r_opptr )

◆ uiItemFullR_with_menu()

◆ uiItemFullR_with_popover()

void uiItemFullR_with_popover ( uiLayout * layout,
PointerRNA * ptr,
PropertyRNA * prop,
int index,
int value,
eUI_Item_Flag flag,
std::optional< blender::StringRefNull > name,
int icon,
const char * panel_type )

◆ uiItemL_()

◆ uiItemL_ex()

◆ uiItemL_respect_property_split()

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.

Returns
the layout to place decorators in, if #UI_ITEM_PROP_SEP is enabled. Otherwise null.

Definition at line 3201 of file interface_layout.cc.

References uiPropertySplitWrapper::decorate_column, uiItem::flag_, uiPropertySplitWrapper::label_column, uiPropertySplitWrapper::property_row, UI_block_layout_set_current(), ui_item_name_add_colon(), UI_MAX_NAME_STR, uiItemL_(), uiItemPropertySplitWrapperCreate(), and uiLayoutGetBlock().

Referenced by graph_panel_key_properties(), template_ID(), template_search_buttons(), ui_item_with_label(), and ui_layout_heading_label_add().

◆ uiItemLDrag()

void uiItemLDrag ( uiLayout * layout,
PointerRNA * ptr,
blender::StringRef name,
int icon )

Label icon for dragging.

Definition at line 3221 of file interface_layout.cc.

References ptr, RNA_struct_is_ID(), UI_but_drag_set_id(), and uiItemL_().

Referenced by buttons_panel_context_draw().

◆ uiItemMContents()

◆ uiItemMenuEnumFullO()

void uiItemMenuEnumFullO ( uiLayout * layout,
const bContext * C,
const StringRefNull opname,
const StringRefNull propname,
StringRefNull name,
int icon,
PointerRNA * r_opptr )

◆ uiItemMenuEnumFullO_ptr()

◆ uiItemMenuEnumO()

void uiItemMenuEnumO ( uiLayout * layout,
const bContext * C,
const StringRefNull opname,
const StringRefNull propname,
StringRefNull name,
int icon )

◆ uiItemMenuEnumR_prop()

◆ uiItemPointerR()

void uiItemPointerR ( uiLayout * layout,
PointerRNA * ptr,
const StringRefNull propname,
PointerRNA * searchptr,
const StringRefNull searchpropname,
const std::optional< StringRefNull > name,
int icon )

Definition at line 2790 of file interface_layout.cc.

References blender::StringRefNull::c_str(), ptr, RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, PointerRNA::type, and uiItemPointerR_prop().

Referenced by blender::nodes::node_composite_planetrackdeform_cc::cmp_node_planetrackdeform_declare(), blender::modifier::greasepencil::draw_layer_filter_settings(), blender::modifier::greasepencil::draw_material_filter_settings(), blender::nodes::draw_property_for_socket(), blender::modifier::greasepencil::draw_vertex_group_settings(), edbm_blend_from_shape_ui(), graph_panel_driverVar__locDiff(), graph_panel_driverVar__rotDiff(), graph_panel_driverVar__transChan(), layers_panel_draw(), modifier_vgroup_ui(), blender::nodes::node_composite_keyingscreen_cc::node_composit_buts_keyingscreen(), blender::nodes::node_composite_trackpos_cc::node_composit_buts_trackpos(), blender::nodes::node_shader_normal_map_cc::node_shader_buts_normal_map(), blender::nodes::node_shader_tangent_cc::node_shader_buts_tangent(), blender::nodes::node_shader_tex_pointdensity_cc::node_shader_buts_tex_pointdensity(), blender::nodes::node_shader_uvmap_cc::node_shader_buts_uvmap(), blender::nodes::node_shader_vertex_color_cc::node_shader_buts_vertex_color(), blender::panel_draw(), blender::panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), texture_panel_draw(), texture_panel_draw(), vertex_group_panel_draw(), blender::vgroup_panel_draw(), and weightvg_ui_common().

◆ uiItemPointerR_prop()

◆ uiItemPopoverPanel()

void uiItemPopoverPanel ( uiLayout * layout,
const bContext * C,
const StringRef panel_type,
std::optional< blender::StringRef > name_opt,
int icon )

Definition at line 3069 of file interface_layout.cc.

References C, RNA_warning, uiItemPopoverPanel_ptr(), and WM_paneltype_find().

◆ uiItemPopoverPanel_ptr()

◆ uiItemPopoverPanelFromGroup()

void uiItemPopoverPanelFromGroup ( uiLayout * layout,
bContext * C,
int space_id,
int region_id,
const char * context,
const char * category )

◆ uiItemProgressIndicator()

void uiItemProgressIndicator ( uiLayout * layout,
const char * text,
const float factor,
const eButProgressType progress_type )

◆ uiItemPropertySplitWrapperCreate()

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 3184 of file interface_layout.cc.

References uiLayout::alignment_, uiLayout::column(), uiPropertySplitWrapper::decorate_column, uiPropertySplitWrapper::label_column, uiPropertySplitWrapper::property_row, uiLayout::row(), uiLayout::split(), UI_ITEM_PROP_SEP_DIVIDE, ui_item_prop_split_layout_hack(), UI_LAYOUT_ALIGN_RIGHT, and uiLayoutGetPropDecorate().

Referenced by blender::ed::space_node::ui_node_draw_input(), and uiItemL_respect_property_split().

◆ uiItemsAlertBox() [1/2]

uiLayout * uiItemsAlertBox ( uiBlock * block,
const int size,
const eAlertIcon icon )

◆ uiItemsAlertBox() [2/2]

uiLayout * uiItemsAlertBox ( uiBlock * block,
const uiStyle * style,
const int dialog_width,
const eAlertIcon icon,
const int icon_size )

◆ uiItemsEnumO()

◆ uiItemsEnumR()

◆ uiItemsFullEnumO()

◆ uiItemsFullEnumO_items()

◆ uiItemSpacer()

◆ uiItemTabsEnumR_prop()

void uiItemTabsEnumR_prop ( uiLayout * layout,
bContext * C,
PointerRNA * ptr,
PropertyRNA * prop,
PointerRNA * ptr_highlight,
PropertyRNA * prop_highlight,
bool icon_only )

◆ uiLayoutContextCopy()

◆ uiLayoutEndsWithPanelHeader()

bool uiLayoutEndsWithPanelHeader ( const uiLayout & layout)

◆ uiLayoutGetActivateInit()

bool uiLayoutGetActivateInit ( uiLayout * layout)

Definition at line 5209 of file interface_layout.cc.

References uiLayout::activate_init_.

◆ uiLayoutGetActive()

bool uiLayoutGetActive ( uiLayout * layout)

Definition at line 5199 of file interface_layout.cc.

References uiLayout::active_.

◆ uiLayoutGetActiveDefault()

bool uiLayoutGetActiveDefault ( uiLayout * layout)

Definition at line 5204 of file interface_layout.cc.

References uiLayout::active_default_.

◆ uiLayoutGetAlignment()

int uiLayoutGetAlignment ( uiLayout * layout)

Definition at line 5229 of file interface_layout.cc.

References uiLayout::alignment_.

Referenced by uiItemL_().

◆ uiLayoutGetBlock()

uiBlock * uiLayoutGetBlock ( uiLayout * layout)

Definition at line 5766 of file interface_layout.cc.

References uiLayoutRoot::block, and uiLayout::root_.

Referenced by uiLayout::absolute_block(), blender::nodes::add_attribute_search_button(), blender::ed::asset::shelf::add_catalog_tabs(), blender::nodes::add_layer_name_search_button(), blender::ed::asset::shelf::asset_shelf_header_draw(), asset_view_draw_item(), blender::ed::asset::shelf::build_asset_view(), blender::ui::TreeViewLayoutBuilder::build_from_tree(), blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), blender::ui::PreviewGridItem::build_grid_tile_button(), blender::ui::GridViewBuilder::build_grid_view(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), blender::ui::TreeViewBuilder::build_tree_view(), blender::ed::asset::shelf::catalog_selector_panel_draw(), blender::ed::asset::shelf::catalog_tree_draw(), create_title_button(), curvemap_buttons_layout(), CurveProfile_buttons_layout(), draw_constraint_header(), blender::ed::spreadsheet::draw_viewer_path_panel(), envelope_panel_draw(), blender::ed::asset_browser::file_create_asset_catalog_tree_view_in_layout(), file_panel_execution_buttons_draw(), file_panel_operator(), fmodifier_panel_header(), graph_draw_driven_property_enabled_btn(), graph_draw_driver_settings_panel(), graph_panel_key_properties(), graph_panel_modifiers(), blender::ui::GridViewLayoutBuilder::GridViewLayoutBuilder(), modifier_panel_get_property_pointers(), modifier_panel_header(), nla_panel_actclip(), nla_panel_animated_influence_header(), nla_panel_animated_strip_time(), nla_panel_animated_strip_time_header(), nla_panel_animdata(), nla_panel_evaluation(), nla_panel_modifiers(), nla_panel_properties(), nla_panel_stripname(), blender::ed::space_node::node_file_output_socket_draw(), blender::ed::space_node::node_geometry_add_attribute_search_button(), blender::ed::space_node::node_geometry_add_layer_search_button(), panel_draw(), uiLayout::panel_prop(), shaderfx_panel_header(), blender::ed::spreadsheet::spreadsheet_data_set_panel_draw(), blender::ui::template_asset_shelf_popover(), template_ID(), template_ID_tabs(), template_keymap_item_properties(), template_operator_property_buts_draw_single(), template_search_buttons(), template_texture_user_menu(), ui_but_change_type(), ui_def_but_rna__menu(), ui_imageuser_layer_menu(), ui_imageuser_pass_menu(), ui_imageuser_slot_menu(), ui_imageuser_view_menu_multiview(), ui_imageuser_view_menu_rr(), ui_layout_add_but(), UI_menutype_draw(), blender::ed::space_node::ui_node_draw_input(), blender::ed::space_node::ui_node_menu_column(), ui_paneltype_draw_impl(), UI_popup_block_template_confirm_op(), ui_popup_context_menu_for_button(), ui_popup_context_menu_for_panel(), ui_template_list_layout_draw(), blender::ed::space_node::ui_template_node_link_menu(), uiblock_layer_pass_buttons(), uiItemL_respect_property_split(), uiItemPointerR_prop(), uiLayoutListItemAddPadding(), uiTemplateBoneCollectionTree(), uiTemplateCollectionExporters(), uiTemplateColorPicker(), uiTemplateComponentMenu(), uiTemplateConstraintHeader(), uiTemplateCryptoPicker(), uiTemplateCurveMapping(), uiTemplateCurveProfile(), uiTemplateFileSelectPath(), uiTemplateGreasePencilLayerTree(), uiTemplateHistogram(), uiTemplateImage(), uiTemplateKeymapItemProperties(), uiTemplateLayers(), uiTemplateLightLinkingCollection(), uiTemplateMarker(), uiTemplateMenuSearch(), uiTemplateMovieClip(), uiTemplateNodeLink(), uiTemplateNodeSocket(), uiTemplateNodeTreeInterface(), uiTemplateOperatorRedoProperties(), uiTemplateOperatorSearch(), uiTemplatePalette(), uiTemplatePreview(), uiTemplateRecentFiles(), uiTemplateReportsBanner(), uiTemplateRunningJobs(), uiTemplateStatusInfo(), uiTemplateTextureShow(), uiTemplateTextureUser(), uiTemplateTrack(), uiTemplateVectorscope(), uiTemplateWaveform(), view3d_panel_transform(), and wm_block_dialog_create().

◆ uiLayoutGetContextStore()

bContextStore * uiLayoutGetContextStore ( uiLayout * layout)

◆ uiLayoutGetEmboss()

◆ uiLayoutGetEnabled()

bool uiLayoutGetEnabled ( uiLayout * layout)

Definition at line 5214 of file interface_layout.cc.

References uiLayout::enabled_.

◆ uiLayoutGetFixedSize()

bool uiLayoutGetFixedSize ( uiLayout * layout)

Definition at line 5880 of file interface_layout.cc.

References uiItem::flag_.

◆ uiLayoutGetKeepAspect()

bool uiLayoutGetKeepAspect ( uiLayout * layout)

Definition at line 5224 of file interface_layout.cc.

References uiLayout::keepaspect_.

◆ uiLayoutGetLocalDir()

int uiLayoutGetLocalDir ( const uiLayout * layout)

◆ uiLayoutGetOperatorContext()

wmOperatorCallContext uiLayoutGetOperatorContext ( uiLayout * layout)

Definition at line 5771 of file interface_layout.cc.

References uiLayoutRoot::opcontext, and uiLayout::root_.

Referenced by UI_popup_block_template_confirm_op().

◆ uiLayoutGetPropDecorate()

bool uiLayoutGetPropDecorate ( uiLayout * layout)

Definition at line 5174 of file interface_layout.cc.

References uiItem::flag_.

Referenced by uiItemPropertySplitWrapperCreate().

◆ uiLayoutGetPropSep()

bool uiLayoutGetPropSep ( uiLayout * layout)

Definition at line 5164 of file interface_layout.cc.

References uiItem::flag_.

◆ uiLayoutGetRedAlert()

bool uiLayoutGetRedAlert ( uiLayout * layout)

Definition at line 5219 of file interface_layout.cc.

References uiLayout::redalert_.

◆ uiLayoutGetRootPanel()

Panel * uiLayoutGetRootPanel ( uiLayout * layout)

◆ uiLayoutGetScaleX()

float uiLayoutGetScaleX ( uiLayout * layout)

Definition at line 5239 of file interface_layout.cc.

References uiLayout::scale_.

◆ uiLayoutGetScaleY()

float uiLayoutGetScaleY ( uiLayout * layout)

Definition at line 5244 of file interface_layout.cc.

References uiLayout::scale_.

◆ uiLayoutGetSearchWeight()

float uiLayoutGetSearchWeight ( uiLayout * layout)

Definition at line 5189 of file interface_layout.cc.

References uiLayout::search_weight_.

◆ uiLayoutGetUnitsX()

float uiLayoutGetUnitsX ( uiLayout * layout)

◆ uiLayoutGetUnitsY()

float uiLayoutGetUnitsY ( uiLayout * layout)

Definition at line 5254 of file interface_layout.cc.

References uiLayout::units_.

◆ uiLayoutGetWidth()

◆ uiLayoutListItemAddPadding()

◆ uiLayoutListItemPaddingWidth()

int uiLayoutListItemPaddingWidth ( )

Definition at line 5267 of file interface_layout.cc.

References UI_SCALE_FAC.

Referenced by uiLayoutListItemAddPadding().

◆ uiLayoutSetActivateInit()

void uiLayoutSetActivateInit ( uiLayout * layout,
bool activate_init )

Definition at line 5114 of file interface_layout.cc.

References uiLayout::activate_init_.

Referenced by uiDefAutoButsRNA().

◆ uiLayoutSetActive()

void uiLayoutSetActive ( uiLayout * layout,
bool active )

Definition at line 5104 of file interface_layout.cc.

References active, and uiLayout::active_.

Referenced by advanced_panel_draw(), advanced_panel_draw(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), blender::ed::spreadsheet::CurvesViewItem::build_row(), blender::ed::spreadsheet::GreasePencilViewItem::build_row(), blender::ed::spreadsheet::InstancesViewItem::build_row(), blender::ed::spreadsheet::MeshViewItem::build_row(), blender::ed::spreadsheet::PointCloudViewItem::build_row(), blender::ed::spreadsheet::VolumeGridsViewItem::build_row(), blender::ui::bonecollections::BoneCollectionItem::build_row(), blender::ui::TreeViewLayoutBuilder::build_row(), clamp_panel_draw(), blender::composition_panel_draw(), constant_offset_draw(), data_panel_draw(), blender::nodes::draw_bake_button_row(), blender::nodes::draw_common_bake_settings(), blender::nodes::draw_interface_panel_content(), blender::modifier::greasepencil::draw_layer_filter_settings(), blender::modifier::greasepencil::draw_material_filter_settings(), blender::nodes::draw_named_attributes_panel(), blender::ui::nodes::draw_node_inputs_recursive(), blender::nodes::draw_property_for_socket(), blender::modifier::greasepencil::draw_vertex_group_settings(), ED_screens_header_tools_menu_create(), edbm_bevel_ui(), edbm_decimate_ui(), edge_panel_draw(), blender::edge_types_panel_draw(), face_corner_panel_draw(), face_corner_uv_panel_draw(), face_corner_vcol_panel_draw(), blender::face_mark_panel_draw(), face_panel_draw(), falloff_panel_draw(), fmodifier_frame_range_draw(), fmodifier_get_pointers(), fmodifier_influence_draw(), geometry_panel_draw(), graph_panel_cursor(), blender::intersection_panel_draw(), limits_panel_draw(), blender::material_mask_panel_draw(), blender::material_mask_panel_draw_header(), materials_panel_draw(), modifier_panel_header(), modifier_vgroup_ui(), nla_panel_actclip(), nla_panel_properties(), blender::ed::space_node::node_buts_image_user(), blender::nodes::node_composite_defocus_cc::node_composit_buts_defocus(), blender::nodes::node_composite_map_value_cc::node_composit_buts_map_value(), blender::nodes::node_geo_bake_cc::node_layout(), blender::nodes::node_geo_bake_cc::node_layout_ex(), blender::nodes::node_geo_simulation_cc::node_layout_ex(), blender::ed::space_node::node_texture_buts_proc(), blender::ed::space_node::node_update_basis_buttons(), blender::ed::space_node::node_update_basis_from_declaration(), blender::ed::space_node::node_update_basis_socket(), object_offset_draw(), blender::occlusion_panel_draw(), offset_panel_draw(), blender::options_light_reference_draw(), blender::options_panel_draw(), blender::panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), path_panel_draw(), preferences_extension_repo_add_ui(), profile_panel_draw(), random_panel_draw(), relative_offset_draw(), blender::ed::object::shade_auto_smooth_ui(), shaderfx_panel_header(), shading_panel_draw(), blender::ed::spreadsheet::spreadsheet_filter_panel_draw(), blender::ed::spreadsheet::spreadsheet_filter_panel_draw_header(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), blender::ed::space_node::std_node_socket_draw(), blender::ed::space_node::std_node_socket_interface_draw(), stepped_panel_draw(), symmetry_panel_draw(), template_keymap_item_properties(), uiTemplateCacheFileProcedural(), uiTemplateCacheFileTimeSettings(), uiTemplateImage(), uiTemplateMarker(), uiTemplateRunningJobs(), uv_pack_islands_ui(), v3d_transform_butsR(), vert_vcol_panel_draw(), vertex_group_panel_draw(), vertex_panel_draw(), vertex_vgroup_panel_draw(), wave_panel_draw(), and wm_open_mainfile_ui().

◆ uiLayoutSetActiveDefault()

void uiLayoutSetActiveDefault ( uiLayout * layout,
bool active_default )

Definition at line 5109 of file interface_layout.cc.

References uiLayout::active_default_.

Referenced by file_panel_execution_execute_button().

◆ uiLayoutSetAlignment()

◆ uiLayoutSetContextFromBut()

◆ uiLayoutSetContextInt()

void uiLayoutSetContextInt ( uiLayout * layout,
StringRef name,
int64_t value )

◆ uiLayoutSetContextPointer()

◆ uiLayoutSetContextString()

◆ uiLayoutSetEmboss()

◆ uiLayoutSetEnabled()

◆ uiLayoutSetFixedSize()

void uiLayoutSetFixedSize ( uiLayout * layout,
bool fixed_size )

◆ uiLayoutSetFunc()

void uiLayoutSetFunc ( uiLayout * layout,
uiMenuHandleFunc handlefunc,
void * argv )

◆ uiLayoutSetKeepAspect()

void uiLayoutSetKeepAspect ( uiLayout * layout,
bool keepaspect )

Definition at line 5129 of file interface_layout.cc.

References uiLayout::keepaspect_.

Referenced by uiTemplatePreview().

◆ uiLayoutSetOperatorContext()

◆ uiLayoutSetPropDecorate()

void uiLayoutSetPropDecorate ( uiLayout * layout,
bool is_sep )

Definition at line 5179 of file interface_layout.cc.

References uiItem::flag_, and SET_FLAG_FROM_TEST.

Referenced by blender::nodes::add_attribute_search_or_value_buttons(), blender::nodes::add_layer_name_search_button(), blender::ui::greasepencil::LayerGroupViewItem::build_row(), blender::ui::greasepencil::LayerViewItem::build_row(), cycles_panel_draw(), data_panel_draw(), blender::nodes::node_geo_bake_cc::draw_bake_items(), blender::nodes::draw_bake_panel(), blender::nodes::draw_common_bake_settings(), blender::modifier::greasepencil::draw_custom_curve_settings(), draw_export_properties(), draw_fill_tile(), blender::nodes::draw_geometry_nodes_modifier_ui(), blender::nodes::draw_geometry_nodes_operator_redo_ui(), blender::modifier::greasepencil::draw_layer_filter_settings(), blender::modifier::greasepencil::draw_material_filter_settings(), blender::nodes::draw_property_for_socket(), blender::nodes::node_geo_simulation_cc::draw_simulation_state(), blender::modifier::greasepencil::draw_vertex_group_settings(), edbm_bevel_ui(), edbm_blend_from_shape_ui(), edbm_intersect_boolean_ui(), edbm_intersect_ui(), envelope_panel_draw(), fmodifier_frame_range_draw(), fn_generator_panel_draw(), generator_panel_draw(), blender::ed::geometry::geometry_attribute_convert_ui(), blender::ed::geometry::geometry_color_attribute_add_ui(), blender::ed::geometry::geometry_color_attribute_convert_ui(), graph_panel_cursor(), graph_panel_key_properties(), graph_panel_properties(), blender::ed::greasepencil::grease_pencil_convert_curve_type_ui(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_ui(), blender::ed::greasepencil::grease_pencil_reproject_ui(), blender::ed::greasepencil::grease_pencil_simplify_ui(), image_new_draw(), image_save_as_draw(), limits_panel_draw(), blender::ed::sculpt_paint::mask::mask_from_boundary_ui(), blender::ed::sculpt_paint::mask::mask_from_cavity_ui(), blender::ed::mesh::set_attribute::mesh_set_attribute_ui(), modifier_vgroup_ui(), nla_panel_actclip(), nla_panel_animdata(), nla_panel_properties(), blender::nodes::node_composite_file_output_cc::node_composit_buts_file_output_ex(), blender::nodes::node_fn_align_euler_to_vector_cc::node_layout(), blender::nodes::node_fn_align_rotation_to_vector_cc::node_layout(), blender::nodes::node_geo_attribute_capture_cc::node_layout(), blender::nodes::node_geo_extrude_mesh_cc::node_layout(), blender::nodes::node_geo_get_named_grid_cc::node_layout(), blender::nodes::node_geo_grid_info_cc::node_layout(), blender::nodes::node_geo_merge_by_distance_cc::node_layout(), blender::nodes::node_geo_mesh_primitive_circle_cc::node_layout(), blender::nodes::node_geo_mesh_primitive_cone_cc::node_layout(), blender::nodes::node_geo_mesh_primitive_cylinder_cc::node_layout(), blender::nodes::node_geo_mesh_primitive_line_cc::node_layout(), blender::nodes::node_geo_mesh_to_volume_cc::node_layout(), blender::nodes::node_geo_points_to_volume_cc::node_layout(), blender::nodes::node_geo_split_to_instances_cc::node_layout(), blender::nodes::node_geo_store_named_attribute_cc::node_layout(), blender::nodes::node_geo_store_named_grid_cc::node_layout(), blender::nodes::node_geo_string_to_curves_cc::node_layout(), blender::nodes::node_geo_tool_active_element_cc::node_layout(), blender::nodes::node_geo_transform_geometry_cc::node_layout(), blender::nodes::node_geo_uv_unwrap_cc::node_layout(), blender::nodes::node_geo_volume_to_mesh_cc::node_layout(), blender::nodes::node_geo_warning_cc::node_layout(), blender::nodes::node_fn_format_string_cc::node_layout_ex(), blender::nodes::node_geo_attribute_capture_cc::node_layout_ex(), blender::nodes::node_geo_foreach_geometry_element_cc::node_layout_ex(), blender::nodes::node_geo_gizmo_transform_cc::node_layout_ex(), blender::nodes::node_geo_menu_switch_cc::node_layout_ex(), blender::nodes::node_geo_repeat_cc::node_layout_ex(), blender::nodes::node_geo_simulation_cc::node_layout_ex(), noise_panel_draw(), blender::panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), preferences_extension_repo_add_ui(), profile_panel_draw(), blender::ed::geometry::run_node_group_ui(), screenshot_draw(), blender::ed::curves::select_ends_ui(), blender::ed::vse::sequencer_split_ui(), blender::ed::curves::set_attribute_ui(), blender::ed::pointcloud::set_attribute_ui(), blender::ed::object::shade_auto_smooth_ui(), blender::ed::spreadsheet::spreadsheet_filter_panel_draw(), stepped_panel_draw(), template_operator_property_buts_draw_single(), texture_paint_add_texture_paint_slot_ui(), tile_add_draw(), blender::ed::space_node::ui_node_draw_input(), blender::ed::space_node::ui_node_draw_recursive(), uiTemplateCacheFileTimeSettings(), uiTemplateImage(), uiTemplateImageSettings(), uiTemplateViewsFormat(), unwrap_draw(), uv_pack_islands_ui(), wm_clear_recent_files_ui(), and wm_stereo3d_set_draw().

◆ uiLayoutSetPropSep()

void uiLayoutSetPropSep ( uiLayout * layout,
bool is_sep )

Definition at line 5169 of file interface_layout.cc.

References uiItem::flag_, and SET_FLAG_FROM_TEST.

Referenced by blender::nodes::add_attribute_search_or_value_buttons(), advanced_panel_draw(), advanced_panel_draw(), axis_mapping_panel_draw(), blender::bake_panel_draw(), blur_panel_draw(), blur_panel_draw(), caps_panel_draw(), blender::chaining_panel_draw(), clamp_panel_draw(), blender::composition_panel_draw(), constant_offset_draw(), CurveProfile_buttons_layout(), cycles_panel_draw(), data_panel_draw(), blender::nodes::node_geo_bake_cc::draw_bake_items(), blender::nodes::draw_bake_panel(), blender::nodes::draw_common_bake_settings(), blender::modifier::greasepencil::draw_custom_curve_settings(), draw_export_properties(), draw_fill_tile(), blender::nodes::draw_geometry_nodes_modifier_ui(), blender::nodes::draw_geometry_nodes_operator_redo_ui(), blender::modifier::greasepencil::draw_layer_filter_settings(), blender::modifier::greasepencil::draw_material_filter_settings(), blender::nodes::node_geo_simulation_cc::draw_simulation_state(), blender::modifier::greasepencil::draw_vertex_group_settings(), edbm_average_normals_ui(), edbm_bevel_ui(), edbm_blend_from_shape_ui(), edbm_decimate_ui(), edbm_intersect_boolean_ui(), edbm_intersect_ui(), edbm_point_normals_ui(), edge_data_panel_draw(), edge_panel_draw(), blender::edge_types_panel_draw(), envelope_panel_draw(), face_corner_panel_draw(), face_corner_uv_panel_draw(), face_corner_vcol_panel_draw(), blender::face_mark_panel_draw(), face_panel_draw(), falloff_panel_draw(), falloff_panel_draw(), falloff_panel_draw(), falloff_panel_draw(), fmodifier_frame_range_draw(), fn_generator_panel_draw(), generate_panel_draw(), generator_panel_draw(), blender::ed::geometry::geometry_attribute_convert_ui(), blender::ed::geometry::geometry_color_attribute_add_ui(), blender::ed::geometry::geometry_color_attribute_convert_ui(), geometry_panel_draw(), graph_panel_cursor(), graph_panel_key_properties(), graph_panel_properties(), blender::ed::greasepencil::grease_pencil_convert_curve_type_ui(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_ui(), blender::ed::greasepencil::grease_pencil_reproject_ui(), blender::ed::greasepencil::grease_pencil_simplify_ui(), image_new_draw(), image_save_as_draw(), blender::intersection_panel_draw(), layers_panel_draw(), limits_panel_draw(), blender::ed::sculpt_paint::mask::mask_from_boundary_ui(), blender::ed::sculpt_paint::mask::mask_from_cavity_ui(), blender::material_mask_panel_draw(), materials_panel_draw(), blender::ed::mesh::set_attribute::mesh_set_attribute_ui(), mix_mode_panel_draw(), nla_panel_actclip(), nla_panel_animated_strip_time(), nla_panel_animdata(), nla_panel_evaluation(), nla_panel_properties(), blender::nodes::node_composite_file_output_cc::node_composit_buts_file_output_ex(), blender::nodes::node_fn_align_euler_to_vector_cc::node_layout(), blender::nodes::node_fn_align_rotation_to_vector_cc::node_layout(), blender::nodes::node_geo_attribute_capture_cc::node_layout(), blender::nodes::node_geo_extrude_mesh_cc::node_layout(), blender::nodes::node_geo_get_named_grid_cc::node_layout(), blender::nodes::node_geo_grid_info_cc::node_layout(), blender::nodes::node_geo_merge_by_distance_cc::node_layout(), blender::nodes::node_geo_mesh_primitive_circle_cc::node_layout(), blender::nodes::node_geo_mesh_primitive_cone_cc::node_layout(), blender::nodes::node_geo_mesh_primitive_cylinder_cc::node_layout(), blender::nodes::node_geo_mesh_primitive_line_cc::node_layout(), blender::nodes::node_geo_mesh_to_volume_cc::node_layout(), blender::nodes::node_geo_points_to_volume_cc::node_layout(), blender::nodes::node_geo_split_to_instances_cc::node_layout(), blender::nodes::node_geo_store_named_attribute_cc::node_layout(), blender::nodes::node_geo_store_named_grid_cc::node_layout(), blender::nodes::node_geo_string_to_curves_cc::node_layout(), blender::nodes::node_geo_tool_active_element_cc::node_layout(), blender::nodes::node_geo_transform_geometry_cc::node_layout(), blender::nodes::node_geo_uv_unwrap_cc::node_layout(), blender::nodes::node_geo_volume_to_mesh_cc::node_layout(), blender::nodes::node_geo_warning_cc::node_layout(), blender::nodes::node_fn_format_string_cc::node_layout_ex(), blender::nodes::node_geo_attribute_capture_cc::node_layout_ex(), blender::nodes::node_geo_foreach_geometry_element_cc::node_layout_ex(), blender::nodes::node_geo_gizmo_transform_cc::node_layout_ex(), blender::nodes::node_geo_menu_switch_cc::node_layout_ex(), blender::nodes::node_geo_repeat_cc::node_layout_ex(), blender::nodes::node_geo_simulation_cc::node_layout_ex(), noise_panel_draw(), normals_panel_draw(), normals_panel_draw(), blender::ed::object::object_convert_ui(), object_offset_draw(), blender::occlusion_panel_draw(), offset_panel_draw(), blender::options_light_reference_draw(), blender::options_panel_draw(), override_layers_panel_draw(), blender::panel_draw(), blender::panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), path_panel_draw(), position_panel_draw(), preferences_extension_repo_add_ui(), profile_panel_draw(), random_panel_draw(), relative_offset_draw(), render_procedural_panel_draw(), restrictions_panel_draw(), blender::ed::geometry::run_node_group_ui(), screenshot_draw(), blender::ed::curves::select_ends_ui(), blender::ed::vse::sequencer_split_ui(), blender::ed::curves::set_attribute_ui(), blender::ed::pointcloud::set_attribute_ui(), blender::ed::object::shade_auto_smooth_ui(), shading_panel_draw(), solver_options_panel_draw(), blender::ed::spreadsheet::spreadsheet_filter_panel_draw(), stepped_panel_draw(), symmetry_panel_draw(), template_operator_property_buts_draw_single(), texture_paint_add_texture_paint_slot_ui(), texture_panel_draw(), texture_panel_draw(), tile_add_draw(), time_panel_draw(), time_panel_draw(), time_remapping_panel_draw(), transform_panel_draw(), ui_item_prop_split_layout_hack(), blender::ed::space_node::ui_node_draw_node(), blender::ed::space_node::ui_node_draw_recursive(), uiDefAutoButsRNA(), uiTemplateCacheFile(), uiTemplateImage(), uiTemplateImageSettings(), uiTemplateViewsFormat(), unwrap_draw(), uv_pack_islands_ui(), uv_panel_draw(), velocity_panel_draw(), vert_vcol_panel_draw(), vertex_group_panel_draw(), vertex_group_panel_draw(), vertex_panel_draw(), vertex_vgroup_panel_draw(), blender::vgroup_panel_draw(), wave_panel_draw(), weightvg_ui_common(), wm_clear_recent_files_ui(), and wm_stereo3d_set_draw().

◆ uiLayoutSetRedAlert()

◆ uiLayoutSetScaleX()

◆ uiLayoutSetScaleY()

◆ uiLayoutSetSearchWeight()

void uiLayoutSetSearchWeight ( uiLayout * layout,
const float weight )

Definition at line 5184 of file interface_layout.cc.

References uiLayout::search_weight_.

◆ uiLayoutSetTooltipFunc()

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.

Parameters
funcThe callback function that gets called to get tooltip content
argAn optional opaque pointer that gets passed to func
free_argAn optional callback for freeing arg (can be set to e.g. MEM_freeN)
copy_argAn 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 5963 of file interface_layout.cc.

References uiButtonItem::but, uiLayout::items_, uiBut::type, uiItem::type_, UI_BTYPE_DECORATOR, UI_but_func_tooltip_set(), and uiLayoutSetTooltipFunc().

Referenced by blender::nodes::draw_interface_panel_content(), blender::ed::space_node::node_socket_add_tooltip(), blender::ed::space_node::node_socket_add_tooltip_in_node_editor(), and uiLayoutSetTooltipFunc().

◆ uiLayoutSetUnitsX()

◆ uiLayoutSetUnitsY()

void uiLayoutSetUnitsY ( uiLayout * layout,
float unit )

Definition at line 5154 of file interface_layout.cc.

References uiLayout::units_.

Referenced by uiLayout::panel_prop().

Variable Documentation

◆ ui_text_pad_compact

uiTextIconPadFactor ui_text_pad_compact = {1.25f, 0.35f, 0.0f}
constexpr

ui_text_pad_default scaled down.

Definition at line 298 of file interface_layout.cc.

Referenced by ui_item_menu(), and ui_text_icon_width().

◆ ui_text_pad_default

uiTextIconPadFactor ui_text_pad_default = {1.50f, 0.25f, 0.0f}
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.

Note
It may seem odd that the icon only adds 0.25, but taking margins into account it's fine, except for ui_text_pad_compact where a bit more margin is required.

Definition at line 295 of file interface_layout.cc.

Referenced by ui_text_icon_width().

◆ ui_text_pad_none

uiTextIconPadFactor ui_text_pad_none = {0.25f, 1.50f, 0.0f}
constexpr

Least amount of padding not to clip the text or icon.

Definition at line 301 of file interface_layout.cc.

Referenced by ui_item_with_label(), and uiItemL_().