Blender V5.0
UI_interface_c.hh File Reference
#include <functional>
#include <optional>
#include <string>
#include "BLI_compiler_attrs.h"
#include "BLI_string_ref.hh"
#include "BLI_string_utf8_symbols.h"
#include "BLI_sys_types.h"
#include "BLI_utildefines.h"
#include "DNA_userdef_types.h"
#include "UI_interface_icons.hh"
#include "UI_interface_types.hh"
#include "WM_types.hh"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Classes

struct  uiButTypeWithPointerType
struct  uiBlockInteraction_Params
struct  uiBlockInteraction_CallbackData
struct  uiTooltipImage
struct  uiDragColorHandle
struct  uiFontStyleDraw_Params

Namespaces

namespace  blender
namespace  blender::ed
namespace  blender::ed::asset
namespace  blender::ui
namespace  blender::ed::object
namespace  blender::ed::object::shapekey

Macros

#define UI_SEP_CHAR   '|'
#define UI_SEP_CHAR_S   "|"
#define UI_VALUE_INDETERMINATE_CHAR   BLI_STR_UTF8_EM_DASH
#define UI_MENU_ARROW_SEP   BLI_STR_UTF8_BLACK_RIGHT_POINTING_SMALL_TRIANGLE
#define UI_REGION_OVERLAP_MARGIN   (U.widget_unit / 3)
#define UI_SCREEN_MARGIN   10
#define UI_DEFAULT_TEXT_POINTS   11.0f
#define UI_DEFAULT_TITLE_POINTS   11.0f
#define UI_DEFAULT_TOOLTIP_POINTS   11.0f
#define UI_PANEL_WIDTH   340
#define UI_COMPACT_PANEL_WIDTH   160
#define UI_SIDEBAR_PANEL_WIDTH   280
#define UI_NAVIGATION_REGION_WIDTH   UI_COMPACT_PANEL_WIDTH
#define UI_NARROW_NAVIGATION_REGION_WIDTH   100
#define UI_TOOLBAR_COLUMN   (1.25f * ICON_DEFAULT_HEIGHT_TOOLBAR)
#define UI_TOOLBAR_MARGIN   (0.5f * ICON_DEFAULT_HEIGHT_TOOLBAR)
#define UI_TOOLBAR_WIDTH   UI_TOOLBAR_MARGIN + UI_TOOLBAR_COLUMN
#define UI_PANEL_CATEGORY_MARGIN_WIDTH   (U.widget_unit * 1.0f)
#define UI_PANEL_CATEGORY_MIN_WIDTH   26.0f
#define UI_PANEL_MARGIN_X   (U.widget_unit * 0.4f)
#define UI_PANEL_MARGIN_Y   (U.widget_unit * 0.1f)
#define UI_BUT_POIN_TYPES   (ButPointerType::Float | ButPointerType::Short | ButPointerType::Char)
#define UI_but_is_decorator(but)
#define UI_BUTTON_SECTION_MERGE_DISTANCE   (UI_UNIT_X * 3)
#define UI_BUTTON_SECTION_SEPERATOR_LINE_WITH   (U.pixelsize * 2)
#define UI_SEARCHBOX_BOUNDS   (6.0f * UI_SCALE_FAC)
#define UI_SEARCHBOX_TRIA_H   (12.0f * UI_SCALE_FAC)
#define AUTOCOMPLETE_NO_MATCH   0
#define AUTOCOMPLETE_FULL_MATCH   1
#define AUTOCOMPLETE_PARTIAL_MATCH   2
#define INSTANCED_PANEL_UNIQUE_STR_SIZE   16
#define UI_UNIT_X   ((void)0, U.widget_unit)
#define UI_UNIT_Y   ((void)0, U.widget_unit)
#define UI_HEADER_OFFSET   ((void)0, ((U.uiflag & USER_AREA_CORNER_HANDLE) ? 16.0f : 8.0f) * UI_SCALE_FAC)
#define UI_AZONESPOTW_LEFT   UI_HEADER_OFFSET /* Width of left-side corner #AZone. */
#define UI_AZONESPOTW_RIGHT   (8.0f * UI_SCALE_FAC) /* Width of right-side corner #AZone. */
#define UI_AZONESPOTH   (0.6f * U.widget_unit) /* Height of corner action zone #AZone. */
#define UI_ALPHA_CHECKER_DARK   100
#define UI_ALPHA_CHECKER_LIGHT   160
#define UI_UL_DEFAULT_CLASS_NAME   "UI_UL_list"
#define UI_TOOLTIP_DELAY   0.5
#define UI_TOOLTIP_DELAY_QUICK   0.2
#define UI_PRECISION_FLOAT_MAX   6
#define UI_FLOAT_VALUE_DISPLAY_MAX   3.402820000e+38F
#define UI_FLOAT_VALUE_DISPLAY_MIN   -3.402820000e+38F
#define UI_PRECISION_FLOAT_SCALE   0.01f
#define UI_FSTYLE_WIDGET   (const uiFontStyle *)&(UI_style_get()->widget)
#define UI_FSTYLE_TOOLTIP   (const uiFontStyle *)&(UI_style_get()->tooltip)
#define USE_UI_TOOLBAR_HACK
#define USE_UI_POPOVER_ONCE

Typedefs

using uiButHandleFunc = void (*)(bContext *C, void *arg1, void *arg2)
using uiButHandleRenameFunc = void (*)(bContext *C, void *arg, char *origstr)
using uiButHandleNFunc = void (*)(bContext *C, void *argN, void *arg2)
using uiButHandleHoldFunc = void (*)(bContext *C, ARegion *butregion, uiBut *but)
using uiButCompleteFunc = int (*)(bContext *C, char *str, void *arg)
using uiButArgNFree = void (*)(void *argN)
using uiButArgNCopy = void *(*)(const void *argN)
using uiButIdentityCompareFunc = bool (*)(const uiBut *a, const uiBut *b)
using uiButSearchCreateFn
using uiButSearchUpdateFn
using uiButSearchContextMenuFn
using uiButSearchTooltipFn
using uiButSearchListenFn = void (*)(const wmRegionListenerParams *params, void *arg)
using uiBlockHandleFunc = void (*)(bContext *C, void *arg, int event)
using uiBlockCreateFunc = uiBlock *(*)(bContext * C, ARegion *region, void *arg1)
using uiBlockCancelFunc = void (*)(bContext *C, void *arg1)
using uiListPanelIDFromDataFunc = void (*)(void *data_link, char *r_idname)

Enumerations

enum class  blender::ui::EmbossType : uint8_t {
  blender::ui::Emboss = 0 , blender::ui::None = 1 , blender::ui::Pulldown = 2 , blender::ui::PieMenu = 3 ,
  blender::ui::NoneOrStatus = 4 , blender::ui::Undefined = 255
}
enum  {
  UI_DIR_UP = 1 << 0 , UI_DIR_DOWN = 1 << 1 , UI_DIR_LEFT = 1 << 2 , UI_DIR_RIGHT = 1 << 3 ,
  UI_DIR_CENTER_X = 1 << 4 , UI_DIR_CENTER_Y = 1 << 5 , UI_DIR_ALL = UI_DIR_UP | UI_DIR_DOWN | UI_DIR_LEFT | UI_DIR_RIGHT
}
enum  {
  UI_BLOCK_LOOP = 1 << 0 , UI_BLOCK_NUMSELECT = 1 << 1 , UI_BLOCK_NO_WIN_CLIP = 1 << 2 , UI_BLOCK_CLIPBOTTOM = 1 << 3 ,
  UI_BLOCK_CLIPTOP = 1 << 4 , UI_BLOCK_MOVEMOUSE_QUIT = 1 << 5 , UI_BLOCK_KEEP_OPEN = 1 << 6 , UI_BLOCK_POPUP = 1 << 7 ,
  UI_BLOCK_OUT_1 = 1 << 8 , UI_BLOCK_SEARCH_MENU = 1 << 9 , UI_BLOCK_POPUP_MEMORY = 1 << 10 , UI_BLOCK_CLIP_EVENTS = 1 << 11 ,
  UI_BLOCK_POPUP_HOLD = 1 << 18 , UI_BLOCK_LIST_ITEM = 1 << 19 , UI_BLOCK_PIE_MENU = 1 << 20 , UI_BLOCK_POPOVER = 1 << 21 ,
  UI_BLOCK_POPOVER_ONCE = 1 << 22 , UI_BLOCK_SHOW_SHORTCUT_ALWAYS = 1 << 23 , UI_BLOCK_NO_DRAW_OVERRIDDEN_STATE = 1 << 24 , UI_BLOCK_SEARCH_ONLY = 1 << 25 ,
  UI_BLOCK_QUICK_SETUP = 1 << 26 , UI_BLOCK_NO_ACCELERATOR_KEYS = 1 << 27
}
enum  {
  UI_RETURN_CANCEL = 1 << 0 , UI_RETURN_OK = 1 << 1 , UI_RETURN_OUT = 1 << 2 , UI_RETURN_OUT_PARENT = 1 << 3 ,
  UI_RETURN_UPDATE = 1 << 4 , UI_RETURN_POPUP_OK = 1 << 5
}
enum  {
  UI_BUT_ICON_SUBMENU = 1 << 8 , UI_BUT_ICON_PREVIEW = 1 << 9 , UI_BUT_NODE_LINK = 1 << 10 , UI_BUT_NODE_ACTIVE = 1 << 11 ,
  UI_BUT_DRAG_LOCK = 1 << 12 , UI_BUT_DISABLED = 1 << 13 , UI_BUT_ANIMATED = 1 << 14 , UI_BUT_ANIMATED_KEY = 1 << 15 ,
  UI_BUT_DRIVEN = 1 << 16 , UI_BUT_REDALERT = 1 << 17 , UI_BUT_INACTIVE = 1 << 18 , UI_BUT_LAST_ACTIVE = 1 << 19 ,
  UI_BUT_UNDO = 1 << 20 , UI_BUT_NO_UTF8 = 1 << 22 , UI_BUT_ACTIVE_DEFAULT = 1 << 23 , UI_BUT_LIST_ITEM = 1 << 24 ,
  UI_BUT_DRAG_MULTI = 1 << 25 , UI_BUT_ACTIVATE_ON_INIT = 1 << 26 , UI_BUT_HAS_SEP_CHAR = 1 << 27 , UI_BUT_UPDATE_DELAY = 1 << 28 ,
  UI_BUT_TEXTEDIT_UPDATE = 1 << 29 , UI_BUT_VALUE_CLEAR = 1 << 30 , UI_BUT_OVERRIDDEN = 1u << 31u
}
enum  { UI_BUT2_ACTIVATE_ON_INIT_NO_SELECT = 1 << 0 , UI_BUT2_FORCE_SEMI_MODAL_ACTIVE = 1 << 1 }
enum  { UI_BUT_DRAG_FULL_BUT = (1 << 0) , UI_BUT_DRAGPOIN_FREE = (1 << 1) }
enum  {
  UI_BUT_TEXT_LEFT = 1 << 1 , UI_BUT_ICON_LEFT = 1 << 2 , UI_BUT_TEXT_RIGHT = 1 << 3 , UI_BUT_NO_TOOLTIP = 1 << 4 ,
  UI_BUT_HAS_QUICK_TOOLTIP = 1 << 5 , UI_BUT_NO_TEXT_PADDING = 1 << 6 , UI_BUT_NO_PREVIEW_PADDING = 1 << 7 , UI_BUT_ALIGN_TOP = 1 << 14 ,
  UI_BUT_ALIGN_LEFT = 1 << 15 , UI_BUT_ALIGN_RIGHT = 1 << 16 , UI_BUT_ALIGN_DOWN = 1 << 17 , UI_BUT_ALIGN = UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_LEFT | UI_BUT_ALIGN_RIGHT | UI_BUT_ALIGN_DOWN ,
  UI_BUT_ALIGN_STITCH_TOP = 1 << 18 , UI_BUT_ALIGN_STITCH_LEFT = 1 << 19 , UI_BUT_ALIGN_ALL = UI_BUT_ALIGN | UI_BUT_ALIGN_STITCH_TOP | UI_BUT_ALIGN_STITCH_LEFT , UI_BUT_BOX_ITEM = 1 << 20 ,
  UI_BUT_HOVER_LEFT = 1 << 21 , UI_BUT_HOVER_RIGHT = 1 << 22 , UI_BUT_ICON_REVERSE = 1 << 23 , UI_BUT_ANIMATED_CHANGED = 1 << 24 ,
  UI_BUT_CHECKBOX_INVERT = 1 << 25 , UI_BUT_INDETERMINATE = 1 << 26 , UI_BUT_ICON_INVERT = 1 << 27
}
enum class  ButPointerType : uint8_t {
  None = 0 , Char , Short , Int ,
  Float , Bit = 1 << 7
}
enum class  ButType : int8_t {
  But = 1 , Row , Text , Menu ,
  ButMenu , Num , NumSlider , Toggle ,
  ToggleN , IconToggle , IconToggleN , ButToggle ,
  Checkbox , CheckboxN , Color , Tab ,
  Popover , Scroll , Block , Label ,
  KeyEvent , HsvCube , Pulldown , Roundbox ,
  ColorBand , Unitvec , Curve , CurveProfile ,
  ListBox , ListRow , HsvCircle , TrackPreview ,
  SearchMenu , Extra , PreviewTile , HotkeyEvent ,
  Image , Histogram , Waveform , Vectorscope ,
  Progress , NodeSocket , Sepr , SeprLine ,
  SeprSpacer , Grip , Decorator , ViewItem
}
enum  eButGradientType {
  UI_GRAD_NONE = -1 , UI_GRAD_SV = 0 , UI_GRAD_HV = 1 , UI_GRAD_HS = 2 ,
  UI_GRAD_H = 3 , UI_GRAD_S = 4 , UI_GRAD_V = 5 , UI_GRAD_V_ALT = 9 ,
  UI_GRAD_L_ALT = 10
}
enum  { UI_SCROLL_PRESSED = 1 << 0 , UI_SCROLL_ARROWS = 1 << 1 }
enum  { UI_BLOCK_THEME_STYLE_REGULAR = 0 , UI_BLOCK_THEME_STYLE_POPUP = 1 }
enum class  uiButtonSectionsAlign : int8_t { None = 1 , Top , Bottom }
enum  eBlockBoundsCalc {
  UI_BLOCK_BOUNDS_NONE = 0 , UI_BLOCK_BOUNDS = 1 , UI_BLOCK_BOUNDS_TEXT , UI_BLOCK_BOUNDS_POPUP_MOUSE ,
  UI_BLOCK_BOUNDS_POPUP_MENU , UI_BLOCK_BOUNDS_POPUP_CENTER , UI_BLOCK_BOUNDS_PIE_CENTER
}
enum  {
  UI_ID_NOP = 0 , UI_ID_RENAME = 1 << 0 , UI_ID_BROWSE = 1 << 1 , UI_ID_ADD_NEW = 1 << 2 ,
  UI_ID_ALONE = 1 << 4 , UI_ID_OPEN = 1 << 3 , UI_ID_DELETE = 1 << 5 , UI_ID_LOCAL = 1 << 6 ,
  UI_ID_AUTO_NAME = 1 << 7 , UI_ID_FAKE_USER = 1 << 8 , UI_ID_PIN = 1 << 9 , UI_ID_PREVIEWS = 1 << 10 ,
  UI_ID_OVERRIDE = 1 << 11 , UI_ID_FULL
}
enum  { UI_TEMPLATE_ID_FILTER_ALL = 0 , UI_TEMPLATE_ID_FILTER_AVAILABLE = 1 }
enum  eButLabelAlign { UI_BUT_LABEL_ALIGN_NONE , UI_BUT_LABEL_ALIGN_COLUMN , UI_BUT_LABEL_ALIGN_SPLIT_COLUMN }
enum  eAutoPropButsReturn { UI_PROP_BUTS_NONE_ADDED = 1 << 0 , UI_PROP_BUTS_ANY_FAILED_CHECK = 1 << 1 }
enum  uiTooltipStyle {
  UI_TIP_STYLE_NORMAL = 0 , UI_TIP_STYLE_HEADER , UI_TIP_STYLE_MONO , UI_TIP_STYLE_IMAGE ,
  UI_TIP_STYLE_SPACER
}
enum  uiTooltipColorID {
  UI_TIP_LC_MAIN = 0 , UI_TIP_LC_VALUE , UI_TIP_LC_ACTIVE , UI_TIP_LC_NORMAL ,
  UI_TIP_LC_PYTHON , UI_TIP_LC_ALERT , UI_TIP_LC_MAX
}
enum class  uiTooltipImageBackground { None = 0 , Checkerboard_Themed , Checkerboard_Fixed }
enum  {
  UI_TEMPLATE_OP_PROPS_SHOW_TITLE = 1 << 0 , UI_TEMPLATE_OP_PROPS_SHOW_EMPTY = 1 << 1 , UI_TEMPLATE_OP_PROPS_COMPACT = 1 << 2 , UI_TEMPLATE_OP_PROPS_HIDE_ADVANCED = 1 << 3 ,
  UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT = 1 << 4 , UI_TEMPLATE_OP_PROPS_HIDE_PRESETS = 1 << 5 , UI_TEMPLATE_OP_PROPS_ALLOW_UNDO_PUSH = 1 << 6
}
enum  {
  UI_CNR_TOP_LEFT = 1 << 0 , UI_CNR_TOP_RIGHT = 1 << 1 , UI_CNR_BOTTOM_RIGHT = 1 << 2 , UI_CNR_BOTTOM_LEFT = 1 << 3 ,
  UI_CNR_NONE = 0 , UI_CNR_ALL = (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT)
}
enum  uiTemplateListFlags {
  UI_TEMPLATE_LIST_FLAG_NONE = 0 , UI_TEMPLATE_LIST_SORT_REVERSE = (1 << 0) , UI_TEMPLATE_LIST_SORT_LOCK = (1 << 1) , UI_TEMPLATE_LIST_NO_GRIP = (1 << 2) ,
  UI_TEMPLATE_LIST_NO_FILTER_OPTIONS = (1 << 3) , UI_TEMPLATE_LIST_NO_NAMES = (1 << 4) , UI_TEMPLATE_LIST_FLAGS_LAST
}
enum  eFontStyle_Align { UI_STYLE_TEXT_LEFT = 0 , UI_STYLE_TEXT_CENTER = 1 , UI_STYLE_TEXT_RIGHT = 2 }

Functions

 ENUM_OPERATORS (ButPointerType, ButPointerType::Bit)
char blender::ui::but_pointer_bit_max_index (ButPointerType pointer_type)
void UI_draw_roundbox_corner_set (int type)
void UI_draw_roundbox_aa (const rctf *rect, bool filled, float rad, const float color[4])
void UI_draw_roundbox_4fv (const rctf *rect, bool filled, float rad, const float col[4])
void UI_draw_roundbox_3ub_alpha (const rctf *rect, bool filled, float rad, const unsigned char col[3], unsigned char alpha)
void UI_draw_roundbox_3fv_alpha (const rctf *rect, bool filled, float rad, const float col[3], float alpha)
void UI_draw_roundbox_4fv_ex (const rctf *rect, const float inner1[4], const float inner2[4], float shade_dir, const float outline[4], float outline_width, float rad)
void ui_draw_dropshadow (const rctf *rct, float radius, float width, float aspect, float alpha)
void UI_draw_text_underline (int pos_x, int pos_y, int len, int height, const float color[4])
void UI_draw_safe_areas (uint pos, const rctf *rect, const float title_aspect[2], const float action_aspect[2])
void UI_draw_widget_scroll (uiWidgetColors *wcol, const rcti *rect, const rcti *slider, int state)
float UI_text_clip_middle_ex (const uiFontStyle *fstyle, char *str, float okwidth, float minwidth, size_t max_len, char rpart_sep, bool clip_right_if_tight=true)
blender::Vector< blender::StringRefUI_text_clip_multiline_middle (const uiFontStyle *fstyle, const char *str, char *clipped_str_buf, const size_t max_len_clipped_str_buf, const float max_line_width, const int max_lines)
bool UI_but_has_quick_tooltip (const uiBut *but)
bool UI_but_is_tool (const uiBut *but)
bool UI_but_is_utf8 (const uiBut *but)
bool UI_block_is_empty_ex (const uiBlock *block, bool skip_title)
bool UI_block_is_empty (const uiBlock *block)
bool UI_block_can_add_separator (const uiBlock *block)
bool UI_block_has_active_default_button (const uiBlock *block)
uiButUI_but_find_mouse_over (const ARegion *region, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
uiListUI_list_find_mouse_over (const ARegion *region, const wmEvent *event)
uiPopupMenuUI_popup_menu_begin (bContext *C, const char *title, int icon) ATTR_NONNULL()
uiPopupMenuUI_popup_menu_begin_ex (bContext *C, const char *title, const char *block_name, int icon) ATTR_NONNULL()
void UI_popup_menu_end (bContext *C, uiPopupMenu *pup)
bool UI_popup_menu_end_or_cancel (bContext *C, uiPopupMenu *pup)
uiLayoutUI_popup_menu_layout (uiPopupMenu *pup)
void UI_popup_menu_reports (bContext *C, ReportList *reports) ATTR_NONNULL()
wmOperatorStatus UI_popup_menu_invoke (bContext *C, const char *idname, ReportList *reports) ATTR_NONNULL(1
wmOperatorStatus void UI_popup_menu_close (const uiBlock *block, bool is_cancel=false)
void UI_popup_menu_close_from_but (const uiBut *but, bool is_cancel=false)
void UI_popup_menu_retval_set (const uiBlock *block, int retval, bool enable)
void UI_popup_dummy_panel_set (ARegion *region, uiBlock *block)
void UI_popup_menu_but_set (uiPopupMenu *pup, ARegion *butregion, uiBut *but)
wmOperatorStatus UI_popover_panel_invoke (bContext *C, const char *idname, bool keep_open, ReportList *reports)
uiPopoverUI_popover_begin (bContext *C, int ui_menu_width, bool from_active_button) ATTR_NONNULL(1)
void UI_popover_end (bContext *C, uiPopover *pup, wmKeyMap *keymap)
uiLayoutUI_popover_layout (uiPopover *pup)
void UI_popover_once_clear (uiPopover *pup)
wmOperatorStatus UI_pie_menu_invoke (bContext *C, const char *idname, const wmEvent *event)
uiPieMenuUI_pie_menu_begin (bContext *C, const char *title, int icon, const wmEvent *event) ATTR_NONNULL()
void UI_pie_menu_end (bContext *C, uiPieMenu *pie)
uiLayoutUI_pie_menu_layout (uiPieMenu *pie)
void UI_popup_block_invoke (bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free)
void UI_popup_block_invoke_ex (bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free, bool can_refresh)
void UI_popup_block_ex (bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg, wmOperator *op)
bool UI_popup_block_template_confirm_is_supported (const uiBlock *block)
void UI_popup_block_template_confirm (uiBlock *block, bool cancel_default, blender::FunctionRef< uiBut *()> confirm_fn, blender::FunctionRef< uiBut *()> cancel_fn)
void UI_popup_block_template_confirm_op (uiLayout *layout, wmOperatorType *ot, std::optional< blender::StringRef > confirm_text, std::optional< blender::StringRef > cancel_text, const int icon, bool cancel_default, PointerRNA *r_ptr)
void UI_popup_block_close (bContext *C, wmWindow *win, uiBlock *block)
bool UI_popup_block_name_exists (const bScreen *screen, blender::StringRef name)
uiBlockUI_block_begin (const bContext *C, ARegion *region, std::string name, blender::ui::EmbossType emboss)
uiBlockUI_block_begin (const bContext *C, Scene *scene, wmWindow *window, ARegion *region, std::string name, blender::ui::EmbossType emboss)
void UI_block_end_ex (const bContext *C, Main *bmain, wmWindow *window, Scene *scene, ARegion *region, Depsgraph *depsgraph, uiBlock *block, const int xy[2]=nullptr, int r_xy[2]=nullptr)
void UI_block_end (const bContext *C, uiBlock *block)
void UI_block_draw (const bContext *C, uiBlock *block)
void UI_blocklist_update_window_matrix (const bContext *C, const ListBase *lb)
void UI_blocklist_update_view_for_buttons (const bContext *C, const ListBase *lb)
void UI_blocklist_draw (const bContext *C, const ListBase *lb)
void UI_block_update_from_old (const bContext *C, uiBlock *block)
void UI_block_theme_style_set (uiBlock *block, char theme_style)
blender::ui::EmbossType UI_block_emboss_get (uiBlock *block)
void UI_block_emboss_set (uiBlock *block, blender::ui::EmbossType emboss)
bool UI_block_is_search_only (const uiBlock *block)
void UI_block_set_search_only (uiBlock *block, bool search_only)
void UI_block_set_active_operator (uiBlock *block, wmOperator *op, const bool free)
void UI_block_free (const bContext *C, uiBlock *block)
void UI_block_listen (const uiBlock *block, const wmRegionListenerParams *listener_params)
void UI_blocklist_free (const bContext *C, ARegion *region)
void UI_blocklist_free_inactive (const bContext *C, ARegion *region)
void UI_screen_free_active_but_highlight (const bContext *C, bScreen *screen)
void UI_region_free_active_but_all (bContext *C, ARegion *region)
void UI_block_region_set (uiBlock *block, ARegion *region)
void UI_block_lock_set (uiBlock *block, bool val, const char *lockstr)
void UI_block_lock_clear (uiBlock *block)
void UI_region_button_sections_draw (const ARegion *region, int colorid, uiButtonSectionsAlign align)
bool UI_region_button_sections_is_inside_x (const ARegion *region, const int mval_x)
void UI_block_align_begin (uiBlock *block)
void UI_block_align_end (uiBlock *block)
void UI_block_bounds_set_normal (uiBlock *block, int addval)
void UI_block_bounds_set_text (uiBlock *block, int addval)
void UI_block_bounds_set_popup (uiBlock *block, int addval, const int bounds_offset[2])
void UI_block_bounds_set_menu (uiBlock *block, int addval, const int bounds_offset[2])
void UI_block_bounds_set_centered (uiBlock *block, int addval)
void UI_block_bounds_set_explicit (uiBlock *block, int minx, int miny, int maxx, int maxy)
int UI_blocklist_min_y_get (ListBase *lb)
void UI_block_direction_set (uiBlock *block, char direction)
void UI_block_flag_enable (uiBlock *block, int flag)
void UI_block_flag_disable (uiBlock *block, int flag)
void UI_block_translate (uiBlock *block, float x, float y)
int UI_but_return_value_get (uiBut *but)
uiButUI_but_active_drop_name_button (const bContext *C)
bool UI_but_active_drop_name (const bContext *C)
bool UI_but_active_drop_color (bContext *C)
void UI_but_flag_enable (uiBut *but, int flag)
void UI_but_flag_disable (uiBut *but, int flag)
bool UI_but_flag_is_set (uiBut *but, int flag)
void UI_but_flag2_enable (uiBut *but, int flag)
void UI_but_drawflag_enable (uiBut *but, int flag)
void UI_but_drawflag_disable (uiBut *but, int flag)
void UI_but_dragflag_enable (uiBut *but, int flag)
void UI_but_dragflag_disable (uiBut *but, int flag)
void UI_but_disable (uiBut *but, const char *disabled_hint)
void UI_but_type_set_menu_from_pulldown (uiBut *but)
void UI_but_color_set (uiBut *but, const uchar color[4])
bool UI_but_is_color_gamma (uiBut &but)
const ColorManagedDisplayUI_but_cm_display_get (uiBut &but)
void UI_but_placeholder_set (uiBut *but, blender::StringRef placeholder_text)
bool UI_but_active_only_ex (const bContext *C, ARegion *region, uiBlock *block, uiBut *but, bool remove_on_failure)
bool UI_but_active_only (const bContext *C, ARegion *region, uiBlock *block, uiBut *but)
bool UI_block_active_only_flagged_buttons (const bContext *C, ARegion *region, uiBlock *block)
void UI_but_execute (const bContext *C, ARegion *region, uiBut *but)
std::optional< std::string > UI_but_online_manual_id (const uiBut *but) ATTR_WARN_UNUSED_RESULT
std::optional< std::string > UI_but_online_manual_id_from_active (const bContext *C) ATTR_WARN_UNUSED_RESULT
bool UI_but_is_userdef (const uiBut *but)
uiButuiDefBut (uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButF (uiBlock *block, ButType type, int retval, blender::StringRef str, int x, int y, short width, short height, float *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButI (uiBlock *block, ButType type, int retval, blender::StringRef str, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButBitI (uiBlock *block, ButType type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButS (uiBlock *block, ButType type, int retval, blender::StringRef str, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButBitS (uiBlock *block, ButType type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButC (uiBlock *block, ButType type, int retval, blender::StringRef str, int x, int y, short width, short height, char *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButBitC (uiBlock *block, ButType type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, char *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButR (uiBlock *block, ButType type, int retval, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButR_prop (uiBlock *block, ButType type, int retval, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButO (uiBlock *block, ButType type, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, const std::optional< blender::StringRef > str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefButO_ptr (uiBlock *block, ButType type, wmOperatorType *ot, blender::wm::OpCallContext opcontext, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefIconBut (uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconButI (uiBlock *block, ButType type, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconButBitI (uiBlock *block, ButType type, int bit, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconButS (uiBlock *block, ButType type, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconButBitS (uiBlock *block, ButType type, int bit, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconButBitC (uiBlock *block, ButType type, int bit, int retval, int icon, int x, int y, short width, short height, char *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconButR (uiBlock *block, ButType type, int retval, int icon, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconButR_prop (uiBlock *block, ButType type, int retval, int icon, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconButO (uiBlock *block, ButType type, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefIconButO_ptr (uiBlock *block, ButType type, wmOperatorType *ot, blender::wm::OpCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefIconPreviewBut (uiBlock *block, ButType type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefButImage (uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4])
uiButuiDefButAlert (uiBlock *block, int icon, int x, int y, short width, short height)
uiButuiDefIconTextBut (uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, std::optional< blender::StringRef > tip)
uiButuiDefIconTextButI (uiBlock *block, ButType type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, int *poin, std::optional< blender::StringRef > tip)
uiButuiDefIconTextButS (uiBlock *block, ButType type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, short *poin, std::optional< blender::StringRef > tip)
uiButuiDefIconTextButR (uiBlock *block, ButType type, int retval, int icon, std::optional< blender::StringRefNull > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, std::optional< blender::StringRef > tip)
uiButuiDefIconTextButR_prop (uiBlock *block, ButType type, int retval, int icon, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< blender::StringRef > tip)
uiButuiDefIconTextButO (uiBlock *block, ButType type, blender::StringRefNull, blender::wm::OpCallContext opcontext, int icon, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefIconTextButO_ptr (uiBlock *block, ButType type, wmOperatorType *ot, blender::wm::OpCallContext opcontext, int icon, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_but_operator_set (uiBut *but, wmOperatorType *optype, blender::wm::OpCallContext opcontext, const PointerRNA *opptr=nullptr)
void UI_but_operator_set_never_call (uiBut *but)
PointerRNAUI_but_operator_ptr_ensure (uiBut *but)
void UI_but_context_ptr_set (uiBlock *block, uiBut *but, blender::StringRef name, const PointerRNA *ptr)
void UI_but_context_int_set (uiBlock *block, uiBut *but, blender::StringRef name, int64_t value)
const PointerRNAUI_but_context_ptr_get (const uiBut *but, blender::StringRef name, const StructRNA *type=nullptr)
std::optional< blender::StringRefNullUI_but_context_string_get (const uiBut *but, blender::StringRef name)
std::optional< int64_tUI_but_context_int_get (const uiBut *but, blender::StringRef name)
const bContextStoreUI_but_context_get (const uiBut *but)
void UI_but_unit_type_set (uiBut *but, int unit_type)
int UI_but_unit_type_get (const uiBut *but)
std::optional< EnumPropertyItemUI_but_rna_enum_item_get (bContext &C, uiBut &but)
std::string UI_but_string_get_rna_property_identifier (const uiBut &but)
std::string UI_but_string_get_rna_struct_identifier (const uiBut &but)
std::string UI_but_string_get_label (uiBut &but)
std::string UI_but_context_menu_title_from_button (uiBut &but)
std::string UI_but_string_get_tooltip_label (const uiBut &but)
std::string UI_but_string_get_rna_label (uiBut &but)
std::string UI_but_string_get_rna_label_context (const uiBut &but)
std::string UI_but_string_get_tooltip (bContext &C, uiBut &but)
std::string UI_but_string_get_rna_tooltip (bContext &C, uiBut &but)
std::string UI_but_string_get_operator_keymap (bContext &C, uiBut &but)
std::string UI_but_string_get_property_keymap (bContext &C, uiBut &but)
std::string UI_but_extra_icon_string_get_label (const uiButExtraOpIcon &extra_icon)
std::string UI_but_extra_icon_string_get_tooltip (bContext &C, const uiButExtraOpIcon &extra_icon)
std::string UI_but_extra_icon_string_get_operator_keymap (const bContext &C, const uiButExtraOpIcon &extra_icon)
int UI_icon_from_id (const ID *id)
int UI_icon_from_report_type (int type)
int UI_icon_colorid_from_report_type (int type)
int UI_text_colorid_from_report_type (int type)
int UI_icon_from_event_type (short event_type, short event_value)
int UI_icon_from_keymap_item (const wmKeyMapItem *kmi, int r_icon_mod[KM_MOD_NUM])
uiButuiDefMenuBut (uiBlock *block, uiMenuCreateFunc func, void *arg, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefIconTextMenuBut (uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefIconMenuBut (uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefBlockBut (uiBlock *block, uiBlockCreateFunc func, void *arg, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefBlockButN (uiBlock *block, uiBlockCreateFunc func, void *argN, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
uiButuiDefIconBlockBut (uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefSearchBut (uiBlock *block, void *arg, int retval, int icon, int maxncpy, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiButuiDefSearchButO_ptr (uiBlock *block, wmOperatorType *ot, IDProperty *properties, void *arg, int retval, int icon, int maxncpy, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
 ENUM_OPERATORS (eAutoPropButsReturn, UI_PROP_BUTS_ANY_FAILED_CHECK)
uiButuiDefAutoButR (uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int index, std::optional< blender::StringRef > name, int icon, int x, int y, int width, int height)
void uiDefAutoButsArrayR (uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const int icon, const int x, const int y, const int tot_width, const int height)
eAutoPropButsReturn uiDefAutoButsRNA (uiLayout *layout, PointerRNA *ptr, bool(*check_prop)(PointerRNA *ptr, PropertyRNA *prop, void *user_data), void *user_data, PropertyRNA *prop_activate_init, eButLabelAlign label_align, bool compact)
void UI_but_func_identity_compare_set (uiBut *but, uiButIdentityCompareFunc cmp_fn)
bool UI_search_item_add (uiSearchItems *items, blender::StringRef name, void *poin, int iconid, int but_flag, uint8_t name_prefix_offset)
void UI_but_func_search_set (uiBut *but, uiButSearchCreateFn search_create_fn, uiButSearchUpdateFn search_update_fn, void *arg, bool free_arg, uiFreeArgFunc search_arg_free_fn, uiButHandleFunc search_exec_fn, void *active)
void UI_but_func_search_set_context_menu (uiBut *but, uiButSearchContextMenuFn context_menu_fn)
void UI_but_func_search_set_tooltip (uiBut *but, uiButSearchTooltipFn tooltip_fn)
void UI_but_func_search_set_listen (uiBut *but, uiButSearchListenFn listen_fn)
void UI_but_func_search_set_sep_string (uiBut *but, const char *search_sep_string)
void UI_but_func_search_set_results_are_suggestions (uiBut *but, bool value)
int UI_searchbox_size_y ()
int UI_searchbox_size_x ()
int UI_searchbox_size_x_guess (const bContext *C, const uiButSearchUpdateFn update_fn, void *arg)
int UI_search_items_find_index (const uiSearchItems *items, const char *name)
void UI_but_hint_drawstr_set (uiBut *but, const char *string)
void UI_but_icon_indicator_number_set (uiBut *but, const int indicator_number)
void UI_but_icon_indicator_set (uiBut *but, const char *string)
void UI_but_icon_indicator_color_set (uiBut *but, const uchar color[4])
void UI_but_node_link_set (uiBut *but, bNodeSocket *socket, const float draw_color[4])
void UI_but_number_step_size_set (uiBut *but, float step_size)
void UI_but_number_precision_set (uiBut *but, float precision)
void UI_but_number_slider_step_size_set (uiBut *but, float step_size)
void UI_but_number_slider_precision_set (uiBut *but, float precision)
void UI_but_label_alpha_factor_set (uiBut *but, float alpha_factor)
void UI_but_search_preview_grid_size_set (uiBut *but, int rows, int cols)
void UI_but_view_item_draw_size_set (uiBut *but, const std::optional< int > draw_width=std::nullopt, const std::optional< int > draw_height=std::nullopt)
void UI_block_func_handle_set (uiBlock *block, uiBlockHandleFunc func, void *arg)
void UI_block_func_set (uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2)
void UI_block_funcN_set (uiBlock *block, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
void UI_but_func_rename_set (uiBut *but, uiButHandleRenameFunc func, void *arg1)
void UI_but_func_rename_full_set (uiBut *but, std::function< void(std::string &new_name)> rename_full_func)
void UI_but_func_set (uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
void UI_but_funcN_set (uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
void UI_but_func_complete_set (uiBut *but, uiButCompleteFunc func, void *arg)
void UI_but_func_drawextra_set (uiBlock *block, std::function< void(const bContext *C, rcti *rect)> func)
void UI_but_func_menu_step_set (uiBut *but, uiMenuStepFunc func)
void UI_but_menu_disable_hover_open (uiBut *but)
void UI_but_func_tooltip_set (uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg)
void UI_but_func_quick_tooltip_set (uiBut *but, std::function< std::string(const uiBut *but)> func)
void UI_but_func_tooltip_custom_set (uiBut *but, uiButToolTipCustomFunc func, void *arg, uiFreeArgFunc free_arg)
void UI_tooltip_text_field_add (uiTooltipData &data, std::string text, std::string suffix, const uiTooltipStyle style, const uiTooltipColorID color_id, const bool is_pad=false)
void UI_tooltip_image_field_add (uiTooltipData &data, const uiTooltipImage &image_data)
void UI_tooltip_color_field_add (uiTooltipData &data, const blender::float4 &color, bool has_alpha, bool is_gamma, const ColorManagedDisplay *display, uiTooltipColorID color_id)
void UI_tooltip_uibut_python_add (uiTooltipData &data, bContext &C, uiBut &but, uiButExtraOpIcon *extra_icon)
void UI_but_tooltip_refresh (bContext *C, uiBut *but)
void UI_but_tooltip_timer_remove (bContext *C, uiBut *but)
bool UI_textbutton_activate_rna (const bContext *C, ARegion *region, const void *rna_poin_data, const char *rna_prop_id)
bool UI_textbutton_activate_but (const bContext *C, uiBut *actbut)
void UI_but_focus_on_enter_event (wmWindow *win, uiBut *but)
void UI_but_func_hold_set (uiBut *but, uiButHandleHoldFunc func, void *argN)
PointerRNAUI_but_extra_operator_icon_add (uiBut *but, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, int icon)
wmOperatorTypeUI_but_extra_operator_icon_optype_get (const uiButExtraOpIcon *extra_icon)
PointerRNAUI_but_extra_operator_icon_opptr_get (const uiButExtraOpIcon *extra_icon)
int UI_preview_tile_size_x (const int size_px=96)
int UI_preview_tile_size_y (const int size_px=96)
int UI_preview_tile_size_y_no_label (const int size_px=96)
AutoCompleteUI_autocomplete_begin (const char *startname, size_t maxncpy)
void UI_autocomplete_update_name (AutoComplete *autocpl, blender::StringRef name)
int UI_autocomplete_end (AutoComplete *autocpl, char *autoname)
void UI_but_drag_set_id (uiBut *but, ID *id)
void UI_but_drag_attach_image (uiBut *but, const ImBuf *imb, float scale)
void UI_but_drag_set_asset (uiBut *but, const blender::asset_system::AssetRepresentation *asset, const AssetImportSettings &import_settings, int icon, int preview_icon)
void UI_but_drag_set_rna (uiBut *but, PointerRNA *ptr)
void UI_but_drag_set_path (uiBut *but, const char *path)
void UI_but_drag_set_name (uiBut *but, const char *name)
void UI_but_drag_set_image (uiBut *but, const char *path, int icon, const ImBuf *imb, float scale)
void UI_panels_begin (const bContext *C, ARegion *region)
void UI_panels_end (const bContext *C, ARegion *region, int *r_x, int *r_y)
void UI_panels_draw (const bContext *C, ARegion *region)
PanelUI_panel_find_by_type (ListBase *lb, const PanelType *pt)
PanelUI_panel_begin (ARegion *region, ListBase *lb, uiBlock *block, PanelType *pt, Panel *panel, bool *r_open)
void UI_panel_header_buttons_begin (Panel *panel)
void UI_panel_header_buttons_end (Panel *panel)
void UI_panel_end (Panel *panel, int width, int height)
void UI_panel_drawname_set (Panel *panel, blender::StringRef name)
void UI_panel_context_pointer_set (Panel *panel, const char *name, PointerRNA *ptr)
bool UI_panel_is_closed (const Panel *panel)
bool UI_panel_is_active (const Panel *panel)
void UI_panel_label_offset (const uiBlock *block, int *r_x, int *r_y)
bool UI_panel_should_show_background (const ARegion *region, const PanelType *panel_type)
int UI_panel_size_y (const Panel *panel)
bool UI_panel_is_dragging (const Panel *panel)
bool UI_panel_matches_search_filter (const Panel *panel)
bool UI_panel_can_be_pinned (const Panel *panel)
bool UI_panel_category_is_visible (const ARegion *region)
void UI_panel_category_add (ARegion *region, const char *name)
PanelCategoryDynUI_panel_category_find (const ARegion *region, const char *idname)
int UI_panel_category_index_find (ARegion *region, const char *idname)
PanelCategoryStackUI_panel_category_active_find (ARegion *region, const char *idname)
const char * UI_panel_category_active_get (ARegion *region, bool set_fallback)
void UI_panel_category_active_set (ARegion *region, const char *idname)
void UI_panel_category_index_active_set (ARegion *region, const int index)
void UI_panel_category_active_set_default (ARegion *region, const char *idname)
void UI_panel_category_clear_all (ARegion *region)
void UI_panel_category_draw_all (ARegion *region, const char *category_id_active)
void UI_panel_stop_animation (const bContext *C, Panel *panel)
PointerRNAUI_panel_custom_data_get (const Panel *panel)
PointerRNAUI_region_panel_custom_data_under_cursor (const bContext *C, const wmEvent *event)
void UI_panel_custom_data_set (Panel *panel, PointerRNA *custom_data)
PanelUI_panel_add_instanced (const bContext *C, ARegion *region, ListBase *panels, const char *panel_idname, PointerRNA *custom_data)
void UI_panels_free_instanced (const bContext *C, ARegion *region)
void UI_list_panel_unique_str (Panel *panel, char *r_name)
bool UI_panel_list_matches_data (ARegion *region, ListBase *data, uiListPanelIDFromDataFunc panel_idname_func)
void UI_region_handlers_add (ListBase *handlers)
void UI_popup_handlers_add (bContext *C, ListBase *handlers, uiPopupBlockHandle *popup, char flag)
void UI_popup_handlers_remove (ListBase *handlers, uiPopupBlockHandle *popup)
void UI_popup_handlers_remove_all (bContext *C, ListBase *handlers)
void UI_init ()
void UI_init_userdef ()
void UI_reinit_font ()
void UI_exit ()
void UI_update_text_styles ()
void UI_region_message_subscribe (ARegion *region, wmMsgBus *mbus)
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 uiTemplateHeader (uiLayout *layout, bContext *C)
void uiTemplateID (uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool live_icon=false, std::optional< blender::StringRef > text=std::nullopt)
void uiTemplateIDBrowse (uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, const char *text=nullptr)
void uiTemplateIDPreview (uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool hide_buttons=false)
void uiTemplateMatrix (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateIDTabs (uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *menu, int filter=UI_TEMPLATE_ID_FILTER_ALL)
void uiTemplateAnyID (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, blender::StringRefNull proptypename, std::optional< blender::StringRef > text)
void uiTemplateAction (uiLayout *layout, const bContext *C, ID *id, const char *newop, const char *unlinkop, std::optional< blender::StringRef > text)
void uiTemplateSearch (uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, std::optional< blender::StringRef > text=std::nullopt)
void uiTemplateSearchPreview (uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, int rows, int cols, std::optional< blender::StringRef > text=std::nullopt)
void uiTemplatePathBuilder (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *root_ptr, std::optional< blender::StringRefNull > text)
void uiTemplateModifiers (uiLayout *layout, bContext *C)
void uiTemplateStripModifiers (uiLayout *layout, bContext *C)
void uiTemplateShaderFx (uiLayout *layout, bContext *C)
void uiTemplateConstraints (uiLayout *layout, bContext *C, bool use_bone_constraints)
uiLayoutuiTemplateGpencilModifier (uiLayout *layout, bContext *C, PointerRNA *ptr)
void uiTemplateGpencilColorPreview (uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, int rows, int cols, float scale, int filter)
void uiTemplateOperatorRedoProperties (uiLayout *layout, const bContext *C)
void uiTemplateConstraintHeader (uiLayout *layout, PointerRNA *ptr)
void uiTemplatePreview (uiLayout *layout, bContext *C, ID *id, bool show_buttons, ID *parent, MTex *slot, const char *preview_id)
void uiTemplateColorRamp (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool expand)
void uiTemplateIcon (uiLayout *layout, int icon_value, float icon_scale)
void uiTemplateIconView (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool show_labels, float icon_scale, float icon_scale_popup)
void uiTemplateHistogram (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateWaveform (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateVectorscope (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateCurveMapping (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, int type, bool levels, bool brush, bool neg_slope, bool tone, bool presets)
void uiTemplateCurveProfile (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateColorPicker (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic)
void uiTemplatePalette (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool colors)
void uiTemplateCryptoPicker (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, int icon)
void uiTemplateLayers (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *used_ptr, const char *used_propname, int active_layer)
void uiTemplateImage (uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *userptr, bool compact, bool multiview)
void uiTemplateImageSettings (uiLayout *layout, bContext *C, PointerRNA *imfptr, bool color_management, const char *panel_idname=nullptr)
void uiTemplateImageStereo3d (uiLayout *layout, PointerRNA *stereo3d_format_ptr)
void uiTemplateImageViews (uiLayout *layout, PointerRNA *imaptr)
void uiTemplateImageFormatViews (uiLayout *layout, PointerRNA *imfptr, PointerRNA *ptr)
void uiTemplateImageLayers (uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser)
void uiTemplateImageInfo (uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser)
void uiTemplateRunningJobs (uiLayout *layout, bContext *C)
void UI_but_func_operator_search (uiBut *but)
void uiTemplateOperatorSearch (uiLayout *layout)
void UI_but_func_menu_search (uiBut *but, const char *single_menu_idname=nullptr)
void uiTemplateMenuSearch (uiLayout *layout)
void uiTemplateOperatorPropertyButs (const bContext *C, uiLayout *layout, wmOperator *op, eButLabelAlign label_align, short flag)
void uiTemplateHeader3D_mode (uiLayout *layout, bContext *C)
void uiTemplateEditModeSelection (uiLayout *layout, bContext *C)
void uiTemplateReportsBanner (uiLayout *layout, bContext *C)
void uiTemplateInputStatus (uiLayout *layout, bContext *C)
void uiTemplateStatusInfo (uiLayout *layout, bContext *C)
void uiTemplateKeymapItemProperties (uiLayout *layout, PointerRNA *ptr)
bool uiTemplateEventFromKeymapItem (uiLayout *layout, blender::StringRefNull text, const wmKeyMapItem *kmi, bool text_fallback)
int uiTemplateStatusBarModalItem (uiLayout *layout, const wmKeyMap *keymap, const EnumPropertyItem *item)
void uiTemplateComponentMenu (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, blender::StringRef name)
void uiTemplateNodeSocket (uiLayout *layout, bContext *C, const float color[4])
void uiTemplateCacheFile (uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname)
bool uiTemplateCacheFilePointer (PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *r_file_ptr)
void uiTemplateCacheFileVelocity (uiLayout *layout, PointerRNA *fileptr)
void uiTemplateCacheFileTimeSettings (uiLayout *layout, PointerRNA *fileptr)
void uiTemplateCacheFileLayers (uiLayout *layout, const bContext *C, PointerRNA *fileptr)
 ENUM_OPERATORS (uiTemplateListFlags, UI_TEMPLATE_LIST_FLAGS_LAST)
void uiTemplateList (uiLayout *layout, const bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, blender::StringRefNull propname, PointerRNA *active_dataptr, const char *active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, int columns, enum uiTemplateListFlags flags)
uiListuiTemplateList_ex (uiLayout *layout, const bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, blender::StringRefNull propname, PointerRNA *active_dataptr, blender::StringRefNull active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, int columns, enum uiTemplateListFlags flags, void *customdata)
void uiTemplateNodeLink (uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input)
void uiTemplateNodeView (uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input)
void uiTemplateTextureUser (uiLayout *layout, bContext *C)
void uiTemplateTextureShow (uiLayout *layout, const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void uiTemplateMovieClip (uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, bool compact)
void uiTemplateTrack (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateMarker (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *userptr, PointerRNA *trackptr, bool compact)
void uiTemplateMovieclipInformation (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *userptr)
void uiTemplateColorspaceSettings (uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateColormanagedViewSettings (uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname)
int uiTemplateRecentFiles (uiLayout *layout, int rows)
void uiTemplateFileSelectPath (uiLayout *layout, bContext *C, FileSelectParams *params)
void blender::ui::template_asset_shelf_popover (uiLayout &layout, const bContext &C, StringRefNull asset_shelf_id, StringRef name, int icon)
void uiTemplateLightLinkingCollection (uiLayout *layout, bContext *C, uiLayout *context_layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateBoneCollectionTree (uiLayout *layout, bContext *C)
void uiTemplateGreasePencilLayerTree (uiLayout *layout, bContext *C)
void uiTemplateNodeTreeInterface (uiLayout *layout, const bContext *C, PointerRNA *ptr)
void uiTemplateNodeInputs (uiLayout *layout, bContext *C, PointerRNA *ptr)
void uiTemplateCollectionExporters (uiLayout *layout, bContext *C)
void blender::ed::object::shapekey::template_tree (uiLayout *layout, bContext *C)
bool UI_list_item_index_is_filtered_visible (const struct uiList *ui_list, int item_idx)
void ED_operatortypes_ui ()
void ED_keymap_ui (wmKeyConfig *keyconf)
 User Interface Keymap.
void ED_dropboxes_ui ()
void ED_uilisttypes_ui ()
void UI_drop_color_copy (bContext *C, wmDrag *drag, wmDropBox *drop)
bool UI_drop_color_poll (bContext *C, wmDrag *drag, const wmEvent *event)
bool UI_context_copy_to_selected_list (bContext *C, PointerRNA *ptr, PropertyRNA *prop, blender::Vector< PointerRNA > *r_lb, bool *r_use_path_from_id, std::optional< std::string > *r_path)
bool UI_context_copy_to_selected_check (PointerRNA *ptr, PointerRNA *ptr_link, PropertyRNA *prop, const char *path, bool use_path_from_id, PointerRNA *r_ptr, PropertyRNA **r_prop)
uiButUI_context_active_but_get (const bContext *C)
uiButUI_context_active_but_get_respect_popup (const bContext *C)
uiButUI_context_active_but_prop_get (const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
uiButUI_region_active_but_prop_get (const ARegion *region, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
void UI_context_active_but_prop_handle (bContext *C, bool handle_undo)
void UI_context_active_but_clear (bContext *C, wmWindow *win, ARegion *region)
wmOperatorUI_context_active_operator_get (const bContext *C)
void UI_context_update_anim_flag (const bContext *C)
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)
void UI_context_active_but_prop_get_templateID (const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
IDUI_context_active_but_get_tab_ID (bContext *C)
uiButUI_region_active_but_get (const ARegion *region)
uiButUI_region_but_find_rect_over (const ARegion *region, const rcti *rect_px)
uiBlockUI_region_block_find_mouse_over (const ARegion *region, const int xy[2], bool only_clip)
ARegionUI_region_searchbox_region_get (const ARegion *button_region)
void UI_fontstyle_set (const uiFontStyle *fs)
void UI_fontstyle_draw_ex (const uiFontStyle *fs, const rcti *rect, const char *str, size_t str_len, const uchar col[4], const uiFontStyleDraw_Params *fs_params, int *r_xofs, int *r_yofs, ResultBLF *r_info)
void UI_fontstyle_draw (const uiFontStyle *fs, const rcti *rect, const char *str, size_t str_len, const uchar col[4], const uiFontStyleDraw_Params *fs_params)
void UI_fontstyle_draw_multiline_clipped_ex (const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4], eFontStyle_Align align, int *r_xofs, int *r_yofs, ResultBLF *r_info)
void UI_fontstyle_draw_multiline_clipped (const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4], eFontStyle_Align align)
void UI_fontstyle_draw_rotated (const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4])
void UI_fontstyle_draw_simple (const uiFontStyle *fs, float x, float y, const char *str, const uchar col[4])
void UI_fontstyle_draw_simple_backdrop (const uiFontStyle *fs, float x, float y, blender::StringRef str, const float col_fg[4], const float col_bg[4])
int UI_fontstyle_string_width (const uiFontStyle *fs, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
int int UI_fontstyle_string_width_with_block_aspect (const uiFontStyle *fs, blender::StringRef str, float aspect) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int UI_fontstyle_height_max (const uiFontStyle *fs)
void UI_draw_icon_tri (float x, float y, char dir, const float[4])
const uiStyleUI_style_get ()
const uiStyleUI_style_get_dpi ()
bool UI_editsource_enable_check ()
void UI_editsource_active_but_test (uiBut *but)
void UI_editsource_but_replace (const uiBut *old_but, uiBut *new_but)
void UI_but_ensure_in_view (const bContext *C, ARegion *region, const uiBut *but)
uiButStoreUI_butstore_create (uiBlock *block)
void UI_butstore_clear (uiBlock *block)
void UI_butstore_update (uiBlock *block)
void UI_butstore_free (uiBlock *block, uiButStore *bs_handle)
bool UI_butstore_is_valid (uiButStore *bs_handle)
bool UI_butstore_is_registered (uiBlock *block, uiBut *but)
void UI_butstore_register (uiButStore *bs_handle, uiBut **but_p)
bool UI_butstore_register_update (uiBlock *block, uiBut *but_dst, const uiBut *but_src)
void UI_butstore_unregister (uiButStore *bs_handle, uiBut **but_p)
ARegionUI_tooltip_create_from_button (bContext *C, ARegion *butregion, uiBut *but, bool is_quick_tip)
ARegionUI_tooltip_create_from_button_or_extra_icon (bContext *C, ARegion *butregion, uiBut *but, uiButExtraOpIcon *extra_icon, bool is_quick_tip)
ARegionUI_tooltip_create_from_gizmo (bContext *C, wmGizmo *gz)
void UI_tooltip_free (bContext *C, bScreen *screen, ARegion *region)
ARegionUI_tooltip_create_from_search_item_generic (bContext *C, const ARegion *searchbox_region, const rcti *item_rect, ID *id)
int UI_calc_float_precision (int prec, double value)
void UI_widgetbase_draw_cache_begin ()
void UI_widgetbase_draw_cache_flush ()
void UI_widgetbase_draw_cache_end ()
void UI_theme_init_default ()
void UI_style_init_default ()
void UI_interface_tag_script_reload ()
bool UI_view_item_matches (const blender::ui::AbstractViewItem &a, const blender::ui::AbstractViewItem &b)
bool UI_view_item_can_rename (const blender::ui::AbstractViewItem &item)
void UI_view_item_begin_rename (blender::ui::AbstractViewItem &item)
bool UI_view_item_supports_drag (const blender::ui::AbstractViewItem &item)
bool UI_view_item_popup_keep_open (const blender::ui::AbstractViewItem &item)
bool UI_view_item_drag_start (bContext &C, blender::ui::AbstractViewItem &item)
blender::ui::AbstractViewUI_region_view_find_at (const ARegion *region, const int xy[2], int pad)
blender::ui::AbstractViewItemUI_region_views_find_item_at (const ARegion &region, const int xy[2])
blender::ui::AbstractViewItemUI_region_views_find_active_item (const ARegion *region)
uiButUI_region_views_find_active_item_but (const ARegion *region)
void UI_region_views_clear_search_highlight (const ARegion *region)

Custom Interaction

Sometimes it's useful to create data that remains available while the user interacts with a button.

A common case is dragging a number button or slider however this could be used in other cases too.

using uiBlockInteractionBeginFn
using uiBlockInteractionEndFn
using uiBlockInteractionUpdateFn
void UI_block_interaction_set (uiBlock *block, uiBlockInteraction_CallbackData *callbacks)

Macro Definition Documentation

◆ AUTOCOMPLETE_FULL_MATCH

#define AUTOCOMPLETE_FULL_MATCH   1

◆ AUTOCOMPLETE_NO_MATCH

#define AUTOCOMPLETE_NO_MATCH   0

◆ AUTOCOMPLETE_PARTIAL_MATCH

#define AUTOCOMPLETE_PARTIAL_MATCH   2

Definition at line 2021 of file UI_interface_c.hh.

Referenced by UI_autocomplete_end().

◆ INSTANCED_PANEL_UNIQUE_STR_SIZE

#define INSTANCED_PANEL_UNIQUE_STR_SIZE   16

◆ UI_ALPHA_CHECKER_DARK

◆ UI_ALPHA_CHECKER_LIGHT

◆ UI_AZONESPOTH

#define UI_AZONESPOTH   (0.6f * U.widget_unit) /* Height of corner action zone #AZone. */

Definition at line 2225 of file UI_interface_c.hh.

Referenced by area_azone_init(), and view2d_masks().

◆ UI_AZONESPOTW_LEFT

#define UI_AZONESPOTW_LEFT   UI_HEADER_OFFSET /* Width of left-side corner #AZone. */

Definition at line 2223 of file UI_interface_c.hh.

Referenced by area_azone_init(), and view2d_masks().

◆ UI_AZONESPOTW_RIGHT

#define UI_AZONESPOTW_RIGHT   (8.0f * UI_SCALE_FAC) /* Width of right-side corner #AZone. */

Definition at line 2224 of file UI_interface_c.hh.

Referenced by area_actionzone_refresh_xy(), area_azone_init(), and view2d_masks().

◆ UI_but_is_decorator

#define UI_but_is_decorator ( but)

◆ UI_BUT_POIN_TYPES

Note
requires uiBut::poin != nullptr.

Definition at line 400 of file UI_interface_c.hh.

Referenced by ui_but_range_set_soft(), ui_but_update_ex(), and ui_def_but().

◆ UI_BUTTON_SECTION_MERGE_DISTANCE

#define UI_BUTTON_SECTION_MERGE_DISTANCE   (UI_UNIT_X * 3)

Definition at line 978 of file UI_interface_c.hh.

Referenced by button_section_bounds_calc().

◆ UI_BUTTON_SECTION_SEPERATOR_LINE_WITH

#define UI_BUTTON_SECTION_SEPERATOR_LINE_WITH   (U.pixelsize * 2)

◆ UI_COMPACT_PANEL_WIDTH

#define UI_COMPACT_PANEL_WIDTH   160

◆ UI_DEFAULT_TEXT_POINTS

◆ UI_DEFAULT_TITLE_POINTS

#define UI_DEFAULT_TITLE_POINTS   11.0f

Larger size used for title text.

Definition at line 296 of file UI_interface_c.hh.

Referenced by ui_style_new().

◆ UI_DEFAULT_TOOLTIP_POINTS

#define UI_DEFAULT_TOOLTIP_POINTS   11.0f

Size of tooltip text.

Definition at line 299 of file UI_interface_c.hh.

Referenced by screen_draw_area_drag_tip(), and ui_style_new().

◆ UI_FLOAT_VALUE_DISPLAY_MAX

#define UI_FLOAT_VALUE_DISPLAY_MAX   3.402820000e+38F

Definition at line 2979 of file UI_interface_c.hh.

Referenced by ui_but_build_drawstr_float().

◆ UI_FLOAT_VALUE_DISPLAY_MIN

#define UI_FLOAT_VALUE_DISPLAY_MIN   -3.402820000e+38F

Definition at line 2980 of file UI_interface_c.hh.

Referenced by ui_but_build_drawstr_float().

◆ UI_FSTYLE_TOOLTIP

#define UI_FSTYLE_TOOLTIP   (const uiFontStyle *)&(UI_style_get()->tooltip)

Definition at line 2987 of file UI_interface_c.hh.

Referenced by screen_draw_area_drag_tip().

◆ UI_FSTYLE_WIDGET

◆ UI_HEADER_OFFSET

#define UI_HEADER_OFFSET   ((void)0, ((U.uiflag & USER_AREA_CORNER_HANDLE) ? 16.0f : 8.0f) * UI_SCALE_FAC)

◆ UI_MENU_ARROW_SEP

#define UI_MENU_ARROW_SEP   BLI_STR_UTF8_BLACK_RIGHT_POINTING_SMALL_TRIANGLE

Separator for text in search menus (right pointing arrow). keep in sync with string_search.cc.

Definition at line 112 of file UI_interface_c.hh.

◆ UI_NARROW_NAVIGATION_REGION_WIDTH

#define UI_NARROW_NAVIGATION_REGION_WIDTH   100

Definition at line 305 of file UI_interface_c.hh.

Referenced by userpref_create().

◆ UI_NAVIGATION_REGION_WIDTH

#define UI_NAVIGATION_REGION_WIDTH   UI_COMPACT_PANEL_WIDTH

Definition at line 304 of file UI_interface_c.hh.

Referenced by ED_spacetype_userpref(), and userpref_create().

◆ UI_PANEL_CATEGORY_MARGIN_WIDTH

#define UI_PANEL_CATEGORY_MARGIN_WIDTH   (U.widget_unit * 1.0f)

◆ UI_PANEL_CATEGORY_MIN_WIDTH

#define UI_PANEL_CATEGORY_MIN_WIDTH   26.0f

◆ UI_PANEL_MARGIN_X

#define UI_PANEL_MARGIN_X   (U.widget_unit * 0.4f)

◆ UI_PANEL_MARGIN_Y

#define UI_PANEL_MARGIN_Y   (U.widget_unit * 0.1f)

Definition at line 322 of file UI_interface_c.hh.

Referenced by ui_panels_size(), and uiAlignPanelStep().

◆ UI_PANEL_WIDTH

#define UI_PANEL_WIDTH   340

Definition at line 301 of file UI_interface_c.hh.

Referenced by ui_panels_size().

◆ UI_PRECISION_FLOAT_MAX

◆ UI_PRECISION_FLOAT_SCALE

#define UI_PRECISION_FLOAT_SCALE   0.01f

◆ UI_REGION_OVERLAP_MARGIN

#define UI_REGION_OVERLAP_MARGIN   (U.widget_unit / 3)

For ARegion.overlap regions, pass events though if they don't overlap the regions contents (the usable part of the View2D and buttons).

The margin is needed so it's not possible to accidentally click in between buttons.

Definition at line 120 of file UI_interface_c.hh.

Referenced by azone_clipped_rect_calc(), and ED_region_contains_xy().

◆ UI_SCREEN_MARGIN

#define UI_SCREEN_MARGIN   10

Use for clamping popups within the screen.

Definition at line 123 of file UI_interface_c.hh.

Referenced by ui_block_bounds_calc_popup(), ui_popup_block_clip(), ui_popup_block_position(), and ui_popup_block_refresh().

◆ UI_SEARCHBOX_BOUNDS

◆ UI_SEARCHBOX_TRIA_H

◆ UI_SEP_CHAR

◆ UI_SEP_CHAR_S

◆ UI_SIDEBAR_PANEL_WIDTH

◆ UI_TOOLBAR_COLUMN

#define UI_TOOLBAR_COLUMN   (1.25f * ICON_DEFAULT_HEIGHT_TOOLBAR)

The width of one icon column of the Toolbar.

Definition at line 308 of file UI_interface_c.hh.

Referenced by ED_region_generic_tools_region_snap_size().

◆ UI_TOOLBAR_MARGIN

#define UI_TOOLBAR_MARGIN   (0.5f * ICON_DEFAULT_HEIGHT_TOOLBAR)

The space between the Toolbar and the area's edge.

Definition at line 310 of file UI_interface_c.hh.

Referenced by ED_region_generic_tools_region_snap_size().

◆ UI_TOOLBAR_WIDTH

#define UI_TOOLBAR_WIDTH   UI_TOOLBAR_MARGIN + UI_TOOLBAR_COLUMN

Total width of Toolbar showing one icon column.

Definition at line 312 of file UI_interface_c.hh.

Referenced by ED_spacetype_image(), ED_spacetype_node(), blender::ed::vse::ED_spacetype_sequencer(), and ED_spacetype_view3d().

◆ UI_TOOLTIP_DELAY

#define UI_TOOLTIP_DELAY   0.5

◆ UI_TOOLTIP_DELAY_QUICK

#define UI_TOOLTIP_DELAY_QUICK   0.2

Definition at line 2965 of file UI_interface_c.hh.

Referenced by button_tooltip_timer_reset(), and ui_but_tooltip_init().

◆ UI_UL_DEFAULT_CLASS_NAME

#define UI_UL_DEFAULT_CLASS_NAME   "UI_UL_list"

Default UIList class name, keep in sync with its declaration in bl_ui/__init__.py.

Definition at line 2577 of file UI_interface_c.hh.

Referenced by RNA_api_ui_layout(), and ui_template_list_data_retrieve().

◆ UI_UNIT_X

#define UI_UNIT_X   ((void)0, U.widget_unit)

Definition at line 2217 of file UI_interface_c.hh.

Referenced by blender::nodes::add_attribute_search_button(), blender::nodes::add_layer_name_search_button(), blender::ui::AbstractViewItem::add_rename_button(), blender::ed::asset::shelf::add_tab_button(), ANIM_channel_draw_widgets(), blender::ui::block_layout(), blender::ui::TreeViewLayoutBuilder::build_from_tree(), blender::ui::GridViewLayoutBuilder::build_from_view(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), blender::ui::TreeViewLayoutBuilder::build_row(), channel_ui_data_init(), clip_draw_dopesheet_channels(), colorband_buttons_layout(), colorband_tools_fn(), blender::ed::spreadsheet::SpreadsheetDrawer::column_width(), component_menu(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_buttons_layout(), curvemap_clipping_func(), curvemap_tools_func(), CurveProfile_buttons_layout(), uiLayout::decorator(), blender::ed::spreadsheet::draw_column_reorder_destination(), draw_keylist_block_gpencil(), blender::ed::space_node::draw_link_errors(), draw_matrix_template(), draw_view_axis(), ED_file_path_button(), ED_fileselect_init_layout(), ED_image_draw_info(), ed_panel_draw(), ED_region_panels_layout_ex(), ED_spacetype_statusbar(), ED_spacetype_topbar(), envelope_panel_draw(), uiLayout::estimate(), file_attribute_columns_widths(), file_draw_invalid_asset_library_hint(), file_draw_invalid_library_hint(), file_draw_list(), file_panel_execution_buttons_draw(), blender::ed::sculpt_paint::find_curves_brush_position(), blender::ed::space_node::find_visible_center_of_link(), blender::ed::spreadsheet::ColumnValues::fit_column_values_width_px(), fmodifier_panel_header(), blender::ed::spreadsheet::get_index_column_width(), graph_draw_driven_property_enabled_btn(), graph_draw_driver_settings_panel(), icon_draw_size(), info_textview_draw_rect_calc(), knot_modes_menu(), blender::ed::asset::shelf::layout_width_units_clamped(), blender::ed::outliner::merged_element_search_menu(), metadata_draw_imbuf(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), blender::seq::modifier_panel_header(), modifier_panel_header(), blender::ed::space_node::node_draw_panels(), blender::ed::space_node::node_geometry_add_attribute_search_button(), blender::ed::space_node::node_geometry_add_layer_search_button(), blender::ed::space_node::node_geometry_add_volume_grid_search_button(), uiLayout::op_enum_items(), blender::ed::outliner::outliner_buttons(), blender::ed::outliner::outliner_draw_active_indicator(), blender::ed::outliner::outliner_draw_hierarchy_lines_recursive(), blender::ed::outliner::outliner_draw_highlights(), blender::ed::outliner::outliner_draw_iconrow_doit(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_draw_overrides_restrictbuts(), blender::ed::outliner::outliner_draw_restrictbuts(), blender::ed::outliner::outliner_draw_tree(), blender::ed::outliner::outliner_draw_tree_element(), blender::ed::outliner::outliner_draw_userbuts(), blender::ed::outliner::outliner_draw_warning_tree_element(), blender::ed::outliner::outliner_dropzone_element(), blender::ed::outliner::outliner_is_co_within_mode_column(), blender::ed::outliner::outliner_item_is_co_over_icon(), blender::ed::outliner::outliner_item_is_co_over_name(), blender::ed::outliner::outliner_item_is_co_over_name_icons(), blender::ed::outliner::outliner_item_is_co_within_close_toggle(), blender::ed::outliner::outliner_right_columns_width(), panel_draw_aligned_widgets(), uiLayout::popover(), uiLayout::progress_indicator(), uiLayout::prop_search(), region_rect_recursive(), region_scale_modal(), LayoutRadial::resolve_impl(), rotation_mode_menu_callback(), uiLayout::separator_spacer(), shaderfx_panel_header(), blender::ed::spreadsheet::SpreadsheetDrawer::SpreadsheetDrawer(), template_add_button_search_menu(), template_ID(), template_id_def_new_but(), template_ID_tabs(), template_keymap_item_properties(), template_operator_property_buts_draw_single(), template_search_textbut_width(), template_texture_user_menu(), blender::ed::outliner::tselem_draw_icon(), ui_alert_create(), ui_block_bounds_calc_popup(), ui_block_colorpicker(), ui_block_func_COLOR(), ui_block_func_POPOVER(), ui_block_func_POPUP(), UI_but_ensure_in_view(), ui_but_update_ex(), ui_def_but_rna__menu(), ui_draw_menu_item(), ui_icon_view_menu_cb(), ui_imageuser_layer_menu(), ui_imageuser_pass_menu(), ui_imageuser_slot_menu(), ui_imageuser_view_menu_multiview(), ui_imageuser_view_menu_rr(), ui_item_array(), ui_item_rna_size(), ui_item_with_label(), ui_litem_min_width(), blender::ed::space_node::ui_node_menu_column(), UI_panel_label_offset(), ui_pie_menu_level_create(), ui_pie_menu_title_width(), ui_popup_block_position(), UI_popup_block_template_confirm_op(), UI_preview_tile_size_x(), ui_searchbox_region_draw_fn(), UI_searchbox_size_x(), ui_template_list_layout_draw(), blender::ed::space_node::ui_template_node_link_menu(), ui_text_icon_width_ex(), uiTemplateColorRamp(), uiTemplateComponentMenu(), uiTemplateCryptoPicker(), uiTemplateHistogram(), uiTemplateIcon(), uiTemplateIconView(), uiTemplateLayers(), uiTemplateMarker(), uiTemplateMenuSearch(), uiTemplateNodeLink(), uiTemplateNodeSocket(), uiTemplateOperatorSearch(), uiTemplatePalette(), uiTemplatePreview(), uiTemplateReportsBanner(), uiTemplateRunningJobs(), uiTemplateStatusInfo(), uiTemplateTextureShow(), uiTemplateTextureUser(), uiTemplateTrack(), uiTemplateVectorscope(), uiTemplateWaveform(), blender::ed::spreadsheet::update_view2d_tot_rect(), view3d_panel_curve_data(), view3d_panel_vgroup(), widget_progress_type_ring(), WIDGETGROUP_navigate_draw_prepare(), wm_block_create_redo(), and wm_block_dialog_create().

◆ UI_UNIT_Y

#define UI_UNIT_Y   ((void)0, U.widget_unit)

Definition at line 2218 of file UI_interface_c.hh.

Referenced by blender::nodes::add_attribute_search_button(), blender::ed::space_node::add_error_message_button(), blender::nodes::add_layer_name_search_button(), blender::ui::AbstractViewItem::add_rename_button(), blender::ed::asset::shelf::add_tab_button(), block_create__close_file_dialog(), block_create_autorun_warning(), blender::ui::block_layout(), blender::ui::TreeViewLayoutBuilder::build_from_tree(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), clip_draw_dopesheet_channels(), colorband_buttons_layout(), colorband_tools_fn(), component_menu(), blender::ed::space_node::create_search_popup_block(), create_title_button(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_buttons_layout(), curvemap_clipping_func(), curvemap_tools_func(), CurveProfile_buttons_layout(), uiLayout::decorator(), draw_matrix_template(), blender::ed::space_node::draw_tree_path(), draw_view_axis(), ED_file_path_button(), ED_fileselect_init_layout(), ED_image_draw_info(), ed_panel_draw(), ED_region_header_layout(), ED_region_info_draw_multiline(), ED_time_scrub_channel_search_draw(), envelope_panel_draw(), uiLayout::estimate(), file_draw_invalid_asset_library_hint(), file_draw_invalid_library_hint(), file_draw_list(), file_panel_execution_buttons_draw(), fmodifier_panel_header(), graph_draw_driven_property_enabled_btn(), graph_draw_driver_settings_panel(), graph_panel_key_properties(), blender::ed::asset::shelf::header_region_size(), knot_modes_menu(), blender::ed::outliner::merged_element_search_menu(), modifier_panel_header(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_extra_info_row(), blender::ed::space_node::node_find_menu(), blender::ed::space_node::node_geometry_add_attribute_search_button(), blender::ed::space_node::node_geometry_add_layer_search_button(), blender::ed::space_node::node_geometry_add_volume_grid_search_button(), uiLayout::op_enum_items(), blender::ed::outliner::outliner_back(), blender::ed::outliner::outliner_box_select(), blender::ed::outliner::outliner_buttons(), blender::ed::outliner::outliner_draw_active_indicator(), blender::ed::outliner::outliner_draw_hierarchy_line(), blender::ed::outliner::outliner_draw_hierarchy_lines_recursive(), blender::ed::outliner::outliner_draw_highlights(), blender::ed::outliner::outliner_draw_iconrow_doit(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_draw_overrides_restrictbuts(), blender::ed::outliner::outliner_draw_overrides_rna_buts(), blender::ed::outliner::outliner_draw_restrictbuts(), blender::ed::outliner::outliner_draw_rnabuts(), blender::ed::outliner::outliner_draw_struct_marks(), blender::ed::outliner::outliner_draw_tree(), blender::ed::outliner::outliner_draw_tree_element(), blender::ed::outliner::outliner_draw_userbuts(), blender::ed::outliner::outliner_draw_warning_tree_element(), blender::ed::outliner::outliner_drop_insert_find(), blender::ed::outliner::outliner_dropzone_element(), blender::ed::outliner::outliner_find_first_desired_element_at_y(), blender::ed::outliner::outliner_find_item_at_y(), blender::ed::outliner::outliner_id_delete_tag(), blender::ed::outliner::outliner_id_remap_find_tree_element(), blender::ed::outliner::outliner_is_element_in_view(), blender::ed::outliner::outliner_lib_relocate_invoke_do(), blender::ed::outliner::outliner_scroll_view(), blender::ed::outliner::outliner_set_coordinates(), blender::ed::outliner::outliner_tree_dimensions_impl(), blender::ed::outliner::outliner_walk_scroll(), uiLayout::panel_prop(), uiLayout::progress_indicator(), uiLayout::prop(), uiLayout::prop_tabs_enum(), region_draw_status_text(), region_rect_recursive(), region_scale_modal(), region_scale_validate_size(), rotation_mode_menu_callback(), save_file_overwrite_cancel_button(), save_file_overwrite_confirm_button(), save_file_overwrite_saveas_button(), uiLayout::separator(), uiLayout::separator_spacer(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), blender::ed::spreadsheet::SpreadsheetDrawer::SpreadsheetDrawer(), template_add_button_search_menu(), template_common_search_menu(), template_ID(), template_ID_tabs(), template_keymap_item_properties(), template_operator_property_buts_draw_single(), template_texture_user_menu(), blender::ed::outliner::tselem_draw_icon(), ui_alert_create(), ui_block_colorpicker(), ui_block_func_POPOVER(), ui_block_func_POPUP(), ui_but_drag_init(), ui_def_but_rna__menu(), ui_draw_preview_item_stateless(), ui_handle_menu_event(), ui_imageuser_layer_menu(), ui_imageuser_pass_menu(), ui_imageuser_slot_menu(), ui_imageuser_view_menu_multiview(), ui_imageuser_view_menu_rr(), ui_item_array(), ui_item_disabled(), ui_item_menu(), ui_item_rna_size(), ui_menu_scroll_apply_offset_y(), ui_menu_scroll_step(), ui_menu_scroll_to_y(), blender::ed::space_node::ui_node_menu_column(), ui_pan_to_scroll(), UI_panel_label_offset(), UI_pie_menu_begin(), ui_pie_menu_level_create(), ui_popup_block_position(), ui_popup_block_refresh(), UI_popup_block_template_confirm_op(), ui_popup_context_menu_for_button(), UI_preview_tile_size_y(), UI_preview_tile_size_y_no_label(), ui_search_menu_create_tooltip(), UI_searchbox_size_y(), ui_template_list_layout_draw(), blender::ed::space_node::ui_template_node_link_menu(), UI_tooltip_create_from_button_or_extra_icon(), uiblock_layer_pass_buttons(), uiItem_simple(), uiItemFullO_ptr_ex(), uilist_resize_update(), uiTemplateComponentMenu(), uiTemplateCryptoPicker(), uiTemplateHistogram(), uiTemplateIcon(), uiTemplateIconView(), uiTemplateImage(), uiTemplateLayers(), uiTemplateMarker(), uiTemplateMenuSearch(), uiTemplateNodeLink(), uiTemplateNodeSocket(), uiTemplateOperatorSearch(), uiTemplatePalette(), uiTemplatePreview(), uiTemplateReportsBanner(), uiTemplateRunningJobs(), uiTemplateStatusInfo(), uiTemplateTextureShow(), uiTemplateTextureUser(), uiTemplateTrack(), uiTemplateVectorscope(), uiTemplateWaveform(), blender::ui::unpadded_item_height(), uvedit_vertex_buttons(), view3d_panel_vgroup(), widget_draw_text_icon(), wm_block_create_redo(), wm_block_dialog_create(), wm_block_file_close_cancel_button(), wm_block_file_close_discard_button(), wm_block_file_close_save_button(), wm_block_insert_unicode_create(), wm_block_search_menu(), wm_block_splash_add_label(), and wm_enum_search_menu().

◆ UI_VALUE_INDETERMINATE_CHAR

#define UI_VALUE_INDETERMINATE_CHAR   BLI_STR_UTF8_EM_DASH

Character used when value is indeterminate (multiple, unknown, unset).

Definition at line 106 of file UI_interface_c.hh.

Referenced by widget_draw_text().

◆ USE_UI_POPOVER_ONCE

#define USE_UI_POPOVER_ONCE

Support click-drag motion which presses the button and closes a popover (like a menu).

Definition at line 3016 of file UI_interface_c.hh.

◆ USE_UI_TOOLBAR_HACK

#define USE_UI_TOOLBAR_HACK

Special drawing for toolbar, mainly workarounds for inflexible icon sizing.

Definition at line 3013 of file UI_interface_c.hh.

Typedef Documentation

◆ uiBlockCancelFunc

using uiBlockCancelFunc = void (*)(bContext *C, void *arg1)

Definition at line 842 of file UI_interface_c.hh.

◆ uiBlockCreateFunc

using uiBlockCreateFunc = uiBlock *(*)(bContext * C, ARegion *region, void *arg1)

Definition at line 841 of file UI_interface_c.hh.

◆ uiBlockHandleFunc

using uiBlockHandleFunc = void (*)(bContext *C, void *arg, int event)

Definition at line 662 of file UI_interface_c.hh.

◆ uiBlockInteractionBeginFn

Initial value:
void *(*)(bContext * C,
void *arg1)
#define C
Definition RandGen.cpp:29
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]

Returns 'user_data', freed by uiBlockInteractionEndFn.

Definition at line 689 of file UI_interface_c.hh.

◆ uiBlockInteractionEndFn

Initial value:
void (*)(bContext *C,
void *arg1,
void *user_data)

Definition at line 692 of file UI_interface_c.hh.

◆ uiBlockInteractionUpdateFn

Initial value:
void (*)(bContext *C,
void *arg1,
void *user_data)

Definition at line 696 of file UI_interface_c.hh.

◆ uiButArgNCopy

using uiButArgNCopy = void *(*)(const void *argN)

Definition at line 635 of file UI_interface_c.hh.

◆ uiButArgNFree

using uiButArgNFree = void (*)(void *argN)

Signatures of callbacks used to free or copy some 'owned' void pointer data (like e.g. #func_argN in uiBut or uiBlock).

Definition at line 634 of file UI_interface_c.hh.

◆ uiButCompleteFunc

using uiButCompleteFunc = int (*)(bContext *C, char *str, void *arg)

Definition at line 628 of file UI_interface_c.hh.

◆ uiButHandleFunc

using uiButHandleFunc = void (*)(bContext *C, void *arg1, void *arg2)

Definition at line 624 of file UI_interface_c.hh.

◆ uiButHandleHoldFunc

using uiButHandleHoldFunc = void (*)(bContext *C, ARegion *butregion, uiBut *but)

Definition at line 627 of file UI_interface_c.hh.

◆ uiButHandleNFunc

using uiButHandleNFunc = void (*)(bContext *C, void *argN, void *arg2)

Definition at line 626 of file UI_interface_c.hh.

◆ uiButHandleRenameFunc

using uiButHandleRenameFunc = void (*)(bContext *C, void *arg, char *origstr)

Definition at line 625 of file UI_interface_c.hh.

◆ uiButIdentityCompareFunc

using uiButIdentityCompareFunc = bool (*)(const uiBut *a, const uiBut *b)

Function to compare the identity of two buttons over redraws, to check if they represent the same data, and thus should be considered the same button over redraws.

Definition at line 641 of file UI_interface_c.hh.

◆ uiButSearchContextMenuFn

Initial value:
bool (*)(bContext *C,
void *arg,
void *active,
const wmEvent *event)
#define active

Definition at line 654 of file UI_interface_c.hh.

◆ uiButSearchCreateFn

Initial value:

Definition at line 644 of file UI_interface_c.hh.

◆ uiButSearchListenFn

using uiButSearchListenFn = void (*)(const wmRegionListenerParams *params, void *arg)

Definition at line 660 of file UI_interface_c.hh.

◆ uiButSearchTooltipFn

Initial value:
ARegion *(*)(bContext * C, ARegion *region, const rcti *item_rect, void *arg, void *active)

Definition at line 658 of file UI_interface_c.hh.

◆ uiButSearchUpdateFn

Initial value:
void (*)(const bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first)
#define str(s)

is_first is typically used to ignore search filtering when the menu is first opened in order to display the full list of options. The value will be false after the button's text is edited (for every call except the first).

Definition at line 652 of file UI_interface_c.hh.

◆ uiListPanelIDFromDataFunc

using uiListPanelIDFromDataFunc = void (*)(void *data_link, char *r_idname)

Definition at line 2177 of file UI_interface_c.hh.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

uiBut.flag general state flags.

Enumerator
UI_BUT_ICON_SUBMENU 
UI_BUT_ICON_PREVIEW 
UI_BUT_NODE_LINK 
UI_BUT_NODE_ACTIVE 
UI_BUT_DRAG_LOCK 
UI_BUT_DISABLED 

Grayed out and un-editable.

UI_BUT_ANIMATED 
UI_BUT_ANIMATED_KEY 
UI_BUT_DRIVEN 
UI_BUT_REDALERT 
UI_BUT_INACTIVE 

Grayed out but still editable.

UI_BUT_LAST_ACTIVE 
UI_BUT_UNDO 
UI_BUT_NO_UTF8 
UI_BUT_ACTIVE_DEFAULT 

For popups, pressing return activates this button, overriding the highlighted button. For non-popups this is just used as a display hint for the user to let them know the action which is activated when pressing return (file selector for eg).

UI_BUT_LIST_ITEM 

This but is "inside" a list item (currently used to change theme colors).

UI_BUT_DRAG_MULTI 

edit this button as well as the active button (not just dragging)

UI_BUT_ACTIVATE_ON_INIT 

Use for popups to start editing the button on initialization.

UI_BUT_HAS_SEP_CHAR 

uiBut.str contains UI_SEP_CHAR, used to show key-shortcuts right aligned.

Since a label may contain UI_SEP_CHAR, it's important to split on the last occurrence (meaning the right aligned text can't contain this character).

UI_BUT_UPDATE_DELAY 

Don't run updates while dragging (needed in rare cases).

UI_BUT_TEXTEDIT_UPDATE 

When widget is in text-edit mode, update value on each char stroke.

UI_BUT_VALUE_CLEAR 

Show 'x' icon to clear/unlink value of text or search button.

UI_BUT_OVERRIDDEN 

RNA property of the button is overridden from linked reference data.

Definition at line 213 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum

Ways to limit what is displayed in ID-search popup.

Note
We may want to add LOCAL, LIBRARY ... as needed.
Enumerator
UI_TEMPLATE_ID_FILTER_ALL 
UI_TEMPLATE_ID_FILTER_AVAILABLE 

Definition at line 1581 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum
Enumerator
UI_BLOCK_THEME_STYLE_REGULAR 
UI_BLOCK_THEME_STYLE_POPUP 

Definition at line 935 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum

State for scroll-drawing.

Enumerator
UI_SCROLL_PRESSED 
UI_SCROLL_ARROWS 

Definition at line 568 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum
Enumerator
UI_CNR_TOP_LEFT 
UI_CNR_TOP_RIGHT 
UI_CNR_BOTTOM_RIGHT 
UI_CNR_BOTTOM_LEFT 
UI_CNR_NONE 
UI_CNR_ALL 

Definition at line 2257 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum

Special Buttons

Buttons with a more specific purpose:

  • MenuBut: buttons that popup a menu (in headers usually).
  • PulldownBut: like MenuBut, but creating a uiBlock (for compatibility).
  • BlockBut: buttons that popup a block with more buttons.
  • KeyevtBut: buttons that can be used to turn key events into values.
  • PickerButtons: buttons like the color picker (for code sharing).
  • AutoButR: RNA property button with type automatically defined.
Enumerator
UI_ID_NOP 
UI_ID_RENAME 
UI_ID_BROWSE 
UI_ID_ADD_NEW 
UI_ID_ALONE 
UI_ID_OPEN 
UI_ID_DELETE 
UI_ID_LOCAL 
UI_ID_AUTO_NAME 
UI_ID_FAKE_USER 
UI_ID_PIN 
UI_ID_PREVIEWS 
UI_ID_OVERRIDE 
UI_ID_FULL 

Definition at line 1559 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum

uiPopupBlockHandle.menuretval

Enumerator
UI_RETURN_CANCEL 

Cancel all menus cascading.

UI_RETURN_OK 

Choice made.

UI_RETURN_OUT 

Left the menu.

UI_RETURN_OUT_PARENT 

Let the parent handle this event.

UI_RETURN_UPDATE 

Update the button that opened.

UI_RETURN_POPUP_OK 

Popup is ok to be handled.

Definition at line 197 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum

uiBut.dragflag

Enumerator
UI_BUT_DRAG_FULL_BUT 

By default only the left part of a button triggers dragging. A questionable design to make the icon but not other parts of the button draggable. Set this flag so the entire button can be dragged.

UI_BUT_DRAGPOIN_FREE 

Definition at line 282 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum

uiBlock.flag (controls)

Enumerator
UI_BLOCK_LOOP 
UI_BLOCK_NUMSELECT 
UI_BLOCK_NO_WIN_CLIP 

Don't apply window clipping.

UI_BLOCK_CLIPBOTTOM 
UI_BLOCK_CLIPTOP 
UI_BLOCK_MOVEMOUSE_QUIT 
UI_BLOCK_KEEP_OPEN 
UI_BLOCK_POPUP 
UI_BLOCK_OUT_1 
UI_BLOCK_SEARCH_MENU 
UI_BLOCK_POPUP_MEMORY 
UI_BLOCK_CLIP_EVENTS 

Stop handling mouse events.

UI_BLOCK_POPUP_HOLD 
UI_BLOCK_LIST_ITEM 
UI_BLOCK_PIE_MENU 
UI_BLOCK_POPOVER 
UI_BLOCK_POPOVER_ONCE 
UI_BLOCK_SHOW_SHORTCUT_ALWAYS 

Always show key-maps, even for non-menus.

UI_BLOCK_NO_DRAW_OVERRIDDEN_STATE 

Don't show library override state for buttons in this block.

UI_BLOCK_SEARCH_ONLY 

The block is only used during the search process and will not be drawn. Currently just for the case of a closed panel's sub-panel (and its sub-panels).

UI_BLOCK_QUICK_SETUP 

Hack for quick setup (splash screen) to draw text centered.

UI_BLOCK_NO_ACCELERATOR_KEYS 

Don't accelerator keys for the items in the block.

Definition at line 160 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum
Enumerator
UI_TEMPLATE_OP_PROPS_SHOW_TITLE 
UI_TEMPLATE_OP_PROPS_SHOW_EMPTY 
UI_TEMPLATE_OP_PROPS_COMPACT 
UI_TEMPLATE_OP_PROPS_HIDE_ADVANCED 
UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT 
UI_TEMPLATE_OP_PROPS_HIDE_PRESETS 
UI_TEMPLATE_OP_PROPS_ALLOW_UNDO_PUSH 

Allow the buttons placed by the template to send an undo push. Usually this isn't wanted, except for rare cases where operators draw their properties into a regular UI for later execution (e.g. collection exporter panels in Properties).

This should never be enabled for UIs that trigger redo, like "Adjust Last Operation" panels.

Definition at line 2228 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum

uiBut::drawflag, these flags should only affect how the button is drawn.

Note
currently, these flags are not passed to the widgets state() or draw() functions (except for the 'align' ones)!
Enumerator
UI_BUT_TEXT_LEFT 

Text and icon alignment (by default, they are centered).

UI_BUT_ICON_LEFT 
UI_BUT_TEXT_RIGHT 
UI_BUT_NO_TOOLTIP 

Prevent the button to show any tool-tip.

UI_BUT_HAS_QUICK_TOOLTIP 

See UI_but_func_quick_tooltip_set.

UI_BUT_NO_TEXT_PADDING 

Do not add the usual horizontal padding for text drawing.

UI_BUT_NO_PREVIEW_PADDING 

Do not add the usual padding around preview image drawing, use the size of the button.

UI_BUT_ALIGN_TOP 
UI_BUT_ALIGN_LEFT 
UI_BUT_ALIGN_RIGHT 
UI_BUT_ALIGN_DOWN 
UI_BUT_ALIGN 
UI_BUT_ALIGN_STITCH_TOP 

Warning - HACK! Needed for buttons which are not TOP/LEFT aligned, but have some top/left corner stitched to some other TOP/LEFT-aligned button, because of "corrective" hack in widget_roundbox_set().

UI_BUT_ALIGN_STITCH_LEFT 
UI_BUT_ALIGN_ALL 
UI_BUT_BOX_ITEM 

This but is "inside" a box item (currently used to change theme colors).

UI_BUT_HOVER_LEFT 

Mouse is hovering left part of number button

UI_BUT_HOVER_RIGHT 

Mouse is hovering right part of number button

UI_BUT_ICON_REVERSE 

Reverse order of consecutive off/on icons

UI_BUT_ANIMATED_CHANGED 

Value is animated, but the current value differs from the animated one.

UI_BUT_CHECKBOX_INVERT 

Draw the checkbox buttons inverted.

UI_BUT_INDETERMINATE 

Drawn in a way that indicates that the state/value is unknown.

UI_BUT_ICON_INVERT 

Draw icon inverted to indicate a special state.

Definition at line 330 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum
Enumerator
UI_BUT2_ACTIVATE_ON_INIT_NO_SELECT 

This is used when UI_BUT_ACTIVATE_ON_INIT is used, which is used to activate e.g. a search box as soon as a popup opens. Usually, the text in the search box is selected by default. However, sometimes this behavior is not desired, so it can be disabled with this flag.

UI_BUT2_FORCE_SEMI_MODAL_ACTIVE 

Force the button as active in a semi-modal state. For example, text buttons can continuously capture text input, while leaving the remaining UI interactive. Only supported well for text buttons currently.

Definition at line 266 of file UI_interface_c.hh.

◆ anonymous enum

anonymous enum

uiBlock::direction

Enumerator
UI_DIR_UP 
UI_DIR_DOWN 
UI_DIR_LEFT 
UI_DIR_RIGHT 
UI_DIR_CENTER_X 
UI_DIR_CENTER_Y 
UI_DIR_ALL 

Definition at line 148 of file UI_interface_c.hh.

◆ ButPointerType

enum class ButPointerType : uint8_t
strong
Enumerator
None 
Char 
Short 
Int 
Float 
Bit 

Definition at line 389 of file UI_interface_c.hh.

◆ ButType

enum class ButType : int8_t
strong
Enumerator
But 
Row 
Text 
Menu 

Drop-down list.

ButMenu 
Num 

Number button.

NumSlider 

Number slider.

Toggle 
ToggleN 
IconToggle 
IconToggleN 
ButToggle 

Same as regular toggle, but no on/off state displayed.

Checkbox 

Similar to toggle, display a 'tick'.

CheckboxN 
Color 
Tab 
Popover 
Scroll 
Block 
Label 
KeyEvent 
HsvCube 
Pulldown 

Menu (often used in headers), *_MENU with different draw-type.

Roundbox 
ColorBand 
Unitvec 

Sphere widget (used to input a unit-vector, aka normal).

Curve 
CurveProfile 

Profile editing widget.

ListBox 
ListRow 
HsvCircle 
TrackPreview 
SearchMenu 

Buttons with value >= ButType::SearchMenu don't get undo pushes.

Extra 
PreviewTile 

A preview image (PreviewImage), with text under it. Typically bigger than normal buttons and laid out in a grid, e.g. like the File Browser in thumbnail display mode.

HotkeyEvent 
Image 

Non-interactive image, used for splash screen.

Histogram 
Waveform 
Vectorscope 
Progress 
NodeSocket 
Sepr 
SeprLine 
SeprSpacer 

Dynamically fill available space.

Grip 

Resize handle (resize UI-list).

Decorator 
ViewItem 

An item a view (see #ui::AbstractViewItem).

Definition at line 402 of file UI_interface_c.hh.

◆ eAutoPropButsReturn

Return info for uiDefAutoButsRNA.

Enumerator
UI_PROP_BUTS_NONE_ADDED 

Returns when no buttons were added

UI_PROP_BUTS_ANY_FAILED_CHECK 

Returned when any property failed the custom check callback (check_prop)

Definition at line 1702 of file UI_interface_c.hh.

◆ eBlockBoundsCalc

Block bounds/position calculation.

Enumerator
UI_BLOCK_BOUNDS_NONE 
UI_BLOCK_BOUNDS 
UI_BLOCK_BOUNDS_TEXT 
UI_BLOCK_BOUNDS_POPUP_MOUSE 
UI_BLOCK_BOUNDS_POPUP_MENU 
UI_BLOCK_BOUNDS_POPUP_CENTER 
UI_BLOCK_BOUNDS_PIE_CENTER 

Definition at line 1004 of file UI_interface_c.hh.

◆ eButGradientType

Gradient types, for color picker ButType::HsvCube etc.

Enumerator
UI_GRAD_NONE 
UI_GRAD_SV 
UI_GRAD_HV 
UI_GRAD_HS 
UI_GRAD_H 
UI_GRAD_S 
UI_GRAD_V 
UI_GRAD_V_ALT 
UI_GRAD_L_ALT 

Definition at line 513 of file UI_interface_c.hh.

◆ eButLabelAlign

For uiDefAutoButsRNA.

Enumerator
UI_BUT_LABEL_ALIGN_NONE 

Keep current layout for aligning label with property button.

UI_BUT_LABEL_ALIGN_COLUMN 

Align label and property button vertically.

UI_BUT_LABEL_ALIGN_SPLIT_COLUMN 

Split layout into a column for the label and one for property button.

Definition at line 1692 of file UI_interface_c.hh.

◆ eFontStyle_Align

#uiFontStyle.align

Enumerator
UI_STYLE_TEXT_LEFT 
UI_STYLE_TEXT_CENTER 
UI_STYLE_TEXT_RIGHT 

Definition at line 2787 of file UI_interface_c.hh.

◆ uiButtonSectionsAlign

enum class uiButtonSectionsAlign : int8_t
strong
Enumerator
None 
Top 
Bottom 

Definition at line 982 of file UI_interface_c.hh.

◆ uiTemplateListFlags

Enumerator
UI_TEMPLATE_LIST_FLAG_NONE 
UI_TEMPLATE_LIST_SORT_REVERSE 
UI_TEMPLATE_LIST_SORT_LOCK 
UI_TEMPLATE_LIST_NO_GRIP 

Don't allow resizing the list, i.e. don't add the grip button.

UI_TEMPLATE_LIST_NO_FILTER_OPTIONS 

Do not show filtering options, not even the button to expand/collapse them. Also hides the grip button.

UI_TEMPLATE_LIST_NO_NAMES 

For UILST_LAYOUT_BIG_PREVIEW_GRID, don't reserve space for the name label.

UI_TEMPLATE_LIST_FLAGS_LAST 

Definition at line 2578 of file UI_interface_c.hh.

◆ uiTooltipColorID

Enumerator
UI_TIP_LC_MAIN 
UI_TIP_LC_VALUE 
UI_TIP_LC_ACTIVE 
UI_TIP_LC_NORMAL 
UI_TIP_LC_PYTHON 
UI_TIP_LC_ALERT 
UI_TIP_LC_MAX 

Definition at line 1908 of file UI_interface_c.hh.

◆ uiTooltipImageBackground

enum class uiTooltipImageBackground
strong
Enumerator
None 
Checkerboard_Themed 
Checkerboard_Fixed 

Definition at line 1918 of file UI_interface_c.hh.

◆ uiTooltipStyle

Enumerator
UI_TIP_STYLE_NORMAL 
UI_TIP_STYLE_HEADER 
UI_TIP_STYLE_MONO 
UI_TIP_STYLE_IMAGE 
UI_TIP_STYLE_SPACER 

Definition at line 1900 of file UI_interface_c.hh.

Function Documentation

◆ ED_dropboxes_ui()

◆ ED_keymap_ui()

void ED_keymap_ui ( wmKeyConfig * keyconf)

◆ ED_operatortypes_ui()

◆ ED_uilisttypes_ui()

void ED_uilisttypes_ui ( )

Definition at line 1196 of file interface_template_list.cc.

References UI_UL_cache_file_layers(), and WM_uilisttype_add().

Referenced by ED_spacetypes_init().

◆ ENUM_OPERATORS() [1/3]

ENUM_OPERATORS ( ButPointerType ,
ButPointerType::Bit  )

References Bit.

◆ ENUM_OPERATORS() [2/3]

◆ ENUM_OPERATORS() [3/3]

◆ UI_autocomplete_begin()

AutoComplete * UI_autocomplete_begin ( const char * startname,
size_t maxncpy )

◆ UI_autocomplete_end()

◆ UI_autocomplete_update_name()

void UI_autocomplete_update_name ( AutoComplete * autocpl,
blender::StringRef name )

◆ UI_block_active_only_flagged_buttons()

bool UI_block_active_only_flagged_buttons ( const bContext * C,
ARegion * region,
uiBlock * block )
Warning
This must run after other handlers have been added, otherwise the handler won't be removed, see: #71112.

Definition at line 1200 of file interface.cc.

References BLI_assert, uiBlock::buttons, C, uiBlock::endblock, UI_BUT_ACTIVATE_ON_INIT, UI_but_active_only_ex(), and ui_but_is_editable().

Referenced by UI_popover_panel_invoke(), UI_popup_block_ex(), and UI_popup_block_invoke_ex().

◆ UI_block_align_begin()

◆ UI_block_align_end()

◆ UI_block_begin() [1/2]

uiBlock * UI_block_begin ( const bContext * C,
ARegion * region,
std::string name,
blender::ui::EmbossType emboss )

Definition at line 3902 of file interface.cc.

References C, CTX_data_scene(), CTX_wm_window(), name, and UI_block_begin().

Referenced by block_create__close_file_dialog(), block_create_autorun_warning(), block_create_save_file_overwrite_dialog(), clip_draw_dopesheet_channels(), colorband_tools_fn(), component_menu(), blender::ed::space_node::create_search_popup_block(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_clipping_func(), curvemap_tools_func(), blender::ed::spreadsheet::draw_cell_contents(), blender::ed::vse::draw_channel_headers(), draw_channel_names(), blender::ed::spreadsheet::draw_left_column_content(), draw_nla_track_list(), blender::ed::outliner::draw_outliner(), blender::ed::spreadsheet::draw_top_row_content(), blender::ed::space_node::draw_tree_path(), ed_panel_draw(), ED_region_header_layout(), ED_time_scrub_channel_search_draw(), file_draw_invalid_asset_library_hint(), file_draw_list(), graph_draw_channel_names(), blender::ed::space_node::invalid_links_uiblock_init(), menu_add_shortcut(), menu_change_shortcut(), menu_items_from_ui_create(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_find_menu(), blender::ed::space_node::node_uiblocks_init(), panel_property_search(), blender::ed::asset::shelf::region_layout(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), template_common_search_menu(), ui_alert_create(), ui_block_func_COLOR(), ui_icon_view_menu_cb(), UI_pie_menu_begin(), ui_popover_create_block(), ui_popup_menu_create_block(), wm_block_about_create(), wm_block_create_redo(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_search_menu(), wm_block_splash_create(), wm_enum_search_menu(), and wm_operator_ui_create().

◆ UI_block_begin() [2/2]

◆ UI_block_bounds_set_centered()

◆ UI_block_bounds_set_explicit()

void UI_block_bounds_set_explicit ( uiBlock * block,
int minx,
int miny,
int maxx,
int maxy )

◆ UI_block_bounds_set_menu()

void UI_block_bounds_set_menu ( uiBlock * block,
int addval,
const int bounds_offset[2] )

◆ UI_block_bounds_set_normal()

◆ UI_block_bounds_set_popup()

◆ UI_block_bounds_set_text()

void UI_block_bounds_set_text ( uiBlock * block,
int addval )

◆ UI_block_can_add_separator()

bool UI_block_can_add_separator ( const uiBlock * block)

◆ UI_block_direction_set()

◆ UI_block_draw()

void UI_block_draw ( const bContext * C,
uiBlock * block )

Uses local copy of style, to scale things down, and allow widgets to change stuff.

Definition at line 2226 of file interface.cc.

References uiBlock::aspect, BLF_batch_draw_begin(), BLF_batch_draw_end(), Panel_Runtime::block, uiBlock::buttons, C, CTX_wm_region(), CTX_wm_region_popup(), ELEM, uiBlock::endblock, ARegion::flag, uiBlock::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_matrix_identity_set(), GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), uiStyle::grouplabel, uiBlock::panel, ThemeUI::panel_roundness, uiStyle::paneltitle, uiFontStyle::points, ARegion::regiontype, RGN_FLAG_SEARCH_FILTER_ACTIVE, RGN_TYPE_HUD, RGN_TYPE_TEMPORARY, Panel::runtime, uiStyle::tooltip, bTheme::tui, Panel::type, U, UI_block_end(), UI_BLOCK_LOOP, UI_BLOCK_PIE_MENU, UI_BLOCK_POPOVER, ui_block_views_draw_overlays(), ui_but_pixelrect_in_view(), ui_but_to_pixelrect(), ui_draw_aligned_panel(), ui_draw_but(), ui_draw_layout_panels_backdrop(), ui_draw_menu_back(), ui_draw_pie_center(), ui_draw_popover_back(), ui_fontscale(), UI_GetTheme(), UI_HIDDEN, UI_panel_category_is_visible(), UI_panel_should_show_background(), UI_SCROLLED, UI_style_get_dpi(), UI_widgetbase_draw_cache_begin(), UI_widgetbase_draw_cache_end(), uiStyle::widget, wmOrtho2_region_pixelspace(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

Referenced by clip_draw_dopesheet_channels(), blender::ed::spreadsheet::draw_cell_contents(), blender::ed::vse::draw_channel_headers(), draw_channel_names(), blender::ed::spreadsheet::draw_left_column_content(), draw_nla_track_list(), blender::ed::outliner::draw_outliner(), blender::ed::spreadsheet::draw_top_row_content(), blender::ed::space_node::draw_tree_path(), ED_time_scrub_channel_search_draw(), file_draw_invalid_asset_library_hint(), file_draw_list(), blender::ed::space_node::frame_node_draw_overlay(), graph_draw_channel_names(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_collapsed(), blender::ed::space_node::node_draw_nodetree(), blender::ed::space_node::reroute_node_draw(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), ui_block_region_draw(), UI_blocklist_draw(), and UI_panels_draw().

◆ UI_block_emboss_get()

◆ UI_block_emboss_set()

◆ UI_block_end()

◆ UI_block_end_ex()

void UI_block_end_ex ( const bContext * C,
Main * bmain,
wmWindow * window,
Scene * scene,
ARegion * region,
Depsgraph * depsgraph,
uiBlock * block,
const int xy[2] = nullptr,
int r_xy[2] = nullptr )

Definition at line 2068 of file interface.cc.

References uiBlock::active, BKE_animsys_eval_context_construct(), BKE_scene_frame_get(), BLI_assert, blender::ui::block_layout_resolve(), uiBlock::bounds_type, uiBlock::buttons, C, depsgraph, uiBlock::endblock, ListBase::first, uiBlock::flag, uiPopupBlockHandle::grab_xy_prev, uiBlock::handle, uiBlock::layouts, LISTBASE_FOREACH, ot, uiBlock::panel, uiBlock::rect, ui_block_align_calc(), UI_block_align_end(), UI_BLOCK_BOUNDS, ui_block_bounds_calc(), ui_block_bounds_calc_centered(), ui_block_bounds_calc_centered_pie(), ui_block_bounds_calc_popup(), ui_block_bounds_calc_post_centered(), ui_block_bounds_calc_text(), UI_BLOCK_BOUNDS_NONE, UI_BLOCK_BOUNDS_PIE_CENTER, UI_BLOCK_BOUNDS_POPUP_CENTER, UI_BLOCK_BOUNDS_POPUP_MENU, UI_BLOCK_BOUNDS_POPUP_MOUSE, UI_block_bounds_set_normal(), UI_BLOCK_BOUNDS_TEXT, UI_BLOCK_LOOP, UI_BLOCK_NO_ACCELERATOR_KEYS, UI_BLOCK_NUMSELECT, UI_BLOCK_SHOW_SHORTCUT_ALWAYS, UI_block_update_from_old(), ui_block_views_end(), UI_BUT_ALIGN, ui_but_anim_decorate_update_from_flag(), ui_but_anim_flag(), ui_but_context_poll_operator(), ui_but_context_poll_operator_ex(), UI_BUT_DISABLED, UI_but_is_decorator, ui_but_override_flag(), ui_but_predefined_extra_operator_icons_add(), ui_but_validate(), ui_menu_block_set_keyaccels(), ui_menu_block_set_keymaps(), ui_update_flexible_spacing(), rctf::xmax, rctf::xmin, and xy.

Referenced by blender::ed::space_node::frame_node_draw_overlay(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_collapsed(), blender::ed::space_node::reroute_node_draw(), UI_block_end(), and ui_popup_block_refresh().

◆ UI_block_flag_disable()

◆ UI_block_flag_enable()

◆ UI_block_free()

◆ UI_block_func_handle_set()

◆ UI_block_func_set()

◆ UI_block_funcN_set()

void UI_block_funcN_set ( uiBlock * block,
uiButHandleNFunc funcN,
void * argN,
void * arg2,
uiButArgNFree func_argN_free_fn = MEM_freeN,
uiButArgNCopy func_argN_copy_fn = MEM_dupallocN )

◆ UI_block_has_active_default_button()

bool UI_block_has_active_default_button ( const uiBlock * block)

Return true when the block has a default button. Use this for popups to detect when pressing "Return" will run an action.

Definition at line 723 of file interface_query.cc.

References uiBlock::buttons, UI_BUT_ACTIVE_DEFAULT, and UI_HIDDEN.

Referenced by UI_popup_block_template_confirm(), and wm_block_dialog_create().

◆ UI_block_interaction_set()

void UI_block_interaction_set ( uiBlock * block,
uiBlockInteraction_CallbackData * callbacks )

Definition at line 12513 of file interface_handlers.cc.

References uiBlock::custom_interaction_callbacks.

Referenced by v3d_editvertex_buts().

◆ UI_block_is_empty()

bool UI_block_is_empty ( const uiBlock * block)

Definition at line 709 of file interface_query.cc.

References UI_block_is_empty_ex().

◆ UI_block_is_empty_ex()

bool UI_block_is_empty_ex ( const uiBlock * block,
bool skip_title )

◆ UI_block_is_search_only()

bool UI_block_is_search_only ( const uiBlock * block)

Definition at line 3934 of file interface.cc.

References uiBlock::flag, and UI_BLOCK_SEARCH_ONLY.

Referenced by UI_panels_draw().

◆ UI_block_listen()

void UI_block_listen ( const uiBlock * block,
const wmRegionListenerParams * listener_params )

Definition at line 3755 of file interface.cc.

References uiBlock::dynamic_listeners, LISTBASE_FOREACH, and ui_block_views_listen().

Referenced by ED_region_do_listen().

◆ UI_block_lock_clear()

◆ UI_block_lock_set()

◆ UI_block_region_set()

◆ UI_block_set_active_operator()

void UI_block_set_active_operator ( uiBlock * block,
wmOperator * op,
const bool free )

◆ UI_block_set_search_only()

void UI_block_set_search_only ( uiBlock * block,
bool search_only )

Use when a block must be searched to give accurate results for the whole region but shouldn't be displayed.

Definition at line 3939 of file interface.cc.

References uiBlock::flag, SET_FLAG_FROM_TEST, and UI_BLOCK_SEARCH_ONLY.

Referenced by panel_property_search(), and panel_remove_invisible_layouts_recursive().

◆ UI_block_theme_style_set()

◆ UI_block_translate()

◆ UI_block_update_from_old()

◆ UI_blocklist_draw()

void UI_blocklist_draw ( const bContext * C,
const ListBase * lb )

◆ UI_blocklist_free()

void UI_blocklist_free ( const bContext * C,
ARegion * region )

◆ UI_blocklist_free_inactive()

void UI_blocklist_free_inactive ( const bContext * C,
ARegion * region )

◆ UI_blocklist_min_y_get()

int UI_blocklist_min_y_get ( ListBase * lb)

Definition at line 6022 of file interface.cc.

References ListBase::first, LISTBASE_FOREACH, min, uiBlock::rect, and rctf::ymin.

◆ UI_blocklist_update_view_for_buttons()

void UI_blocklist_update_view_for_buttons ( const bContext * C,
const ListBase * lb )

Definition at line 3779 of file interface.cc.

References C, LISTBASE_FOREACH, and ui_but_update_view_for_active().

Referenced by ED_region_panels_layout_ex().

◆ UI_blocklist_update_window_matrix()

◆ UI_but_active_drop_color()

bool UI_but_active_drop_color ( bContext * C)

◆ UI_but_active_drop_name()

bool UI_but_active_drop_name ( const bContext * C)

Returns true if highlighted button allows drop of names. called in region context.

Definition at line 12487 of file interface_handlers.cc.

References C, and UI_but_active_drop_name_button().

Referenced by blender::ed::space_node::node_collection_drop_poll(), blender::ed::space_node::node_material_drop_poll(), blender::ed::space_node::node_object_drop_poll(), and ui_drop_name_poll().

◆ UI_but_active_drop_name_button()

uiBut * UI_but_active_drop_name_button ( const bContext * C)

◆ UI_but_active_only()

◆ UI_but_active_only_ex()

bool UI_but_active_only_ex ( const bContext * C,
ARegion * region,
uiBlock * block,
uiBut * but,
bool remove_on_failure )

Special button case, only draw it when used actively, for outliner etc.

Needed for temporarily rename buttons, such as in outliner or file-select, they should keep calling uiDefBut to keep them alive.

Returns
false when button removed.

Definition at line 1153 of file interface.cc.

References activate(), uiBut::active, C, uiBut::layout, uiBlock::oldblock, uiBlock::remove_but(), ui_but_activate_event(), ui_but_active_free(), ui_but_find_old(), ui_but_free(), ui_layout_remove_but(), and ui_region_find_active_but().

Referenced by UI_block_active_only_flagged_buttons(), and UI_but_active_only().

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

References UI_asset_shelf_idname_from_button_context().

Referenced by shortcut_get_operator_property().

◆ UI_but_cm_display_get()

const ColorManagedDisplay * UI_but_cm_display_get ( uiBut & but)

Definition at line 6107 of file interface.cc.

References uiBut::block, and ui_block_cm_display_get().

Referenced by ui_tooltip_data_from_button_or_extra_icon().

◆ UI_but_color_set()

void UI_but_color_set ( uiBut * but,
const uchar color[4] )

Sets the button's color, normally only used to recolor the icon. In the special case of ButType::Label without icon this is used as text color.

Definition at line 6102 of file interface.cc.

References uiBut::col, and copy_v4_v4_uchar().

Referenced by file_add_overlay_icon_but(), and wm_block_splash_add_label().

◆ UI_but_context_get()

const bContextStore * UI_but_context_get ( const uiBut * but)

Definition at line 6216 of file interface.cc.

References uiBut::context.

Referenced by blender::ed::asset::shelf::context(), and wm_drop_ui_context_create().

◆ UI_but_context_int_get()

std::optional< int64_t > UI_but_context_int_get ( const uiBut * but,
blender::StringRef name )

◆ UI_but_context_int_set()

void UI_but_context_int_set ( uiBlock * block,
uiBut * but,
blender::StringRef name,
int64_t value )

◆ UI_but_context_menu_title_from_button()

◆ UI_but_context_ptr_get()

const PointerRNA * UI_but_context_ptr_get ( const uiBut * but,
blender::StringRef name,
const StructRNA * type = nullptr )

Definition at line 6192 of file interface.cc.

References uiBut::context, CTX_store_ptr_lookup(), and name.

◆ UI_but_context_ptr_set()

◆ UI_but_context_string_get()

std::optional< blender::StringRefNull > UI_but_context_string_get ( const uiBut * but,
blender::StringRef name )

Definition at line 6199 of file interface.cc.

References uiBut::context, CTX_store_string_lookup(), and name.

Referenced by UI_asset_shelf_idname_from_button_context().

◆ UI_but_disable()

◆ UI_but_drag_attach_image()

void UI_but_drag_attach_image ( uiBut * but,
const ImBuf * imb,
float scale )

Set an image to display while dragging. This works for any drag type (WM_DRAG_XXX). Not to be confused with UI_but_drag_set_image(), which sets up dragging of an image.

Sets UI_BUT_DRAG_FULL_BUT so the full button can be dragged.

Definition at line 27 of file interface_drag.cc.

References uiBut::imb, uiBut::imb_scale, UI_BUT_DRAG_FULL_BUT, and UI_but_dragflag_enable().

Referenced by file_but_enable_drag(), and UI_but_drag_set_image().

◆ UI_but_drag_set_asset()

void UI_but_drag_set_asset ( uiBut * but,
const blender::asset_system::AssetRepresentation * asset,
const AssetImportSettings & import_settings,
int icon,
int preview_icon )

Sets UI_BUT_DRAG_FULL_BUT so the full button can be dragged.

Parameters
assetMay be passed from a temporary variable, drag data only stores a copy of this.
iconSmall icon that will be drawn while dragging.
preview_iconBigger preview size icon that will be drawn while dragging instead of icon.

Definition at line 34 of file interface_drag.cc.

References uiBut::drag_preview_icon_id, uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, UI_BUT_DRAGPOIN_FREE, ui_def_but_icon(), WM_DRAG_ASSET, WM_drag_create_asset_data(), and WM_drag_data_free().

Referenced by file_but_enable_drag().

◆ UI_but_drag_set_id()

◆ UI_but_drag_set_image()

void UI_but_drag_set_image ( uiBut * but,
const char * path,
int icon,
const ImBuf * imb,
float scale )

Sets UI_BUT_DRAG_FULL_BUT so the full button can be dragged.

Parameters
pathThe path to drag. The passed string may be destructed, button keeps a copy.

Definition at line 82 of file interface_drag.cc.

References UI_but_drag_attach_image(), UI_but_drag_set_path(), and ui_def_but_icon().

Referenced by file_but_enable_drag().

◆ UI_but_drag_set_name()

void UI_but_drag_set_name ( uiBut * but,
const char * name )

◆ UI_but_drag_set_path()

void UI_but_drag_set_path ( uiBut * but,
const char * path )

Enable dragging a path from this button.

Parameters
pathThe path to drag. The passed string may be destructed, button keeps a copy.

Definition at line 62 of file interface_drag.cc.

References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, UI_BUT_DRAGPOIN_FREE, WM_drag_create_path_data(), WM_drag_data_free(), and WM_DRAG_PATH.

Referenced by file_but_enable_drag(), and UI_but_drag_set_image().

◆ UI_but_drag_set_rna()

void UI_but_drag_set_rna ( uiBut * but,
PointerRNA * ptr )

◆ UI_but_dragflag_disable()

void UI_but_dragflag_disable ( uiBut * but,
int flag )

Definition at line 6085 of file interface.cc.

References uiBut::dragflag, and flag.

◆ UI_but_dragflag_enable()

void UI_but_dragflag_enable ( uiBut * but,
int flag )

Definition at line 6080 of file interface.cc.

References uiBut::dragflag, and flag.

Referenced by file_draw_list(), and UI_but_drag_attach_image().

◆ UI_but_drawflag_disable()

◆ UI_but_drawflag_enable()

◆ UI_but_ensure_in_view()

void UI_but_ensure_in_view ( const bContext * C,
ARegion * region,
const uiBut * but )

Adjust the view so the rectangle of but is in view, with some extra margin.

It's important that this is only executed after buttons received their final uiBut.rect. E.g. UI_panels_end() modifies them, so if that is executed, this function must not be called before it.

Parameters
regionThe region the button is placed in. Make sure this is actually the one the button is placed in, not just the context region.

Definition at line 880 of file interface_utils.cc.

References BLI_rctf_pad(), C, ED_region_tag_redraw_no_rebuild(), View2D::flag, ui_but_rect_to_view(), UI_UNIT_X, ui_view2d_cur_ensure_rect_in_view(), UI_view2d_curRect_changed(), ARegion::v2d, and V2D_IS_INIT.

Referenced by ui_but_update_view_for_active(), and ui_textedit_begin().

◆ UI_but_execute()

void UI_but_execute ( const bContext * C,
ARegion * region,
uiBut * but )

Simulate button click.

Definition at line 1230 of file interface.cc.

References C, ui_but_execute_begin(), and ui_but_execute_end().

Referenced by ui_button_press_invoke(), ui_drag_toggle_set_xy_xy(), and ui_handle_menu_event().

◆ UI_but_extra_icon_string_get_label()

std::string UI_but_extra_icon_string_get_label ( const uiButExtraOpIcon & extra_icon)

◆ UI_but_extra_icon_string_get_operator_keymap()

std::string UI_but_extra_icon_string_get_operator_keymap ( const bContext & C,
const uiButExtraOpIcon & extra_icon )

◆ UI_but_extra_icon_string_get_tooltip()

std::string UI_but_extra_icon_string_get_tooltip ( bContext & C,
const uiButExtraOpIcon & extra_icon )

◆ UI_but_extra_operator_icon_add()

◆ UI_but_extra_operator_icon_opptr_get()

PointerRNA * UI_but_extra_operator_icon_opptr_get ( const uiButExtraOpIcon * extra_icon)

◆ UI_but_extra_operator_icon_optype_get()

◆ UI_but_find_mouse_over()

uiBut * UI_but_find_mouse_over ( const ARegion * region,
const wmEvent * event )

Find a button under the mouse cursor, ignoring non-interactive ones (like labels). Holding Ctrl over a label button that can be Ctrl-Clicked to turn into an edit button will return that. Labels that are only interactive for the sake of displaying a tooltip are ignored too.

Definition at line 371 of file interface_query.cc.

References KM_CTRL, wmEvent::modifier, ui_but_find_mouse_over_ex(), and wmEvent::xy.

Referenced by eyedropper_get_property_button_under_mouse(), blender::ed::space_node::node_group_enter_exit_invoke(), ui_handle_button_event(), and ui_handler_region_menu().

◆ UI_but_flag2_enable()

void UI_but_flag2_enable ( uiBut * but,
int flag )

Definition at line 6055 of file interface.cc.

References flag, and uiBut::flag2.

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

◆ UI_but_flag_disable()

◆ UI_but_flag_enable()

void UI_but_flag_enable ( uiBut * but,
int flag )

Definition at line 6050 of file interface.cc.

References flag, and uiBut::flag.

Referenced by blender::nodes::add_attribute_search_button(), block_create_autorun_warning(), blender::ui::TreeViewLayoutBuilder::build_from_tree(), blender::ui::bonecollections::BoneCollectionItem::build_row(), blender::ed::space_node::create_search_popup_block(), curvemap_buttons_layout(), CurveProfile_buttons_layout(), draw_setting_widget(), ED_file_path_button(), file_draw_list(), file_panel_execution_buttons_draw(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_collapsed(), blender::ed::space_node::node_draw_extra_info_row(), blender::ed::space_node::node_draw_panels(), blender::ed::space_node::node_find_menu(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_draw_overrides_restrictbuts(), blender::ed::outliner::outliner_draw_overrides_rna_buts(), blender::ed::outliner::outliner_draw_restrictbuts(), blender::ed::outliner::outliner_draw_rnabuts(), blender::ed::outliner::outliner_draw_userbuts(), uiLayout::prop(), blender::ed::space_node::reroute_node_draw_label(), rotation_mode_menu_callback(), save_file_overwrite_confirm_button(), save_file_overwrite_saveas_button(), template_add_button_search_menu(), template_ID(), template_id_def_new_but(), ui_alert_create(), UI_but_disable(), ui_but_search_refresh(), ui_item_with_label(), ui_layout_list_set_labels_active(), UI_popup_block_template_confirm(), ui_popup_context_menu_for_button(), ui_template_list_layout_draw(), uiDefAutoButR(), uiItem_simple(), uiItemFullO_ptr_ex(), uiItemL_ex(), uiTemplateKeymapItemProperties(), view3d_panel_vgroup(), wm_block_dialog_create(), wm_block_file_close_save_button(), wm_block_insert_unicode_create(), and wm_block_search_menu().

◆ UI_but_flag_is_set()

◆ UI_but_focus_on_enter_event()

void UI_but_focus_on_enter_event ( wmWindow * win,
uiBut * but )

push a new event onto event queue to activate the given button (usually a text-field) upon entering a popup

Definition at line 6810 of file interface.cc.

References EVT_BUT_OPEN, KM_PRESS, WM_event_add(), and wm_event_init_from_window().

Referenced by template_common_search_menu(), template_operator_property_buts_draw_single(), and wm_enum_search_menu().

◆ UI_but_func_complete_set()

void UI_but_func_complete_set ( uiBut * but,
uiButCompleteFunc func,
void * arg )

◆ UI_but_func_drawextra_set()

void UI_but_func_drawextra_set ( uiBlock * block,
std::function< void(const bContext *C, rcti *rect)> func )

Definition at line 6283 of file interface.cc.

References C, and uiBlock::drawextra.

Referenced by uiTemplatePreview().

◆ UI_but_func_hold_set()

void UI_but_func_hold_set ( uiBut * but,
uiButHandleHoldFunc func,
void * argN )

Definition at line 6824 of file interface.cc.

References uiBut::hold_argN, and uiBut::hold_func.

Referenced by uiLayout::op_menu_hold().

◆ UI_but_func_identity_compare_set()

void UI_but_func_identity_compare_set ( uiBut * but,
uiButIdentityCompareFunc cmp_fn )

Callback to compare the identity of two buttons, used to identify buttons over redraws. If the callback returns true, the given buttons are considered to be matching and relevant state is preserved (copied from the old to the new button). If it returns false, it's considered non-matching and no further checks are done.

If this is set, it is always executed instead of the default comparisons. However it is only executed for buttons that have the same type and the same callback. So callbacks can assume the button types match.

Definition at line 439 of file interface_utils.cc.

References uiBut::identity_cmp_func.

Referenced by blender::ed::outliner::outliner_draw_overrides_restrictbuts().

◆ UI_but_func_menu_search()

◆ UI_but_func_menu_step_set()

void UI_but_func_menu_step_set ( uiBut * but,
uiMenuStepFunc func )

Definition at line 6325 of file interface.cc.

References uiBut::menu_step_func.

Referenced by uiblock_layer_pass_buttons().

◆ UI_but_func_operator_search()

◆ UI_but_func_quick_tooltip_set()

void UI_but_func_quick_tooltip_set ( uiBut * but,
std::function< std::string(const uiBut *but)> func )

Enable a tooltip that appears faster than the usual tooltip. If the button has both a quick and a normal tooltip, the quick one is shown first, and expanded to the full one after the usual tooltip delay. Quick tooltips are useful in cases like:

  • A button doesn't show a label to save space but the label is still relevant. Show the label as quick tooltip in that case (like the name of tools in a compact, icon only tool-shelf).
  • The only purpose of a button is to display this tooltip (like a warning icon with the warning text in the tooltip).

Definition at line 6335 of file interface.cc.

References uiBut::tip_quick_func, UI_but_drawflag_enable(), and UI_BUT_HAS_QUICK_TOOLTIP.

Referenced by blender::ui::PreviewGridItem::build_grid_tile_button(), blender::ed::space_node::draw_link_errors(), and blender::ed::space_node::node_add_error_message_button().

◆ UI_but_func_rename_full_set()

void UI_but_func_rename_full_set ( uiBut * but,
std::function< void(std::string &new_name)> rename_full_func )

Definition at line 6277 of file interface.cc.

References uiBut::rename_full_func.

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

◆ UI_but_func_rename_set()

void UI_but_func_rename_set ( uiBut * but,
uiButHandleRenameFunc func,
void * arg1 )

◆ UI_but_func_search_set()

void UI_but_func_search_set ( uiBut * but,
uiButSearchCreateFn search_create_fn,
uiButSearchUpdateFn search_update_fn,
void * arg,
bool free_arg,
uiFreeArgFunc search_arg_free_fn,
uiButHandleFunc search_exec_fn,
void * active )
Note
The item-pointer (referred to below) is a per search item user pointer passed to UI_search_item_add (stored in uiSearchItems.pointers).
Parameters
search_create_fnFunction to create the menu.
search_update_fnFunction to refresh search content after the search text has changed.
arguser value.
free_argSet to true if the argument is newly allocated memory for every redraw and should be freed when the button is destroyed.
search_arg_free_fnWhen non-null, use this function to free arg.
search_exec_fnFunction that executes the action, gets arg as the first argument. The second argument as the active item-pointer
activeWhen non-null, this item-pointer item will be visible and selected, otherwise the first item will be selected.

Definition at line 6522 of file interface.cc.

References active, uiButSearch::arg, uiButSearch::arg_free_fn, BLI_assert, uiBut::block, uiBut::drawstr, uiBlock::flag, uiBut::func, uiButSearch::item_active, uiButSearch::items_update_fn, uiButSearch::popup_create_fn, printf, uiButSearch::results_are_suggestions, SearchMenu, uiBut::type, UI_BLOCK_LOOP, UI_but_func_set(), UI_but_funcN_set(), ui_but_search_refresh(), and ui_searchbox_create_generic().

Referenced by blender::nodes::add_attribute_search_button(), blender::nodes::add_layer_name_search_button(), blender::ed::space_node::create_search_popup_block(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_find_menu(), blender::ed::space_node::node_geometry_add_attribute_search_button(), blender::ed::space_node::node_geometry_add_layer_search_button(), blender::ed::space_node::node_geometry_add_volume_grid_search_button(), template_common_search_menu(), ui_but_add_search(), UI_but_func_menu_search(), UI_but_func_operator_search(), and uiDefSearchButO_ptr().

◆ UI_but_func_search_set_context_menu()

void UI_but_func_search_set_context_menu ( uiBut * but,
uiButSearchContextMenuFn context_menu_fn )

Definition at line 6580 of file interface.cc.

References BLI_assert, uiButSearch::item_context_menu_fn, SearchMenu, and uiBut::type.

Referenced by UI_but_func_menu_search().

◆ UI_but_func_search_set_listen()

void UI_but_func_search_set_listen ( uiBut * but,
uiButSearchListenFn listen_fn )

◆ UI_but_func_search_set_results_are_suggestions()

◆ UI_but_func_search_set_sep_string()

void UI_but_func_search_set_sep_string ( uiBut * but,
const char * search_sep_string )

◆ UI_but_func_search_set_tooltip()

void UI_but_func_search_set_tooltip ( uiBut * but,
uiButSearchTooltipFn tooltip_fn )

◆ UI_but_func_set()

void UI_but_func_set ( uiBut * but,
uiButHandleFunc func,
void * arg1,
void * arg2 )

Definition at line 6289 of file interface.cc.

References uiBut::func, uiBut::func_arg1, and uiBut::func_arg2.

Referenced by UI_but_func_search_set().

◆ UI_but_func_tooltip_custom_set()

◆ UI_but_func_tooltip_set()

◆ UI_but_funcN_set()

◆ UI_but_has_quick_tooltip()

bool UI_but_has_quick_tooltip ( const uiBut * but)

◆ UI_but_hint_drawstr_set()

void UI_but_hint_drawstr_set ( uiBut * but,
const char * string )

Adds a hint to the button which draws right aligned, grayed out and never clipped.

Definition at line 6720 of file interface.cc.

References ui_but_add_shortcut().

Referenced by blender::ed::spreadsheet::draw_row_suffix().

◆ UI_but_icon_indicator_color_set()

void UI_but_icon_indicator_color_set ( uiBut * but,
const uchar color[4] )

◆ UI_but_icon_indicator_number_set()

void UI_but_icon_indicator_number_set ( uiBut * but,
const int indicator_number )

◆ UI_but_icon_indicator_set()

void UI_but_icon_indicator_set ( uiBut * but,
const char * string )

◆ UI_but_is_color_gamma()

bool UI_but_is_color_gamma ( uiBut & but)

Definition at line 6112 of file interface.cc.

References ui_but_is_color_gamma().

◆ UI_but_is_tool()

◆ UI_but_is_userdef()

bool UI_but_is_userdef ( const uiBut * but)

◆ UI_but_is_utf8()

◆ UI_but_label_alpha_factor_set()

void UI_but_label_alpha_factor_set ( uiBut * but,
float alpha_factor )

◆ UI_but_menu_disable_hover_open()

void UI_but_menu_disable_hover_open ( uiBut * but)

When a button displays a menu, hovering another button that can display one will switch to that menu instead. In some cases that's unexpected, so the feature can be disabled here (as in, this button will not spawn its menu on hover and the previously spawned menu will remain open).

Definition at line 6330 of file interface.cc.

References uiBut::menu_no_hover_open.

Referenced by blender::ui::template_asset_shelf_popover().

◆ UI_but_menutype_get()

◆ UI_but_node_link_set()

void UI_but_node_link_set ( uiBut * but,
bNodeSocket * socket,
const float draw_color[4] )

◆ UI_but_number_precision_set()

◆ UI_but_number_slider_precision_set()

void UI_but_number_slider_precision_set ( uiBut * but,
float precision )

Definition at line 6775 of file interface.cc.

References BLI_assert, NumSlider, uiButNumberSlider::precision, and uiBut::type.

Referenced by ui_block_colorpicker(), and ui_def_but_rna().

◆ UI_but_number_slider_step_size_set()

void UI_but_number_slider_step_size_set ( uiBut * but,
float step_size )

Definition at line 6766 of file interface.cc.

References BLI_assert, NumSlider, uiButNumberSlider::step_size, and uiBut::type.

Referenced by ui_block_colorpicker(), and ui_def_but_rna().

◆ UI_but_number_step_size_set()

◆ UI_but_online_manual_id()

◆ UI_but_online_manual_id_from_active()

std::optional< std::string > UI_but_online_manual_id_from_active ( const bContext * C)

◆ UI_but_operator_ptr_ensure()

◆ UI_but_operator_set()

◆ UI_but_operator_set_never_call()

void UI_but_operator_set_never_call ( uiBut * but)

Disable calling operators from but in button handling. Useful to attach an operator to a button for tooltips, "Assign Shortcut", etc. without actually making the button execute the operator.

Definition at line 6013 of file interface.cc.

References uiBut::operator_never_call.

Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile().

◆ UI_but_operatortype_get_from_enum_menu()

◆ UI_but_paneltype_get()

◆ UI_but_placeholder_set()

◆ UI_but_return_value_get()

int UI_but_return_value_get ( uiBut * but)

Definition at line 6160 of file interface.cc.

References uiBut::retval.

◆ UI_but_rna_enum_item_get()

◆ UI_but_search_preview_grid_size_set()

void UI_but_search_preview_grid_size_set ( uiBut * but,
int rows,
int cols )

◆ UI_but_string_get_label()

std::string UI_but_string_get_label ( uiBut & but)

◆ UI_but_string_get_operator_keymap()

std::string UI_but_string_get_operator_keymap ( bContext & C,
uiBut & but )

Buttons assigned to an operator (common case).

Definition at line 7025 of file interface.cc.

References C, and ui_but_event_operator_string().

Referenced by ui_tooltip_data_from_button_or_extra_icon(), and ui_tooltip_data_from_tool().

◆ UI_but_string_get_property_keymap()

std::string UI_but_string_get_property_keymap ( bContext & C,
uiBut & but )

Use for properties that are bound to one of the context cycle, etc. keys.

Definition at line 7030 of file interface.cc.

References C, and ui_but_event_property_operator_string().

Referenced by ui_tooltip_data_from_button_or_extra_icon().

◆ UI_but_string_get_rna_label()

◆ UI_but_string_get_rna_label_context()

std::string UI_but_string_get_rna_label_context ( const uiBut & but)

◆ UI_but_string_get_rna_property_identifier()

std::string UI_but_string_get_rna_property_identifier ( const uiBut & but)

◆ UI_but_string_get_rna_struct_identifier()

◆ UI_but_string_get_rna_tooltip()

◆ UI_but_string_get_tooltip()

std::string UI_but_string_get_tooltip ( bContext & C,
uiBut & but )

◆ UI_but_string_get_tooltip_label()

std::string UI_but_string_get_tooltip_label ( const uiBut & but)

Query the result of #uiBut::tip_label_func(). Meant to allow overriding the label to be displayed in the tool-tip.

Definition at line 6930 of file interface.cc.

References uiBut::tip_quick_func.

Referenced by ui_tooltip_data_from_button_or_extra_icon().

◆ UI_but_tooltip_refresh()

void UI_but_tooltip_refresh ( bContext * C,
uiBut * but )

Recreate tool-tip (use to update dynamic tips)

Definition at line 8618 of file interface_handlers.cc.

References uiBut::active, C, data, wmTooltipState::region, bScreen::tool_tip, WM_tooltip_refresh(), and WM_window_get_active_screen().

Referenced by UI_block_update_from_old().

◆ UI_but_tooltip_timer_remove()

void UI_but_tooltip_timer_remove ( bContext * C,
uiBut * but )

Removes tool-tip timer from active but (meaning tool-tip is disabled until it's re-enabled again).

Definition at line 8629 of file interface_handlers.cc.

References uiBut::active, C, data, WM_event_timer_remove(), and WM_tooltip_clear().

Referenced by button_activate_state(), blender::ed::outliner::outliner_operation_invoke(), ui_handle_button_event(), ui_handle_menu_event(), ui_popup_block_create(), and ui_region_handler().

◆ UI_but_type_set_menu_from_pulldown()

◆ UI_but_unit_type_get()

◆ UI_but_unit_type_set()

void UI_but_unit_type_set ( uiBut * but,
int unit_type )

◆ UI_but_view_item_draw_size_set()

void UI_but_view_item_draw_size_set ( uiBut * but,
const std::optional< int > draw_width = std::nullopt,
const std::optional< int > draw_height = std::nullopt )

◆ UI_butstore_clear()

void UI_butstore_clear ( uiBlock * block)

NULL all pointers, don't free since the owner needs to be able to inspect.

Definition at line 1009 of file interface_utils.cc.

References uiBlock::butstore, and LISTBASE_FOREACH.

Referenced by UI_block_free().

◆ UI_butstore_create()

uiButStore * UI_butstore_create ( uiBlock * block)

Create a new button store, the caller must manage and run UI_butstore_free

Definition at line 923 of file interface_utils.cc.

References BLI_addtail(), uiButStore::block, uiBlock::butstore, and MEM_callocN().

Referenced by ui_but_add_search(), and ui_multibut_states_create().

◆ UI_butstore_free()

◆ UI_butstore_is_registered()

bool UI_butstore_is_registered ( uiBlock * block,
uiBut * but )

Definition at line 959 of file interface_utils.cc.

References uiBlock::butstore, and LISTBASE_FOREACH.

Referenced by ui_but_free().

◆ UI_butstore_is_valid()

bool UI_butstore_is_valid ( uiButStore * bs_handle)

Definition at line 954 of file interface_utils.cc.

References uiButStore::block.

◆ UI_butstore_register()

void UI_butstore_register ( uiButStore * bs_handle,
uiBut ** but_p )

◆ UI_butstore_register_update()

bool UI_butstore_register_update ( uiBlock * block,
uiBut * but_dst,
const uiBut * but_src )

Update the pointer for a registered button.

Definition at line 993 of file interface_utils.cc.

References uiBlock::butstore, and LISTBASE_FOREACH.

Referenced by ui_but_update_from_old_block().

◆ UI_butstore_unregister()

void UI_butstore_unregister ( uiButStore * bs_handle,
uiBut ** but_p )

◆ UI_butstore_update()

void UI_butstore_update ( uiBlock * block)

Map freed buttons from the old block and update pointers.

Definition at line 1019 of file interface_utils.cc.

References BLI_assert, BLI_movelisttolist(), uiBlock::butstore, ELEM, ListBase::first, LIKELY, LISTBASE_FOREACH, uiBlock::oldblock, and ui_but_find_new().

Referenced by UI_block_update_from_old().

◆ UI_calc_float_precision()

int UI_calc_float_precision ( int prec,
double value )

Returns the best "UI" precision for given floating value, so that e.g. 10.000001 rather gets drawn as '10'...

Definition at line 745 of file interface_utils.cc.

References BLI_assert, CLAMP, e, fabs(), i, pow, and UI_PRECISION_FLOAT_MAX.

Referenced by outputNumInput(), and ui_but_calc_float_precision().

◆ UI_context_active_but_clear()

◆ UI_context_active_but_get()

◆ UI_context_active_but_get_respect_popup()

uiBut * UI_context_active_but_get_respect_popup ( const bContext * C)

Version of #UI_context_active_get() that uses the result of CTX_wm_region_popup() if set. Does not traverse into parent menus, which may be wanted in some cases.

Definition at line 9243 of file interface_handlers.cc.

References C, CTX_wm_region(), CTX_wm_region_popup(), and ui_context_button_active().

Referenced by button_string_clear_exec(), and UI_context_active_but_prop_handle().

◆ UI_context_active_but_get_tab_ID()

ID * UI_context_active_but_get_tab_ID ( bContext * C)

◆ UI_context_active_but_prop_get()

uiBut * UI_context_active_but_prop_get ( const bContext * C,
PointerRNA * r_ptr,
PropertyRNA ** r_prop,
int * r_index )

Version of UI_context_active_but_get that also returns RNA property info. Helper function for insert keyframe, reset to default, etc operators.

Returns
active button, NULL if none found or if it doesn't contain valid RNA data.

Definition at line 9285 of file interface_handlers.cc.

References C, CTX_wm_region(), CTX_wm_region_popup(), and UI_region_active_but_prop_get().

Referenced by achannel_setting_slider_nla_curve_cb(), add_driver_button_invoke(), add_driver_button_none(), add_driver_button_poll(), add_keyingset_button_exec(), assign_default_button_exec(), assign_default_button_poll(), blender::ui::bonedropper_init(), blender::ui::bonedropper_poll(), clear_key_button_exec(), copy_as_driver_button_exec(), copy_as_driver_button_poll(), copy_data_path_button_exec(), copy_data_path_button_poll(), copy_driver_button_exec(), copy_driver_to_selected_button(), copy_to_selected_button(), datadropper_init(), datadropper_poll(), delete_key_button_exec(), depthdropper_init(), depthdropper_poll(), depthdropper_test(), driver_mapping_type_itemf(), driverdropper_init(), drivers_editor_show_exec(), edit_driver_button_exec(), eyedropper_init(), insert_key_button_exec(), jump_to_target_button(), override_add_button_exec(), override_add_button_poll(), override_remove_button_exec(), override_remove_button_poll(), paste_driver_button_exec(), remove_driver_button_exec(), remove_keyingset_button_exec(), reset_default_button_exec(), reset_default_button_poll(), screen_ctx_property(), unset_property_button_exec(), and view_curve_in_graph_editor_exec().

◆ 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_context_active_but_prop_get_templateID()

◆ UI_context_active_but_prop_handle()

◆ UI_context_active_operator_get()

wmOperator * UI_context_active_operator_get ( const bContext * C)

◆ UI_context_copy_to_selected_check()

◆ UI_context_copy_to_selected_list()

bool UI_context_copy_to_selected_list ( bContext * C,
PointerRNA * ptr,
PropertyRNA * prop,
blender::Vector< PointerRNA > * r_lb,
bool * r_use_path_from_id,
std::optional< std::string > * r_path )

◆ UI_context_update_anim_flag()

◆ ui_draw_dropshadow()

◆ UI_draw_icon_tri()

void UI_draw_icon_tri ( float x,
float y,
char dir,
const float color[4] )

Triangle 'icon' for panel header and other cases.

Definition at line 557 of file interface_widgets.cc.

References draw_anti_tria(), U, x, and y.

Referenced by draw_columnheader_columns(), and ui_draw_clip_tri().

◆ UI_draw_roundbox_3fv_alpha()

void UI_draw_roundbox_3fv_alpha ( const rctf * rect,
bool filled,
float rad,
const float col[3],
float alpha )

◆ UI_draw_roundbox_3ub_alpha()

void UI_draw_roundbox_3ub_alpha ( const rctf * rect,
bool filled,
float rad,
const unsigned char col[3],
unsigned char alpha )

◆ UI_draw_roundbox_4fv()

◆ UI_draw_roundbox_4fv_ex()

void UI_draw_roundbox_4fv_ex ( const rctf * rect,
const float inner1[4],
const float inner2[4],
float shade_dir,
const float outline[4],
float outline_width,
float rad )

◆ UI_draw_roundbox_aa()

◆ UI_draw_roundbox_corner_set()

void UI_draw_roundbox_corner_set ( int type)

Definition at line 53 of file interface_draw.cc.

References roundboxtype.

Referenced by acf_generic_root_backdrop(), acf_group_backdrop(), acf_nla_controls_backdrop(), acf_nlaaction_backdrop(), acf_summary_backdrop(), area_animate_highlight_cb(), draw_current_frame(), draw_keylist_block(), draw_keylist_block_gpencil(), blender::ed::space_node::draw_link_errors(), draw_scope_end(), draw_textscroll(), draw_tile_background(), ED_region_cache_draw_curfra_label(), ED_screen_draw_edges(), file_draw_list(), blender::ed::space_node::frame_node_draw_background(), gizmo_axis_draw(), nla_draw_strip(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_collapsed(), blender::ed::space_node::node_draw_extra_info_panel_back(), blender::ed::space_node::node_draw_link_end_marker(), blender::ed::space_node::node_draw_node_group_indicator(), blender::ed::space_node::node_draw_panels_background(), blender::ed::space_node::node_draw_preview(), blender::ed::space_node::node_draw_shadow(), blender::ed::outliner::outliner_draw_active_indicator(), blender::ed::outliner::outliner_draw_highlights(), panel_draw_aligned_backdrop(), panel_draw_border(), panel_draw_softshadow(), region_draw_azone_tab_arrow(), region_draw_status_text(), screen_draw_area_closed(), screen_draw_area_drag_tip(), screen_draw_dock_preview(), screen_draw_join_highlight(), screen_draw_move_highlight(), screen_draw_region_scale_highlight(), screen_draw_split_preview(), textview_draw_string(), ui_draw_but_HISTOGRAM(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_UNITVEC(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), ui_draw_button_sections_alignment_separator(), ui_draw_button_sections_background(), ui_draw_dialog_alert(), ui_draw_layout_panels_backdrop(), UI_fontstyle_draw_simple_backdrop(), UI_panel_category_draw_all(), vicon_rgb_color_draw(), and widget_softshadow().

◆ UI_draw_safe_areas()

void UI_draw_safe_areas ( uint pos,
const rctf * rect,
const float title_aspect[2],
const float action_aspect[2] )

Draw title and text safe areas.

Note
This function is to be used with the 2D dashed shader enabled.
Parameters
posis a #PRIM_FLOAT, 2, GPU_FETCH_FLOAT vertex attribute.
rectThe offsets for the view, not the zones.

Definition at line 390 of file interface_draw.cc.

References ARRAY_SIZE, i, imm_draw_box_wire_2d(), pos, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

Referenced by drawviewborder(), and blender::ed::vse::sequencer_draw_borders_overlay().

◆ UI_draw_text_underline()

void UI_draw_text_underline ( int pos_x,
int pos_y,
int len,
int height,
const float color[4] )

◆ UI_draw_widget_scroll()

◆ UI_drop_color_copy()

◆ UI_drop_color_poll()

◆ UI_editsource_active_but_test()

void UI_editsource_active_but_test ( uiBut * but)

Referenced by ui_def_but().

◆ UI_editsource_but_replace()

void UI_editsource_but_replace ( const uiBut * old_but,
uiBut * new_but )

Remove the editsource data for old_but and reinsert it for new_but. Use when the button was reallocated, e.g. to have a new type (ui_but_change_type()).

References C.

Referenced by ui_but_change_type().

◆ UI_editsource_enable_check()

bool UI_editsource_enable_check ( )

Referenced by ui_but_change_type(), and ui_def_but().

◆ UI_exit()

void UI_exit ( )

Definition at line 7087 of file interface.cc.

References ui_but_clipboard_free(), and ui_resources_free().

Referenced by WM_exit_ex().

◆ UI_fontstyle_draw()

void UI_fontstyle_draw ( const uiFontStyle * fs,
const rcti * rect,
const char * str,
size_t str_len,
const uchar col[4],
const uiFontStyleDraw_Params * fs_params )

◆ UI_fontstyle_draw_ex()

◆ UI_fontstyle_draw_multiline_clipped()

void UI_fontstyle_draw_multiline_clipped ( const uiFontStyle * fs,
const rcti * rect,
const char * str,
const uchar col[4],
eFontStyle_Align align )

Draws text with wrapping and shortening using "..." so that it fits into the given rectangle.

Definition at line 301 of file interface_style.cc.

References col, str, and UI_fontstyle_draw_multiline_clipped_ex().

Referenced by file_draw_string_mulitline_clipped().

◆ UI_fontstyle_draw_multiline_clipped_ex()

◆ UI_fontstyle_draw_rotated()

◆ UI_fontstyle_draw_simple()

void UI_fontstyle_draw_simple ( const uiFontStyle * fs,
float x,
float y,
const char * str,
const uchar col[4] )

Similar to UI_fontstyle_draw but ignore alignment, shadow & no clipping rect.

For drawing on-screen labels.

Definition at line 369 of file interface_style.cc.

References BLF_color4ubv(), BLF_draw(), BLF_DRAW_STR_DUMMY_MAX, BLF_position(), col, str, UI_fontstyle_set(), uiFontStyle::uifont_id, x, and y.

Referenced by ANIM_channel_draw(), draw_current_frame(), file_draw_list(), blender::ed::outliner::outliner_draw_tree_element(), and wm_drag_draw_item_name().

◆ UI_fontstyle_draw_simple_backdrop()

◆ UI_fontstyle_height_max()

int UI_fontstyle_height_max ( const uiFontStyle * fs)

◆ UI_fontstyle_set()

◆ UI_fontstyle_string_width()

◆ UI_fontstyle_string_width_with_block_aspect()

int int UI_fontstyle_string_width_with_block_aspect ( const uiFontStyle * fs,
blender::StringRef str,
float aspect )

Return the width of str with the spacing & kerning of fs with aspect (representing uiBlock.aspect) applied.

When calculating text width, the UI layout logic calculate widths without scale, only applying scale when drawing. This causes problems for fonts since kerning at smaller sizes often makes them wider than a scaled down version of the larger text. Resolve this by calculating the text at the on-screen size, returning the result scaled back to 1:1. See #92361.

Definition at line 454 of file interface_style.cc.

References BLF_width(), fontstyle_set_ex(), str, UI_SCALE_FAC, and uiFontStyle::uifont_id.

Referenced by ui_text_icon_width_ex().

◆ UI_icon_colorid_from_report_type()

int UI_icon_colorid_from_report_type ( int type)

◆ UI_icon_from_event_type()

◆ UI_icon_from_id()

int UI_icon_from_id ( const ID * id)

◆ UI_icon_from_keymap_item()

◆ UI_icon_from_report_type()

int UI_icon_from_report_type ( int type)

◆ UI_init()

void UI_init ( )

Definition at line 7057 of file interface.cc.

References ui_resources_init().

Referenced by WM_init().

◆ UI_init_userdef()

void UI_init_userdef ( )

Definition at line 7062 of file interface.cc.

References uiStyleInit().

Referenced by wm_init_userdef().

◆ UI_interface_tag_script_reload()

void UI_interface_tag_script_reload ( )

Definition at line 7093 of file interface.cc.

References ui_interface_tag_script_reload_queries().

Referenced by WM_script_tag_reload().

◆ UI_list_find_mouse_over()

uiList * UI_list_find_mouse_over ( const ARegion * region,
const wmEvent * event )

◆ UI_list_item_index_is_filtered_visible()

bool UI_list_item_index_is_filtered_visible ( const struct uiList * ui_list,
int item_idx )
Returns
: True if the list item with unfiltered, unordered index item_idx is visible given the current filter settings.

Referenced by ui_handle_list_event().

◆ UI_list_panel_unique_str()

void UI_list_panel_unique_str ( Panel * panel,
char * r_name )

Find a unique key to append to the PanelType.idname for the lookup to the panel's uiBlock. Needed for instanced panels, where there can be multiple with the same type and identifier.

Definition at line 281 of file interface_panel.cc.

References BLI_snprintf_utf8(), INSTANCED_PANEL_UNIQUE_STR_SIZE, and Panel::sortorder.

Referenced by ED_region_panels_layout_ex().

◆ UI_panel_add_instanced()

Panel * UI_panel_add_instanced ( const bContext * C,
ARegion * region,
ListBase * panels,
const char * panel_idname,
PointerRNA * custom_data )

◆ UI_panel_begin()

◆ UI_panel_can_be_pinned()

bool UI_panel_can_be_pinned ( const Panel * panel)

◆ UI_panel_category_active_find()

PanelCategoryStack * UI_panel_category_active_find ( ARegion * region,
const char * idname )

◆ UI_panel_category_active_get()

◆ UI_panel_category_active_set()

void UI_panel_category_active_set ( ARegion * region,
const char * idname )

◆ UI_panel_category_active_set_default()

void UI_panel_category_active_set_default ( ARegion * region,
const char * idname )

◆ UI_panel_category_add()

void UI_panel_category_add ( ARegion * region,
const char * name )

◆ UI_panel_category_clear_all()

void UI_panel_category_clear_all ( ARegion * region)

Definition at line 2520 of file interface_panel.cc.

References BLI_freelistN(), and ARegion::runtime.

Referenced by region_panels_collect_categories().

◆ UI_panel_category_draw_all()

void UI_panel_category_draw_all ( ARegion * region,
const char * category_id_active )

Draw vertical tabs on the left side of the region, one tab per category.

Definition at line 1407 of file interface_panel.cc.

References ARegion::alignment, BLF_color3ubv(), BLF_disable(), BLF_draw(), BLF_DRAW_STR_DUMMY_MAX, BLF_enable(), BLF_position(), BLF_ROTATION, BLF_rotation(), BLF_SHADOW, BLF_shadow(), BLF_shadow_offset(), BLF_size(), BLF_width(), BLI_assert, BLI_listbase_is_empty(), BLI_rcti_size_x(), BLI_rcti_size_y(), ARegion::category_scroll, clamp_i(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IFACE_, immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor3fvAlpha(), immUniformColor3ubv(), immUniformColor4fv(), immUniformColor4ubv(), immVertexFormat(), is_left(), LISTBASE_FOREACH, M_PI_2, View2D::mask, max_ii(), ARegion::overlap, uiFontStyle::points, pos, ARegion::regiontype, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_RIGHT, RGN_TYPE_HAS_CATEGORY_MASK, round_fl_to_int(), roundboxtype, uiWidgetColors::roundness, ARegion::runtime, uiFontStyle::shadow, uiFontStyle::shadowalpha, uiFontStyle::shadowcolor, uiFontStyle::shadx, uiFontStyle::shady, STREQ, TABS_PADDING_BETWEEN_FACTOR, TABS_PADDING_TEXT_FACTOR, TH_BACK, TH_TAB_ACTIVE, TH_TAB_BACK, TH_TAB_INACTIVE, TH_TAB_OUTLINE, TH_TAB_OUTLINE_ACTIVE, TH_TAB_TEXT, TH_TAB_TEXT_HI, bTheme::tui, U, UI_CNR_ALL, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), ui_fontscale(), UI_fontstyle_set(), UI_GetTheme(), UI_GetThemeColor3ubv(), UI_GetThemeColor4fv(), UI_GetThemeColor4ubv(), UI_panel_category_is_visible(), UI_PANEL_CATEGORY_MARGIN_WIDTH, UI_PANEL_CATEGORY_MIN_WIDTH, UI_SCALE_FAC, UI_style_get(), uiFontStyle::uifont_id, ARegion::v2d, ThemeUI::wcol_tab, uiStyle::widget, ARegion::winrct, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.

Referenced by ED_region_panels_draw().

◆ UI_panel_category_find()

PanelCategoryDyn * UI_panel_category_find ( const ARegion * region,
const char * idname )

◆ UI_panel_category_index_active_set()

void UI_panel_category_index_active_set ( ARegion * region,
const int index )
Parameters
indexindex of item in #ARegion.panels_category list.

Definition at line 2461 of file interface_panel.cc.

References BLI_findlink(), PanelCategoryDyn::idname, ARegion::runtime, and ui_panel_category_active_set().

◆ UI_panel_category_index_find()

int UI_panel_category_index_find ( ARegion * region,
const char * idname )

Definition at line 2404 of file interface_panel.cc.

References BLI_findstringindex(), offsetof, and ARegion::runtime.

◆ UI_panel_category_is_visible()

◆ UI_panel_context_pointer_set()

void UI_panel_context_pointer_set ( Panel * panel,
const char * name,
PointerRNA * ptr )

Set a context for this entire panel and its current layout. This should be used whenever panel callbacks that are called outside of regular drawing might require context. Currently it affects the PanelType.reorder callback only.

Definition at line 2743 of file interface_panel.cc.

References Panel_Runtime::context, uiLayout::context_ptr_set(), uiLayout::context_store(), Panel::layout, name, ptr, and Panel::runtime.

Referenced by draw_constraint_header(), modifier_panel_get_property_pointers(), blender::seq::modifier_panel_header(), modifier_panel_header(), and shaderfx_panel_get_property_pointers().

◆ UI_panel_custom_data_get()

PointerRNA * UI_panel_custom_data_get ( const Panel * panel)

◆ UI_panel_custom_data_set()

◆ UI_panel_drawname_set()

void UI_panel_drawname_set ( Panel * panel,
blender::StringRef name )

Set the name that should be drawn in the UI. Should be a translated string.

Definition at line 857 of file interface_panel.cc.

References BLI_strdupn(), Panel::drawname, MEM_SAFE_FREE, and name.

Referenced by file_panel_operator_header(), hud_panel_operator_redo_draw_header(), and UI_panel_begin().

◆ UI_panel_end()

void UI_panel_end ( Panel * panel,
int width,
int height )

Definition at line 849 of file interface_panel.cc.

References Panel::blocksizex, and Panel::blocksizey.

Referenced by ed_panel_draw().

◆ UI_panel_find_by_type()

Panel * UI_panel_find_by_type ( ListBase * lb,
const PanelType * pt )

◆ UI_panel_header_buttons_begin()

void UI_panel_header_buttons_begin ( Panel * panel)

Create the panel header button group, used to mark which buttons are part of panel headers for the panel search process that happens later. This Should be called before adding buttons for the panel's header layout.

Definition at line 759 of file interface_panel.cc.

References Panel_Runtime::block, Panel::runtime, ui_block_new_button_group(), UI_BUTTON_GROUP_LOCK, and UI_BUTTON_GROUP_PANEL_HEADER.

Referenced by ed_panel_draw().

◆ UI_panel_header_buttons_end()

◆ UI_panel_is_active()

◆ UI_panel_is_closed()

◆ UI_panel_is_dragging()

bool UI_panel_is_dragging ( const Panel * panel)

◆ UI_panel_label_offset()

void UI_panel_label_offset ( const uiBlock * block,
int * r_x,
int * r_y )

For button layout next to label.

Definition at line 1037 of file interface_panel.cc.

References uiBlock::panel, PanelType::parent, Panel::type, UI_UNIT_X, and UI_UNIT_Y.

Referenced by ed_panel_draw().

◆ UI_panel_list_matches_data()

bool UI_panel_list_matches_data ( ARegion * region,
ListBase * data,
uiListPanelIDFromDataFunc panel_idname_func )

Check if the instanced panels in the region's panels correspond to the list of data the panels represent. Returns false if the panels have been reordered or if the types from the list data don't match in any way.

Parameters
dataThe list of data to check against the instanced panels.
panel_idname_funcFunction to find the PanelType.idname for each item in the data list. For a readability and generality, this lookup happens separately for each type of panel list.

Definition at line 332 of file interface_panel.cc.

References BLI_listbase_count(), data, i, LISTBASE_FOREACH, MAX_NAME, Link::next, PANEL_TYPE_INSTANCED, ARegion::panels, PNL_INSTANCED_LIST_ORDER_CHANGED, and STREQ.

Referenced by ANIM_fmodifier_panels(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), uiTemplateModifiers(), uiTemplateShaderFx(), and uiTemplateStripModifiers().

◆ UI_panel_matches_search_filter()

bool UI_panel_matches_search_filter ( const Panel * panel)

Find whether a panel or any of its sub-panels contain a property that matches the search filter, depending on the search process running in UI_block_apply_search_filter earlier.

Definition at line 899 of file interface_panel.cc.

References panel_matches_search_filter_recursive().

Referenced by buttons_main_region_property_search(), panel_draw_aligned_backdrop(), panel_title_color_get(), and UI_panel_is_closed().

◆ UI_panel_should_show_background()

◆ UI_panel_size_y()

int UI_panel_size_y ( const Panel * panel)

Definition at line 1711 of file interface_panel.cc.

References get_panel_real_size_y().

Referenced by ED_region_panels_layout_ex().

◆ UI_panel_stop_animation()

void UI_panel_stop_animation ( const bContext * C,
Panel * panel )

Definition at line 2927 of file interface_panel.cc.

References Panel::activedata, C, panel_activate_state(), and PANEL_STATE_EXIT.

Referenced by ED_region_exit().

◆ UI_panels_begin()

void UI_panels_begin ( const bContext * C,
ARegion * region )

Definition at line 1993 of file interface_panel.cc.

References ARegion::panels, and panels_layout_begin_clear_flags().

Referenced by ED_region_panels_layout_ex().

◆ UI_panels_draw()

void UI_panels_draw ( const bContext * C,
ARegion * region )

Draw panels, selected (panels currently being dragged) on top.

Definition at line 1014 of file interface_panel.cc.

References C, LISTBASE_FOREACH_BACKWARD, ARegion::runtime, UI_block_draw(), UI_block_is_search_only(), and UI_panel_is_dragging().

Referenced by ED_region_panels_draw().

◆ UI_panels_end()

◆ UI_panels_free_instanced()

void UI_panels_free_instanced ( const bContext * C,
ARegion * region )

Remove instanced panels from the region's panel list.

Note
Can be called with NULL C, but it should be avoided because handlers might not be removed.

Definition at line 307 of file interface_panel.cc.

References C, LISTBASE_FOREACH_MUTABLE, panel_activate_state(), panel_delete(), PANEL_STATE_EXIT, PANEL_TYPE_INSTANCED, and ARegion::panels.

Referenced by ANIM_fmodifier_panels(), ED_region_property_search(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), uiTemplateModifiers(), uiTemplateShaderFx(), and uiTemplateStripModifiers().

◆ UI_pie_menu_begin()

◆ UI_pie_menu_end()

◆ UI_pie_menu_invoke()

◆ UI_pie_menu_layout()

uiLayout * UI_pie_menu_layout ( uiPieMenu * pie)

Definition at line 188 of file interface_region_menu_pie.cc.

References uiPieMenu::layout.

Referenced by UI_pie_menu_invoke(), and ui_pie_menu_level_invoke().

◆ UI_popover_begin()

uiPopover * UI_popover_begin ( bContext * C,
int ui_menu_width,
bool from_active_button )

Only return handler, and set optional title.

Parameters
from_active_buttonUse the active button for positioning, use when the popover is activated from an operator instead of directly from the button.

Definition at line 356 of file interface_region_popover.cc.

References uiPopover::block, uiPopover::but, uiPopover::butregion, C, CTX_wm_region(), blender::wm::ExecRegionWin, uiBlock::handle, U, ui_popover_create_block(), UI_POPOVER_WIDTH_UNITS, UI_region_active_but_get(), and uiPopover::ui_size_x.

Referenced by UI_popover_panel_invoke().

◆ UI_popover_end()

◆ UI_popover_layout()

uiLayout * UI_popover_layout ( uiPopover * pup)

Definition at line 436 of file interface_region_popover.cc.

References uiPopover::layout.

Referenced by UI_popover_panel_invoke().

◆ UI_popover_once_clear()

void UI_popover_once_clear ( uiPopover * pup)

References C.

Referenced by ui_handle_menu_event().

◆ UI_popover_panel_invoke()

◆ UI_popup_block_close()

◆ UI_popup_block_ex()

◆ UI_popup_block_invoke()

◆ UI_popup_block_invoke_ex()

void UI_popup_block_invoke_ex ( bContext * C,
uiBlockCreateFunc func,
void * arg,
uiFreeArgFunc arg_free,
bool can_refresh )
Parameters
can_refreshWhen true, the popup may be refreshed (updated after creation).
Note
It can be useful to disable refresh (even though it will work) as this exits text fields which can be disruptive if refresh isn't needed.

Definition at line 676 of file interface_region_menu_popup.cc.

References C, CTX_wm_window(), wmWindow::modalhandlers, uiPopupBlockHandle::popup, uiPopupBlockHandle::region, ARegion::runtime, status, UI_block_active_only_flagged_buttons(), ui_popup_block_create(), UI_popup_handlers_add(), and WM_event_add_mousemove().

Referenced by blender::ed::space_node::invoke_node_link_drag_add_menu(), text_insert_unicode_invoke(), UI_popup_block_invoke(), WM_enum_search_invoke(), and wm_search_menu_invoke().

◆ UI_popup_block_name_exists()

bool UI_popup_block_name_exists ( const bScreen * screen,
blender::StringRef name )

◆ UI_popup_block_template_confirm()

void UI_popup_block_template_confirm ( uiBlock * block,
bool cancel_default,
blender::FunctionRef< uiBut *()> confirm_fn,
blender::FunctionRef< uiBut *()> cancel_fn )

◆ UI_popup_block_template_confirm_is_supported()

bool UI_popup_block_template_confirm_is_supported ( const uiBlock * block)

Return true when UI_popup_block_template_confirm and related functions are supported.

Definition at line 750 of file interface_region_menu_popup.cc.

References uiBlock::flag, UI_BLOCK_KEEP_OPEN, and UI_BLOCK_POPOVER.

◆ UI_popup_block_template_confirm_op()

void UI_popup_block_template_confirm_op ( uiLayout * layout,
wmOperatorType * ot,
std::optional< blender::StringRef > confirm_text,
std::optional< blender::StringRef > cancel_text,
const int icon,
bool cancel_default,
PointerRNA * r_ptr )

Create confirm & cancel buttons in a popup using an operator.

Parameters
confirm_textThe text to confirm, null for default text or an empty string to hide.
cancel_textThe text to cancel, null for default text or an empty string to hide.
r_ptrThe pointer for operator properties, set a "confirm" button has been created.

Definition at line 793 of file interface_region_menu_popup.cc.

References uiLayout::block(), But, uiBlock::buttons, IFACE_, blender::StringRefBase::is_empty(), Vector< T, InlineBufferCapacity, Allocator >::is_empty(), Vector< T, InlineBufferCapacity, Allocator >::last(), uiBlock::last_but(), uiLayout::op(), uiLayout::operator_context(), ot, uiLayout::split(), UI_ITEM_NONE, UI_popup_block_template_confirm(), UI_UNIT_X, UI_UNIT_Y, and uiDefIconTextBut().

◆ UI_popup_dummy_panel_set()

void UI_popup_dummy_panel_set ( ARegion * region,
uiBlock * block )

Set a dummy panel in the popup block to support using layout panels, the panel is linked to the popup region so layout panels state can be persistent until the popup is closed.

Definition at line 610 of file interface_region_popup.cc.

References BKE_panel_new(), Panel_Runtime::block, LayoutPanels::clear(), PanelType::flag, Panel_Runtime::layout_panels, uiBlock::panel, PANEL_TYPE_NO_HEADER, ARegion::runtime, and Panel::runtime.

Referenced by ui_alert_create(), ui_paneltype_draw_impl(), wm_block_create_redo(), wm_block_dialog_create(), and wm_operator_ui_create().

◆ UI_popup_handlers_add()

◆ UI_popup_handlers_remove()

◆ UI_popup_handlers_remove_all()

void UI_popup_handlers_remove_all ( bContext * C,
ListBase * handlers )

◆ UI_popup_menu_begin()

◆ UI_popup_menu_begin_ex()

uiPopupMenu * UI_popup_menu_begin_ex ( bContext * C,
const char * title,
const char * block_name,
int icon )

Directly create a popup menu that is not refreshed on redraw.

Only return handler, and set optional title.

Parameters
block_nameAssigned to uiBlock.name (useful info for debugging).

Definition at line 475 of file interface_region_menu_popup.cc.

References uiPopupMenu::block, C, create_title_button(), uiBlock::handle, uiPopupMenu::layout, uiPopupMenu::title, and ui_popup_menu_create_block().

Referenced by UI_popup_menu_begin(), and UI_popup_menu_reports().

◆ UI_popup_menu_but_set()

void UI_popup_menu_but_set ( uiPopupMenu * pup,
ARegion * butregion,
uiBut * but )

Setting the button makes the popup open from the button instead of the cursor.

Definition at line 501 of file interface_region_menu_popup.cc.

References uiPopupMenu::but, and uiPopupMenu::butregion.

Referenced by ui_item_menu_hold().

◆ UI_popup_menu_close()

wmOperatorStatus void UI_popup_menu_close ( const uiBlock * block,
bool is_cancel = false )

If block is displayed in a popup menu, tag it for closing.

Parameters
is_cancelIf set to true, the popup will be closed as being cancelled (e.g. when pressing escape) as opposed to being handled successfully.

Definition at line 908 of file interface_region_menu_popup.cc.

References UI_popup_menu_retval_set(), UI_RETURN_CANCEL, and UI_RETURN_OK.

Referenced by UI_popup_menu_close_from_but().

◆ UI_popup_menu_close_from_but()

void UI_popup_menu_close_from_but ( const uiBut * but,
bool is_cancel = false )

Version of UI_popup_menu_close() that can be called on a button contained in a popup menu block. Convenience since the block may not be available.

Definition at line 913 of file interface_region_menu_popup.cc.

References uiBut::block, and UI_popup_menu_close().

Referenced by force_activate_view_item_but().

◆ UI_popup_menu_end()

void UI_popup_menu_end ( bContext * C,
uiPopupMenu * pup )

Set the whole structure to work.

Definition at line 507 of file interface_region_menu_popup.cc.

References uiPopupMenu::but, uiPopupMenu::butregion, C, CTX_wm_window(), wmWindow::eventstate, wmWindow::modalhandlers, uiPopupMenu::mx, uiPopupMenu::my, uiPopupBlockHandle::popup, uiPopupMenu::popup, ui_block_func_POPUP(), ui_popup_block_create(), UI_popup_handlers_add(), WM_event_add_mousemove(), and wmEvent::xy.

Referenced by armature_parent_clear_invoke(), armature_parent_set_invoke(), context_menu_invoke(), driver_dvar_invalid_name_query_cb(), insert_key_menu_invoke(), keyingset_active_menu_invoke(), move_to_collection_regular_invoke(), blender::ed::space_node::node_group_separate_invoke(), blender::ed::object::object_hide_collection_invoke(), blender::ed::outliner::outliner_operator_menu(), blender::ed::object::parent_set_invoke_menu(), blender::ed::object::pose_ik_add_invoke(), repeat_history_invoke(), screen_area_options_invoke(), screen_area_touch_menu_create(), screen_context_menu_invoke(), blender::ed::object::select_grouped_collection(), blender::ed::transform::select_orientation_invoke(), text_resolve_conflict_invoke(), toggle_cyclic_invoke(), ui_item_menu_hold(), ui_popup_context_menu_for_panel(), UI_popup_menu_end_or_cancel(), UI_popup_menu_invoke(), UI_popup_menu_reports(), unpack_all_invoke(), unpack_item_invoke(), unpack_menu(), blender::ed::object::bake_simulation::unpack_single_bake_invoke(), uv_mark_seam_invoke(), weight_sample_group_invoke(), wm_drop_import_file_invoke(), WM_menu_invoke_ex(), and workspace_add_invoke().

◆ UI_popup_menu_end_or_cancel()

◆ UI_popup_menu_invoke()

wmOperatorStatus UI_popup_menu_invoke ( bContext * C,
const char * idname,
ReportList * reports )

References C.

Referenced by wm_call_menu_exec().

◆ UI_popup_menu_layout()

◆ UI_popup_menu_reports()

◆ UI_popup_menu_retval_set()

void UI_popup_menu_retval_set ( const uiBlock * block,
int retval,
bool enable )

Allow setting menu return value from externals. E.g. WM might need to do this for exiting files correctly.

Definition at line 11935 of file interface_handlers.cc.

References uiBlock::handle, and uiPopupBlockHandle::menuretval.

Referenced by dialog_cancel_cb(), dialog_exec_cb(), popup_block_template_close_cb(), ui_alert_ok_cb(), and UI_popup_menu_close().

◆ UI_preview_tile_size_x()

int UI_preview_tile_size_x ( const int size_px = 96)

Get the scaled size for a preview button (typically #UI_BTyPE_PREVIEW_TILE) based on size_px plus padding.

Definition at line 5241 of file interface.cc.

References pad, PREVIEW_TILE_PAD, round_fl_to_int(), and UI_UNIT_X.

Referenced by blender::ui::AbstractGridView::AbstractGridView(), blender::ed::asset::shelf::asset_shelf_default_tile_height(), blender::ed::asset::shelf::tile_width(), and ui_template_list_layout_draw().

◆ UI_preview_tile_size_y()

◆ UI_preview_tile_size_y_no_label()

int UI_preview_tile_size_y_no_label ( const int size_px = 96)

◆ UI_region_active_but_get()

◆ UI_region_active_but_prop_get()

uiBut * UI_region_active_but_prop_get ( const ARegion * region,
PointerRNA * r_ptr,
PropertyRNA ** r_prop,
int * r_index )

As above, but for a specified region.

Returns
active button, NULL if none found or if it doesn't contain valid RNA data.

Definition at line 9264 of file interface_handlers.cc.

References PointerRNA::data, uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, and UI_region_active_but_get().

Referenced by graph_panel_drivers_popover(), and UI_context_active_but_prop_get().

◆ UI_region_block_find_mouse_over()

uiBlock * UI_region_block_find_mouse_over ( const ARegion * region,
const int xy[2],
bool only_clip )

Definition at line 9259 of file interface_handlers.cc.

References ui_block_find_mouse_over_ex(), and xy.

Referenced by wm_handlers_do_gizmo_handler().

◆ UI_region_but_find_rect_over()

uiBut * UI_region_but_find_rect_over ( const ARegion * region,
const rcti * rect_px )

Definition at line 9254 of file interface_handlers.cc.

References ui_but_find_rect_over().

Referenced by ED_region_contains_xy().

◆ UI_region_button_sections_draw()

void UI_region_button_sections_draw ( const ARegion * region,
int colorid,
uiButtonSectionsAlign align )

Draw a background with rounded corners behind each visual group of buttons. The visual groups are separated by spacer buttons (uiLayout::separator_spacer()). Button groups that are closer than UI_BUTTON_SECTION_MERGE_DISTANCE will be merged into one visual section. If the group is closer than that to a region edge, it will also be extended to that, and the rounded corners will be removed on that edge.

Note
This currently only works well for horizontal, header like regions.

Definition at line 220 of file interface_button_sections.cc.

References BLI_rctf_size_x(), BLI_rcti_size_x(), button_section_bounds_calc(), View2D::cur, View2D::mask, None, ui_draw_button_sections_alignment_separator(), ui_draw_button_sections_background(), UI_SCALE_FAC, and ARegion::v2d.

Referenced by ED_region_header_draw_with_button_sections().

◆ UI_region_button_sections_is_inside_x()

bool UI_region_button_sections_is_inside_x ( const ARegion * region,
const int mval_x )

◆ UI_region_free_active_but_all()

void UI_region_free_active_but_all ( bContext * C,
ARegion * region )

◆ UI_region_handlers_add()

◆ UI_region_message_subscribe()

void UI_region_message_subscribe ( ARegion * region,
wmMsgBus * mbus )

◆ UI_region_panel_custom_data_under_cursor()

◆ UI_region_searchbox_region_get()

ARegion * UI_region_searchbox_region_get ( const ARegion * button_region)

Try to find a search-box region opened from a button in button_region.

Definition at line 9364 of file interface_handlers.cc.

References uiBut::active, uiHandleButtonData::searchbox, and UI_region_active_but_get().

Referenced by wm_searchbox_tooltip_init().

◆ UI_region_view_find_at()

blender::ui::AbstractView * UI_region_view_find_at ( const ARegion * region,
const int xy[2],
int pad )
Parameters
xyCoordinate to find a view item at, in window space.
padExtra padding added to the bounding box of the view.

Definition at line 200 of file interface_view.cc.

References BLI_rcti_isect_pt(), BLI_rcti_pad(), LISTBASE_FOREACH, pad, ARegion::runtime, ui_region_contains_point_px(), ui_window_to_block_fl(), and xy.

Referenced by get_view_focused(), blender::ui::region_views_find_drop_target_at(), select_operator_view_and_item_find_xy(), and ui_view_start_filter_invoke().

◆ UI_region_views_clear_search_highlight()

void UI_region_views_clear_search_highlight ( const ARegion * region)

Definition at line 257 of file interface_view.cc.

References LISTBASE_FOREACH, and ARegion::runtime.

Referenced by ui_handle_view_item_event().

◆ UI_region_views_find_active_item()

blender::ui::AbstractViewItem * UI_region_views_find_active_item ( const ARegion * region)

◆ UI_region_views_find_active_item_but()

uiBut * UI_region_views_find_active_item_but ( const ARegion * region)

Definition at line 252 of file interface_view.cc.

References ui_view_item_find_active().

Referenced by blender::ed::asset::shelf::context().

◆ UI_region_views_find_item_at()

blender::ui::AbstractViewItem * UI_region_views_find_item_at ( const ARegion & region,
const int xy[2] )
Parameters
xyCoordinate to find a view item at, in window space.

Definition at line 232 of file interface_view.cc.

References ui_view_item_find_mouse_over(), uiButViewItem::view_item, and xy.

Referenced by blender::ui::region_views_find_drop_target_at(), select_operator_view_and_item_find_xy(), and ui_view_item_select_invoke().

◆ UI_reinit_font()

void UI_reinit_font ( )

Definition at line 7068 of file interface.cc.

References uiStyleInit().

Referenced by reloadtranslation_exec().

◆ UI_screen_free_active_but_highlight()

void UI_screen_free_active_but_highlight ( const bContext * C,
bScreen * screen )

◆ UI_search_item_add()

bool UI_search_item_add ( uiSearchItems * items,
blender::StringRef name,
void * poin,
int iconid,
int but_flag,
uint8_t name_prefix_offset )

Public function exported for functions that use ButType::SearchMenu.

Use inside searchfunc to add items.

Parameters
itemsStores the items.
nameText to display for the item.
poinOpaque pointer (for use by the caller).
iconidThe icon, #ICON_NONE for no icon.
but_flagButton flags (uiBut.flag) indicating the state of the item, typically UI_BUT_DISABLED, UI_BUT_INACTIVE or UI_BUT_HAS_SEP_CHAR.
Returns
false if there is nothing to add.

Definition at line 104 of file interface_region_search.cc.

References uiSearchItems::active, uiSearchItems::autocpl, BLI_assert, uiSearchItems::but_flags, uiSearchItems::has_icon, uiSearchItems::icons, uiSearchItems::maxitem, uiSearchItems::maxstrlen, MEM_callocN(), uiSearchItems::more, name, uiSearchItems::name_prefix_offsets, uiSearchItems::names, uiSearchItems::offset_i, uiSearchItems::pointers, uiSearchItems::totitem, UI_autocomplete_update_name(), UI_BUT_DISABLED, UI_BUT_HAS_SEP_CHAR, UI_BUT_INACTIVE, and UI_BUT_REDALERT.

Referenced by add_collection_search_item(), blender::ui::attribute_search_add_items(), blender::ui::attribute_search_item_add(), blender::ui::grease_pencil_layer_search_add_items(), blender::ed::space_node::grid_search_item_add(), id_search_add(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::outliner::merged_element_search_fn_recursive(), blender::ed::space_node::node_find_update_fn(), operator_enum_search_update_fn(), operator_search_update_fn(), and blender::ed::space_node::volume_grid_search_add_items().

◆ UI_search_items_find_index()

int UI_search_items_find_index ( const uiSearchItems * items,
const char * name )

◆ UI_searchbox_size_x()

int UI_searchbox_size_x ( )

◆ UI_searchbox_size_x_guess()

int UI_searchbox_size_x_guess ( const bContext * C,
const uiButSearchUpdateFn update_fn,
void * arg )

Guess a good width for the search box based on the searchable items.

Note
When used with a menu that does full refreshes, it might be beneficial to cache this size because recomputing it is potentially expensive.

Definition at line 210 of file interface_region_search.cc.

References C, Array< T, InlineBufferCapacity, Allocator >::data(), i, uiSearchItems::icons, uiSearchItems::maxitem, uiSearchItems::maxstrlen, MEM_SAFE_FREE, uiSearchItems::name_prefix_offsets, uiSearchItems::names, and ui_searchbox_size_x_from_items().

Referenced by blender::ed::space_node::node_find_menu(), and template_common_search_menu().

◆ UI_searchbox_size_y()

◆ UI_style_get()

◆ UI_style_get_dpi()

const uiStyle * UI_style_get_dpi ( )

Read a style (with the current DPI applied).

Definition at line 421 of file interface_style.cc.

References uiStyle::boxspace, uiStyle::buttonspacex, uiStyle::buttonspacey, uiStyle::columnspace, uiStyle::grouplabel, uiStyle::panelouter, uiStyle::panelspace, uiStyle::paneltitle, uiFontStyle::shadx, uiFontStyle::shady, uiStyle::templatespace, uiStyle::tooltip, UI_SCALE_FAC, UI_style_get(), and uiStyle::widget.

Referenced by blender::ed::asset::shelf::add_tab_button(), block_create_autorun_warning(), button_section_bounds_calc(), colorband_tools_fn(), blender::ed::space_node::draw_tree_path(), ed_panel_draw(), ED_region_header_layout(), ED_region_image_metadata_draw(), ED_region_info_draw_multiline(), ED_region_property_search(), ED_time_scrub_channel_search_draw(), blender::ed::spreadsheet::get_index_column_width(), blender::ed::asset::shelf::main_region_padding_y(), 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(), blender::ui::padded_item_height(), blender::ed::asset::shelf::region_layout(), blender::ui::region_views_find_drop_target_at(), uiLayoutItemPanelBody::resolve_impl(), uiLayoutItemPanelHeader::resolve_impl(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), template_ID_tabs(), blender::ed::vse::text_size_get(), ui_alert_create(), UI_block_draw(), ui_offset_panel_block(), UI_pie_menu_begin(), ui_popover_create_block(), ui_popover_panel_create(), ui_popup_menu_create_block(), uiItemsAlertBox(), blender::ed::outliner::unused_message_popup_width_compute(), 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_style_init_default()

void UI_style_init_default ( )

Definition at line 1118 of file resources.cc.

References BLI_freelistN(), U, and uiStyleInit().

Referenced by preferences_reset_default_theme_exec().

◆ UI_text_clip_middle_ex()

float UI_text_clip_middle_ex ( const uiFontStyle * fstyle,
char * str,
float okwidth,
float minwidth,
size_t max_len,
char rpart_sep,
bool clip_right_if_tight = true )

Shortening string helper.

Cut off the middle of the text to fit into the given width.

If rpart_sep is not null, the part of str starting to first occurrence of rpart_sep is preserved at all cost. Useful for strings with shortcuts (like A Very Long Foo Bar Label For Menu Entry|Ctrl O' -> 'AVeryLong...MenuEntry|Ctrl O).

Parameters
clip_right_if_tightIn case this middle clipping would just remove a few chars, or there are less than 10 characters before the clipping, it rather clips right, which is more readable.

Definition at line 1529 of file interface_widgets.cc.

References BLF_width(), BLF_width_to_rstrlen(), BLF_width_to_strlen(), BLI_assert, BLI_STR_UTF8_HORIZONTAL_ELLIPSIS, BLI_str_utf8_invalid_byte(), min_ff(), str, STRNCPY(), UI_fontstyle_set(), UI_MAX_DRAW_STR, ui_text_clip_right_ex(), uiFontStyle::uifont_id, and UNUSED_VARS_NDEBUG.

Referenced by file_draw_string(), ui_draw_menu_item(), ui_draw_preview_item_stateless(), ui_text_clip_middle(), ui_text_clip_middle_protect_right(), and UI_text_clip_multiline_middle().

◆ UI_text_clip_multiline_middle()

◆ UI_text_colorid_from_report_type()

◆ UI_textbutton_activate_but()

bool UI_textbutton_activate_but ( const bContext * C,
uiBut * actbut )

◆ UI_textbutton_activate_rna()

◆ UI_theme_init_default()

void UI_theme_init_default ( )

Initialize default theme.

Note
When you add new colors, created & saved themes need initialized use function below, #init_userdef_do_versions.

Definition at line 1097 of file resources.cc.

References bTheme::active_theme_area, BLI_addhead(), BLI_findstring(), BLI_listbase_rotate_first(), MEM_callocN(), MEMCPY_STRUCT_AFTER, bTheme::name, name, offsetof, STRNCPY_UTF8, U, U_theme_default, and UI_SetTheme().

Referenced by preferences_reset_default_theme_exec().

◆ UI_tooltip_color_field_add()

◆ UI_tooltip_create_from_button()

ARegion * UI_tooltip_create_from_button ( bContext * C,
ARegion * butregion,
uiBut * but,
bool is_quick_tip )
Parameters
is_quick_tipSee UI_but_func_quick_tooltip_set for what a quick tooltip is.

Definition at line 1714 of file interface_region_tooltip.cc.

References C, and UI_tooltip_create_from_button_or_extra_icon().

Referenced by ui_search_menu_create_tooltip().

◆ UI_tooltip_create_from_button_or_extra_icon()

◆ UI_tooltip_create_from_gizmo()

◆ UI_tooltip_create_from_search_item_generic()

ARegion * UI_tooltip_create_from_search_item_generic ( bContext * C,
const ARegion * searchbox_region,
const rcti * item_rect,
ID * id )

Create a tooltip from search-item tooltip data item_tooltip data. To be called from a callback set with UI_but_func_search_set_tooltip().

Parameters
item_rectRectangle of the search item in search region space (ui_searchbox_butrect()) which is passed to the tooltip callback.

Definition at line 1957 of file interface_region_tooltip.cc.

References C, CTX_wm_window(), data, wmWindow::eventstate, UI_POPUP_MARGIN, ui_tooltip_create_with_data(), ui_tooltip_data_from_search_item_tooltip_data(), ARegion::winrct, wmEvent::xy, and rcti::ymin.

Referenced by template_ID_search_menu_item_tooltip().

◆ UI_tooltip_free()

void UI_tooltip_free ( bContext * C,
bScreen * screen,
ARegion * region )

Definition at line 1975 of file interface_region_tooltip.cc.

References C, and ui_region_temp_remove().

Referenced by WM_tooltip_clear(), WM_tooltip_init(), and WM_tooltip_refresh().

◆ UI_tooltip_image_field_add()

void UI_tooltip_image_field_add ( uiTooltipData & data,
const uiTooltipImage & image_data )
Parameters
imageImage buffer (duplicated, ownership is not transferred to data).
image_sizeDisplay size for the image (pixels without UI scale applied).

Definition at line 142 of file interface_region_tooltip.cc.

References data, uiTooltipField::format, uiTooltipImage::ibuf, uiTooltipField::image, IMB_dupImBuf(), uiTooltipFormat::style, and UI_TIP_STYLE_IMAGE.

Referenced by file_draw_tooltip_custom_func(), UI_tooltip_color_field_add(), ui_tooltip_from_clip(), ui_tooltip_from_image(), ui_tooltip_from_vfont(), and uiTemplateRecentFiles_tooltip_func().

◆ UI_tooltip_text_field_add()

◆ UI_tooltip_uibut_python_add()

◆ UI_update_text_styles()

◆ UI_view_item_begin_rename()

void UI_view_item_begin_rename ( blender::ui::AbstractViewItem & item)

◆ UI_view_item_can_rename()

bool UI_view_item_can_rename ( const blender::ui::AbstractViewItem & item)

Can item be renamed right now? Note that this isn't just a mere wrapper around #AbstractViewItem::supports_renaming(). This also checks if there is another item being renamed, and returns false if so.

Definition at line 444 of file abstract_view_item.cc.

References blender::ui::AbstractViewItem::get_view(), blender::ui::AbstractViewItem::supports_renaming(), and view.

Referenced by ui_do_but_VIEW_ITEM(), and ui_view_item_rename_poll().

◆ UI_view_item_drag_start()

bool UI_view_item_drag_start ( bContext & C,
blender::ui::AbstractViewItem & item )

Attempt to start dragging item_. This will not work if the view item doesn't support dragging, i.e. if it won't create a drag-controller upon request.

Returns
True if dragging started successfully, otherwise false.

Definition at line 465 of file abstract_view_item.cc.

References C, blender::ui::AbstractViewItem::create_drag_controller(), blender::ui::AbstractViewItem::set_state_active(), WM_DRAG_FREE_DATA, and WM_event_start_drag().

Referenced by ui_but_drag_init().

◆ UI_view_item_matches()

◆ UI_view_item_popup_keep_open()

bool UI_view_item_popup_keep_open ( const blender::ui::AbstractViewItem & item)

If this view is displayed in a popup, don't close it when clicking to activate items.

Definition at line 460 of file abstract_view_item.cc.

References blender::ui::AbstractView::get_popup_keep_open(), and blender::ui::AbstractViewItem::get_view().

Referenced by force_activate_view_item_but().

◆ UI_view_item_supports_drag()

bool UI_view_item_supports_drag ( const blender::ui::AbstractViewItem & item)

◆ UI_widgetbase_draw_cache_begin()

void UI_widgetbase_draw_cache_begin ( )

Definition at line 1103 of file interface_widgets.cc.

References BLI_assert, and g_widget_base_batch.

Referenced by UI_block_draw().

◆ UI_widgetbase_draw_cache_end()

void UI_widgetbase_draw_cache_end ( )

◆ UI_widgetbase_draw_cache_flush()

◆ uiDefAutoButR()

◆ uiDefAutoButsArrayR()

void uiDefAutoButsArrayR ( uiBlock * block,
PointerRNA * ptr,
PropertyRNA * prop,
const int icon,
const int x,
const int y,
const int tot_width,
const int height )

◆ uiDefAutoButsRNA()

eAutoPropButsReturn uiDefAutoButsRNA ( uiLayout * layout,
PointerRNA * ptr,
bool(* check_prop )(PointerRNA *ptr, PropertyRNA *prop, void *user_data),
void * user_data,
PropertyRNA * prop_activate_init,
eButLabelAlign label_align,
bool compact )

◆ uiDefBlockBut()

uiBut * uiDefBlockBut ( uiBlock * block,
uiBlockCreateFunc func,
void * arg,
blender::StringRef str,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefBlockButN()

uiBut * uiDefBlockButN ( uiBlock * block,
uiBlockCreateFunc func,
void * argN,
blender::StringRef str,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip,
uiButArgNFree func_argN_free_fn = MEM_freeN,
uiButArgNCopy func_argN_copy_fn = MEM_dupallocN )

◆ uiDefBut()

uiBut * uiDefBut ( uiBlock * block,
uiButTypeWithPointerType but_and_ptr_type,
int retval,
blender::StringRef str,
int x,
int y,
short width,
short height,
void * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

Definition at line 5069 of file interface.cc.

References max, min, str, ui_but_update(), ui_def_but(), x, and y.

Referenced by blender::ui::AbstractViewItem::add_rename_button(), blender::ed::asset::shelf::add_tab_button(), blender::ui::TreeViewLayoutBuilder::build_from_tree(), blender::ui::PreviewGridItem::build_grid_tile_button(), blender::ui::TreeViewLayoutBuilder::build_row(), colorband_buttons_layout(), blender::ed::space_node::create_search_popup_block(), create_title_button(), curvemap_buttons_layout(), CurveProfile_buttons_layout(), blender::ed::vse::draw_channel_labels(), envelope_panel_draw(), file_add_preview_drag_but(), file_draw_list(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_collapsed(), blender::ed::space_node::node_draw_extra_info_row(), blender::ed::space_node::node_draw_panels(), blender::ed::space_node::node_find_menu(), uiLayout::op_enum_items(), blender::ed::outliner::outliner_buttons(), blender::ed::outliner::outliner_draw_overrides_rna_buts(), blender::ed::outliner::outliner_draw_userbuts(), uiLayout::progress_indicator(), uiLayout::prop(), blender::ed::space_node::reroute_node_draw_label(), uiLayout::separator(), uiLayout::separator_spacer(), template_common_search_menu(), template_ID(), ui_alert_create(), ui_block_colorpicker(), 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_item_array(), ui_item_disabled(), ui_item_with_label(), ui_layout_add_padding_button(), ui_layout_box(), blender::ed::space_node::ui_node_menu_column(), UI_pie_menu_begin(), ui_template_list_layout_draw(), blender::ed::space_node::ui_template_node_link_menu(), uiDefAutoButR(), uiDefButBit(), uiDefButC(), uiDefButF(), uiDefButI(), uiDefButS(), uiItem_simple(), uiLayoutListItemAddPadding(), uiTemplateHistogram(), uiTemplateMarker(), uiTemplateMovieClip(), uiTemplateNodeSocket(), uiTemplatePreview(), uiTemplateReportsBanner(), uiTemplateStatusInfo(), uiTemplateTrack(), uiTemplateVectorscope(), uiTemplateWaveform(), v3d_editvertex_buts(), v3d_object_dimension_buts(), view3d_panel_curve_data(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_search_menu(), wm_block_splash_add_label(), and wm_enum_search_menu().

◆ uiDefButAlert()

uiBut * uiDefButAlert ( uiBlock * block,
int icon,
int x,
int y,
short width,
short height )

◆ uiDefButBitC()

uiBut * uiDefButBitC ( uiBlock * block,
ButType type,
int bit,
int retval,
blender::StringRef str,
int x,
int y,
short width,
short height,
char * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

Definition at line 5465 of file interface.cc.

References Char, max, min, str, uiDefButBit(), x, and y.

Referenced by block_create__close_file_dialog().

◆ uiDefButBitI()

uiBut * uiDefButBitI ( uiBlock * block,
ButType type,
int bit,
int retval,
blender::StringRef str,
int x,
int y,
short width,
short height,
int * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

Definition at line 5357 of file interface.cc.

References Int, max, min, str, uiDefButBit(), x, and y.

Referenced by curvemap_clipping_func(), and uiTemplateMarker().

◆ uiDefButBitS()

uiBut * uiDefButBitS ( uiBlock * block,
ButType type,
int bit,
int retval,
blender::StringRef str,
int x,
int y,
short width,
short height,
short * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

Definition at line 5411 of file interface.cc.

References max, min, Short, str, uiDefButBit(), x, and y.

Referenced by v3d_editvertex_buts().

◆ uiDefButC()

uiBut * uiDefButC ( uiBlock * block,
ButType type,
int retval,
blender::StringRef str,
int x,
int y,
short width,
short height,
char * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefButF()

uiBut * uiDefButF ( uiBlock * block,
ButType type,
int retval,
blender::StringRef str,
int x,
int y,
short width,
short height,
float * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefButI()

uiBut * uiDefButI ( uiBlock * block,
ButType type,
int retval,
blender::StringRef str,
int x,
int y,
short width,
short height,
int * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefButImage()

uiBut * uiDefButImage ( uiBlock * block,
void * imbuf,
int x,
int y,
short width,
short height,
const uchar color[4] )

◆ uiDefButO()

uiBut * uiDefButO ( uiBlock * block,
ButType type,
blender::StringRefNull opname,
blender::wm::OpCallContext opcontext,
const std::optional< blender::StringRef > str,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefButO_ptr()

uiBut * uiDefButO_ptr ( uiBlock * block,
ButType type,
wmOperatorType * ot,
blender::wm::OpCallContext opcontext,
blender::StringRef str,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

Definition at line 5534 of file interface.cc.

References ot, str, ui_but_update(), ui_def_but_operator_ptr(), x, and y.

Referenced by uiDefButO(), uiItemFullO_ptr_ex(), and view3d_panel_vgroup().

◆ uiDefButR()

◆ uiDefButR_prop()

uiBut * uiDefButR_prop ( uiBlock * block,
ButType type,
int retval,
std::optional< blender::StringRef > str,
int x,
int y,
short width,
short height,
PointerRNA * ptr,
PropertyRNA * prop,
int index,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefButS()

uiBut * uiDefButS ( uiBlock * block,
ButType type,
int retval,
blender::StringRef str,
int x,
int y,
short width,
short height,
short * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefIconBlockBut()

uiBut * uiDefIconBlockBut ( uiBlock * block,
uiBlockCreateFunc func,
void * arg,
int retval,
int icon,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefIconBut()

◆ uiDefIconButBitC()

uiBut * uiDefIconButBitC ( uiBlock * block,
ButType type,
int bit,
int retval,
int icon,
int x,
int y,
short width,
short height,
char * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

Definition at line 5751 of file interface.cc.

References Char, max, min, uiDefIconButBit(), x, and y.

Referenced by blender::ui::TreeViewLayoutBuilder::build_from_tree(), and draw_setting_widget().

◆ uiDefIconButBitI()

uiBut * uiDefIconButBitI ( uiBlock * block,
ButType type,
int bit,
int retval,
int icon,
int x,
int y,
short width,
short height,
int * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefIconButBitS()

uiBut * uiDefIconButBitS ( uiBlock * block,
ButType type,
int bit,
int retval,
int icon,
int x,
int y,
short width,
short height,
short * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefIconButI()

uiBut * uiDefIconButI ( uiBlock * block,
ButType type,
int retval,
int icon,
int x,
int y,
short width,
short height,
int * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefIconButO()

◆ uiDefIconButO_ptr()

uiBut * uiDefIconButO_ptr ( uiBlock * block,
ButType type,
wmOperatorType * ot,
blender::wm::OpCallContext opcontext,
int icon,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefIconButR()

uiBut * uiDefIconButR ( uiBlock * block,
ButType type,
int retval,
int icon,
int x,
int y,
short width,
short height,
PointerRNA * ptr,
blender::StringRefNull propname,
int index,
float min,
float max,
std::optional< blender::StringRef > tip )

Definition at line 5779 of file interface.cc.

References max, min, ptr, ui_but_update_and_icon_set(), ui_def_but_rna_propname(), x, and y.

Referenced by template_ID().

◆ uiDefIconButR_prop()

uiBut * uiDefIconButR_prop ( uiBlock * block,
ButType type,
int retval,
int icon,
int x,
int y,
short width,
short height,
PointerRNA * ptr,
PropertyRNA * prop,
int index,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefIconButS()

uiBut * uiDefIconButS ( uiBlock * block,
ButType type,
int retval,
int icon,
int x,
int y,
short width,
short height,
short * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

Definition at line 5697 of file interface.cc.

References max, min, Short, uiDefIconBut(), x, and y.

Referenced by uiTemplatePreview().

◆ uiDefIconMenuBut()

uiBut * uiDefIconMenuBut ( uiBlock * block,
uiMenuCreateFunc func,
void * arg,
int icon,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefIconPreviewBut()

uiBut * uiDefIconPreviewBut ( uiBlock * block,
ButType type,
int retval,
int icon,
int x,
int y,
short width,
short height,
void * poin,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefIconTextBut()

uiBut * uiDefIconTextBut ( uiBlock * block,
uiButTypeWithPointerType but_and_ptr_type,
int retval,
int icon,
blender::StringRef str,
int x,
int y,
short width,
short height,
void * poin,
std::optional< blender::StringRef > tip )

Button containing both string label and icon.

Definition at line 5850 of file interface.cc.

References uiBut::drawflag, str, UI_BUT_ICON_LEFT, ui_but_update_and_icon_set(), ui_def_but(), x, and y.

Referenced by block_create_autorun_warning(), colorband_buttons_layout(), colorband_tools_fn(), create_title_button(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_tools_func(), CurveProfile_buttons_layout(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_content_cell_value(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_int(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_int_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_left_column_cell(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_top_row_cell(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_undrawable(), graph_draw_driver_settings_panel(), uiLayout::panel_prop(), save_file_overwrite_cancel_button(), save_file_overwrite_confirm_button(), save_file_overwrite_saveas_button(), template_ID(), template_id_def_new_but(), template_operator_property_buts_draw_single(), template_texture_user_menu(), ui_imageuser_slot_menu(), blender::ed::space_node::ui_node_menu_column(), UI_pie_menu_begin(), ui_pie_menu_level_create(), UI_popup_block_template_confirm_op(), ui_popup_context_menu_for_button(), uiDefIconTextButI(), uiDefIconTextButS(), uiItem_simple(), uiTemplateRunningJobs(), wm_block_file_close_cancel_button(), wm_block_file_close_discard_button(), wm_block_file_close_save_button(), and wm_block_insert_unicode_create().

◆ uiDefIconTextButI()

uiBut * uiDefIconTextButI ( uiBlock * block,
ButType type,
int retval,
int icon,
blender::StringRef str,
int x,
int y,
short width,
short height,
int * poin,
std::optional< blender::StringRef > tip )

Definition at line 5868 of file interface.cc.

References Int, str, uiDefIconTextBut(), x, and y.

Referenced by ui_def_but_rna__menu().

◆ uiDefIconTextButO()

uiBut * uiDefIconTextButO ( uiBlock * block,
ButType type,
blender::StringRefNull opname,
blender::wm::OpCallContext opcontext,
int icon,
blender::StringRef str,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefIconTextButO_ptr()

uiBut * uiDefIconTextButO_ptr ( uiBlock * block,
ButType type,
wmOperatorType * ot,
blender::wm::OpCallContext opcontext,
int icon,
blender::StringRef str,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefIconTextButR()

◆ uiDefIconTextButR_prop()

uiBut * uiDefIconTextButR_prop ( uiBlock * block,
ButType type,
int retval,
int icon,
std::optional< blender::StringRef > str,
int x,
int y,
short width,
short height,
PointerRNA * ptr,
PropertyRNA * prop,
int index,
float min,
float max,
std::optional< blender::StringRef > tip )

◆ uiDefIconTextButS()

uiBut * uiDefIconTextButS ( uiBlock * block,
ButType type,
int retval,
int icon,
blender::StringRef str,
int x,
int y,
short width,
short height,
short * poin,
std::optional< blender::StringRef > tip )

Definition at line 5892 of file interface.cc.

References Short, str, uiDefIconTextBut(), x, and y.

◆ uiDefIconTextMenuBut()

uiBut * uiDefIconTextMenuBut ( uiBlock * block,
uiMenuCreateFunc func,
void * arg,
int icon,
blender::StringRef str,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefMenuBut()

uiBut * uiDefMenuBut ( uiBlock * block,
uiMenuCreateFunc func,
void * arg,
blender::StringRef str,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefSearchBut()

uiBut * uiDefSearchBut ( uiBlock * block,
void * arg,
int retval,
int icon,
int maxncpy,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

◆ uiDefSearchButO_ptr()

uiBut * uiDefSearchButO_ptr ( uiBlock * block,
wmOperatorType * ot,
IDProperty * properties,
void * arg,
int retval,
int icon,
int maxncpy,
int x,
int y,
short width,
short height,
std::optional< blender::StringRef > tip )

Same parameters as for uiDefSearchBut, with additional operator type and properties, used by callback to call again the right op with the right options (properties values).

Definition at line 6685 of file interface.cc.

References blender::wm::ExecDefault, IDP_CopyProperty(), uiBut::opcontext, operator_enum_search_exec_fn(), operator_enum_search_update_fn(), uiBut::optype, ot, ptr, UI_but_func_search_set(), UI_but_operator_ptr_ensure(), ui_searchbox_create_generic(), uiDefSearchBut(), x, and y.

Referenced by wm_enum_search_menu().

◆ uiTemplateAction()

void uiTemplateAction ( uiLayout * layout,
const bContext * C,
ID * id,
const char * newop,
const char * unlinkop,
std::optional< blender::StringRef > text )

Action selector.

This is a specialization of uiTemplateID, hard-coded to assign Actions to the given ID. Such a specialization is necessary, as the RNA property (id.animation_data.action) does not exist when the ID's adt pointer is nullptr. In that case uiTemplateID will not be able to find the RNA type of that property, which in turn it needs to determine the type of IDs to show.

Definition at line 1617 of file interface_template_id.cc.

References BKE_animdata_from_id(), BLI_assert, C, CTX_data_main(), TemplateID::filter, flag, ID_AC, id_can_have_animdata(), TemplateID::idcode, TemplateID::idlb, ID::name, TemplateID::prop, PROP_POINTER, TemplateID::prv_cols, TemplateID::prv_rows, TemplateID::ptr, RNA_id_pointer_create(), RNA_property_type(), RNA_struct_type_find_property(), RNA_warning, uiLayout::row(), TemplateID::scale, template_ID(), UI_ID_ADD_NEW, UI_ID_BROWSE, UI_ID_DELETE, UI_ID_RENAME, UI_TEMPLATE_ID_FILTER_ALL, and which_libbase().

◆ uiTemplateAnyID()

void uiTemplateAnyID ( uiLayout * layout,
PointerRNA * ptr,
blender::StringRefNull propname,
blender::StringRefNull proptypename,
std::optional< blender::StringRef > text )

This is for selecting the type of ID-block to use, and then from the relevant type choosing the block to use.

Parameters
propnameproperty identifier for property that ID-pointer gets stored to.
proptypenameproperty identifier for property used to determine the type of ID-pointer that can be used.

Definition at line 1780 of file interface_template_id.cc.

References uiLayout::alignment_set(), blender::StringRefNull::c_str(), blender::ui::Expand, IFACE_, uiLayout::label(), blender::ui::Left, uiLayout::prop(), PROP_ENUM, PROP_POINTER, ptr, RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, uiLayout::row(), split(), uiLayout::split(), UI_ITEM_NONE, and UI_ITEM_R_ICON_ONLY.

Referenced by graph_panel_driverVar__singleProp().

◆ uiTemplateBoneCollectionTree()

◆ uiTemplateCacheFile()

void uiTemplateCacheFile ( uiLayout * layout,
const bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname )

Draw the main CacheFile properties and operators (file path, scale, etc.), that is those which do not have their own dedicated template functions.

Definition at line 165 of file interface_template_cache_file.cc.

References BCONTEXT_CONSTRAINT, C, uiLayout::context_ptr_set(), CTX_wm_space_properties(), PointerRNA::data, IFACE_, SpaceProperties::mainb, uiLayout::op(), uiLayout::prop(), ptr, uiLayout::row(), UI_ITEM_NONE, uiTemplateCacheFilePointer(), uiTemplateID(), and uiLayout::use_property_split_set().

Referenced by panel_draw().

◆ uiTemplateCacheFileLayers()

void uiTemplateCacheFileLayers ( uiLayout * layout,
const bContext * C,
PointerRNA * fileptr )

◆ uiTemplateCacheFilePointer()

bool uiTemplateCacheFilePointer ( PointerRNA * ptr,
blender::StringRefNull propname,
PointerRNA * r_file_ptr )

Lookup the CacheFile PointerRNA of the given pointer and return it in the output parameter. Returns true if ptr has a RNACacheFile, false otherwise. If false, the output parameter is not initialized.

Definition at line 139 of file interface_template_cache_file.cc.

References blender::StringRefNull::c_str(), printf, PROP_POINTER, ptr, RNA_property_pointer_get(), RNA_property_type(), RNA_struct_find_property(), and RNA_struct_identifier().

Referenced by override_layers_panel_draw(), time_panel_draw(), uiTemplateCacheFile(), and velocity_panel_draw().

◆ uiTemplateCacheFileTimeSettings()

void uiTemplateCacheFileTimeSettings ( uiLayout * layout,
PointerRNA * fileptr )

◆ uiTemplateCacheFileVelocity()

void uiTemplateCacheFileVelocity ( uiLayout * layout,
PointerRNA * fileptr )

Draw the velocity related properties of the CacheFile.

Definition at line 33 of file interface_template_cache_file.cc.

References uiLayout::context_ptr_set(), uiLayout::prop(), RNA_pointer_is_null(), and UI_ITEM_NONE.

Referenced by velocity_panel_draw().

◆ uiTemplateCollectionExporters()

◆ uiTemplateColormanagedViewSettings()

◆ uiTemplateColorPicker()

◆ uiTemplateColorRamp()

◆ uiTemplateColorspaceSettings()

◆ uiTemplateComponentMenu()

◆ uiTemplateConstraintHeader()

◆ uiTemplateConstraints()

◆ uiTemplateCryptoPicker()

◆ uiTemplateCurveMapping()

◆ uiTemplateCurveProfile()

◆ uiTemplateEditModeSelection()

◆ uiTemplateEventFromKeymapItem()

◆ uiTemplateFileSelectPath()

void uiTemplateFileSelectPath ( uiLayout * layout,
bContext * C,
FileSelectParams * params )

◆ uiTemplateGpencilColorPreview()

void uiTemplateGpencilColorPreview ( uiLayout * layout,
bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname,
int rows,
int cols,
float scale,
int filter )

◆ uiTemplateGpencilModifier()

uiLayout * uiTemplateGpencilModifier ( uiLayout * layout,
bContext * C,
PointerRNA * ptr )

References C, filter, flag, lock, name, and ptr.

◆ uiTemplateGreasePencilLayerTree()

◆ uiTemplateHeader()

void uiTemplateHeader ( uiLayout * layout,
bContext * C )

◆ uiTemplateHeader3D_mode()

◆ uiTemplateHistogram()

◆ uiTemplateIcon()

void uiTemplateIcon ( uiLayout * layout,
int icon_value,
float icon_scale )
Parameters
icon_scaleScale of the icon, 1x == button height.

Definition at line 96 of file interface_template_icon.cc.

References uiLayout::absolute_block(), Label, UI_BUT_ICON_PREVIEW, ui_def_but_icon(), UI_HAS_ICON, UI_UNIT_X, UI_UNIT_Y, and uiDefIconBut().

◆ uiTemplateIconView()

◆ uiTemplateID()

void uiTemplateID ( uiLayout * layout,
const bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname,
const char * newop,
const char * openop,
const char * unlinkop,
int filter = UI_TEMPLATE_ID_FILTER_ALL,
bool live_icon = false,
std::optional< blender::StringRef > text = std::nullopt )

Definition at line 1587 of file interface_template_id.cc.

References C, filter, ptr, UI_ID_BROWSE, UI_ID_DELETE, UI_ID_RENAME, and ui_template_id().

Referenced by blender::nodes::node_composite_mask_cc::cmp_node_mask_declare(), blender::nodes::node_composite_planetrackdeform_cc::cmp_node_planetrackdeform_declare(), blender::nodes::node_composite_stabilize2d_cc::cmp_node_stabilize2d_declare(), blender::seq::compositor_modifier_panel_draw(), blender::nodes::draw_geometry_nodes_modifier_ui(), blender::nodes::draw_property_for_socket(), nla_panel_animdata(), blender::ed::space_node::node_buts_texture(), blender::ed::space_node::node_composit_buts_cryptomatte(), blender::nodes::node_composite_defocus_cc::node_composit_buts_defocus(), blender::ed::space_node::node_composit_buts_image(), blender::nodes::node_composite_keyingscreen_cc::node_composit_buts_keyingscreen(), blender::nodes::node_composite_movieclip_cc::node_composit_buts_movieclip(), blender::nodes::node_composite_movieclip_cc::node_composit_buts_movieclip_ex(), blender::nodes::node_composite_moviedistortion_cc::node_composit_buts_moviedistortion(), blender::nodes::node_composite_trackpos_cc::node_composit_buts_trackpos(), blender::nodes::node_composite_render_layer_cc::node_composit_buts_viewlayers(), blender::nodes::node_geo_image_cc::node_declare(), blender::nodes::node_geo_string_to_curves_cc::node_layout(), blender::ed::space_node::node_shader_buts_tex_environment(), blender::ed::space_node::node_shader_buts_tex_image(), blender::ed::space_node::node_texture_buts_image(), panel_draw(), panel_draw(), blender::ed::space_node::std_node_socket_draw(), texture_panel_draw(), texture_panel_draw(), uiTemplateCacheFile(), uiTemplateImage(), uiTemplateMovieClip(), and weightvg_ui_common().

◆ uiTemplateIDBrowse()

void uiTemplateIDBrowse ( uiLayout * layout,
bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname,
const char * newop,
const char * openop,
const char * unlinkop,
int filter = UI_TEMPLATE_ID_FILTER_ALL,
const char * text = nullptr )

◆ uiTemplateIDPreview()

void uiTemplateIDPreview ( uiLayout * layout,
bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname,
const char * newop,
const char * openop,
const char * unlinkop,
int rows,
int cols,
int filter = UI_TEMPLATE_ID_FILTER_ALL,
bool hide_buttons = false )

◆ uiTemplateIDTabs()

void uiTemplateIDTabs ( uiLayout * layout,
bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname,
const char * newop,
const char * menu,
int filter = UI_TEMPLATE_ID_FILTER_ALL )

Version of uiTemplateID using tabs.

Definition at line 1753 of file interface_template_id.cc.

References C, filter, ptr, UI_ID_BROWSE, UI_ID_RENAME, and ui_template_id().

◆ uiTemplateImage()

void uiTemplateImage ( uiLayout * layout,
bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname,
PointerRNA * userptr,
bool compact,
bool multiview )

Definition at line 729 of file image_buttons.cc.

References uiLayout::active_set(), BKE_image_acquire_ibuf(), BKE_image_acquire_renderresult(), BKE_image_get_tile, BKE_image_has_alpha(), BKE_image_has_filepath(), BKE_image_has_packedfile(), BKE_image_is_animated(), BKE_image_is_dirty(), BKE_image_release_ibuf(), BKE_image_release_renderresult(), BKE_image_user_frame_calc(), uiLayout::block(), but_func_argN_copy(), but_func_argN_free(), C, blender::StringRefNull::c_str(), RenderData::cfra, col, Image::colorspace_settings, uiLayout::column(), uiLayout::context_ptr_set(), CTX_data_scene(), CTX_wm_space_image(), ImBufFloatBuffer::data, PointerRNA::data, uiLayout::enabled_set(), ImbFormatOptions::flag, ImBuf::float_buffer, ImBuf::foptions, ImageTile::gen_type, IFACE_, IMA_GENTYPE_BLANK, IMA_SRC_GENERATED, IMA_SRC_MOVIE, IMA_SRC_VIEWER, IMA_TYPE_COMPOSITE, IMA_TYPE_MULTILAYER, IMA_TYPE_R_RESULT, IMB_colormanagement_space_name_is_data(), SpaceImage::iuser, lock, ColorManagedColorspaceSettings::name, uiLayout::op(), OPENEXR_HALF, printf, RNAUpdateCb::prop, uiLayout::prop(), PROP_POINTER, ptr, RNAUpdateCb::ptr, Scene::r, R_MULTIVIEW, Image::render_slot, RNA_boolean_get(), RNA_property_pointer_get(), RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), rna_update_cb(), uiLayout::row(), Image::rr, RenderData::scemode, uiLayout::separator(), Image::source, Image::type, UI_block_funcN_set(), UI_ITEM_NONE, UI_ITEM_R_EXPAND, UI_SCALE_FAC, UI_UNIT_Y, uiblock_layer_pass_buttons(), uiDefAutoButR(), uiTemplateColorspaceSettings(), uiTemplateID(), uiTemplateImageInfo(), uiTemplateImageViews(), and uiLayout::use_property_decorate_set().

Referenced by blender::ed::space_node::node_composit_buts_image_ex(), blender::ed::space_node::node_shader_buts_tex_environment_ex(), blender::ed::space_node::node_shader_buts_tex_image_ex(), and blender::ed::space_node::node_texture_buts_image_ex().

◆ uiTemplateImageFormatViews()

◆ uiTemplateImageInfo()

◆ uiTemplateImageLayers()

◆ uiTemplateImageSettings()

◆ uiTemplateImageStereo3d()

◆ uiTemplateImageViews()

void uiTemplateImageViews ( uiLayout * layout,
PointerRNA * imaptr )

◆ uiTemplateInputStatus()

◆ uiTemplateKeymapItemProperties()

◆ uiTemplateLayers()

void uiTemplateLayers ( uiLayout * layout,
PointerRNA * ptr,
blender::StringRefNull propname,
PointerRNA * used_ptr,
const char * used_propname,
int active_layer )

◆ uiTemplateLightLinkingCollection()

◆ uiTemplateList()

void uiTemplateList ( uiLayout * layout,
const bContext * C,
const char * listtype_name,
const char * list_id,
PointerRNA * dataptr,
blender::StringRefNull propname,
PointerRNA * active_dataptr,
const char * active_propname,
const char * item_dyntip_propname,
int rows,
int maxrows,
int layout_type,
int columns,
enum uiTemplateListFlags flags )

◆ uiTemplateList_ex()

◆ uiTemplateMarker()

void uiTemplateMarker ( uiLayout * layout,
PointerRNA * ptr,
blender::StringRefNull propname,
PointerRNA * userptr,
PointerRNA * trackptr,
bool compact )

Definition at line 378 of file clip_buttons.cc.

References uiLayout::absolute_block(), uiLayout::active_set(), add_v2_v2v2(), B_MARKER_FLAG, B_MARKER_OFFSET, B_MARKER_PAT_DIM, B_MARKER_POS, B_MARKER_SEARCH_DIM, B_MARKER_SEARCH_POS, BKE_movieclip_get_size(), BKE_movieclip_remap_scene_to_clip_frame(), BKE_tracking_marker_get(), BKE_tracking_marker_pattern_minmax(), uiLayout::block(), blender::StringRefNull::c_str(), CheckboxN, MarkerUpdateCb::clip, col, uiLayout::column(), MarkerUpdateCb::compact, PointerRNA::data, MovieTrackingMarker::flag, MovieTrackingTrack::flag, MarkerUpdateCb::framenr, MovieClipUser::framenr, IFACE_, Label, MarkerUpdateCb::marker, marker_block_handler(), MARKER_DISABLED, MarkerUpdateCb::marker_flag, MarkerUpdateCb::marker_pat, MarkerUpdateCb::marker_pos, MarkerUpdateCb::marker_search, MarkerUpdateCb::marker_search_pos, marker_update_cb(), MEM_callocN(), MEM_freeN(), mul_v2_fl(), Num, MovieTrackingTrack::offset, MovieTrackingMarker::pos, printf, PROP_POINTER, ptr, RNA_property_pointer_get(), RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), MovieTrackingMarker::search_max, MovieTrackingMarker::search_min, step, sub_v2_v2v2(), TIP_, to_pixel_space(), ToggleN, MarkerUpdateCb::track, TRACK_LOCKED, MarkerUpdateCb::track_offset, UI_block_align_begin(), UI_block_align_end(), UI_block_func_handle_set(), UI_block_funcN_set(), UI_but_drawflag_enable(), UI_but_funcN_set(), UI_BUT_ICON_REVERSE, UI_but_number_precision_set(), UI_but_number_step_size_set(), UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButBitI(), uiDefButF(), uiDefIconButBitI(), and MarkerUpdateCb::user.

◆ uiTemplateMatrix()

◆ uiTemplateMenuSearch()

◆ uiTemplateModifiers()

◆ uiTemplateMovieClip()

◆ uiTemplateMovieclipInformation()

◆ uiTemplateNodeInputs()

void uiTemplateNodeInputs ( uiLayout * layout,
bContext * C,
PointerRNA * ptr )

◆ uiTemplateNodeLink()

◆ uiTemplateNodeSocket()

◆ uiTemplateNodeTreeInterface()

◆ uiTemplateNodeView()

void uiTemplateNodeView ( uiLayout * layout,
bContext * C,
bNodeTree * ntree,
bNode * node,
bNodeSocket * input )

◆ uiTemplateOperatorPropertyButs()

void uiTemplateOperatorPropertyButs ( const bContext * C,
uiLayout * layout,
wmOperator * op,
eButLabelAlign label_align,
short flag )

Draw Operator property buttons for redoing execution with different settings. This function does not initialize the layout, functions can be called on the layout before and after.

Definition at line 274 of file interface_template_operator_property.cc.

References C, CTX_wm_manager(), flag, template_operator_property_buts_draw_recursive(), ui_layout_operator_properties_only_booleans(), and UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT.

Referenced by file_panel_operator(), wm_block_create_redo(), wm_block_dialog_create(), and wm_operator_ui_create().

◆ uiTemplateOperatorRedoProperties()

◆ uiTemplateOperatorSearch()

◆ uiTemplatePalette()

◆ uiTemplatePathBuilder()

void uiTemplatePathBuilder ( uiLayout * layout,
PointerRNA * ptr,
blender::StringRefNull propname,
PointerRNA * root_ptr,
std::optional< blender::StringRefNull > text )

This is creating/editing RNA-Paths

  • ptr: struct which holds the path property
  • propname: property identifier for property that path gets stored to
  • root_ptr: struct that path gets built from

Definition at line 257 of file interface_templates.cc.

References blender::StringRefNull::c_str(), uiLayout::prop(), PROP_STRING, ptr, RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), RNA_warning, uiLayout::row(), and UI_ITEM_NONE.

Referenced by graph_panel_driverVar__contextProp(), and graph_panel_driverVar__singleProp().

◆ uiTemplatePreview()

◆ uiTemplateRecentFiles()

◆ uiTemplateReportsBanner()

◆ uiTemplateRunningJobs()

void uiTemplateRunningJobs ( uiLayout * layout,
bContext * C )

◆ uiTemplateSearch()

void uiTemplateSearch ( uiLayout * layout,
const bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname,
PointerRNA * searchptr,
const char * searchpropname,
const char * newop,
const char * unlinkop,
std::optional< blender::StringRef > text = std::nullopt )

Search menu to pick an item from a collection. A version of uiTemplateID that works for non-ID types.

Definition at line 293 of file interface_template_search.cc.

References C, ptr, template_search_buttons(), and template_search_setup().

Referenced by nla_panel_actclip(), and nla_panel_animdata().

◆ uiTemplateSearchPreview()

void uiTemplateSearchPreview ( uiLayout * layout,
bContext * C,
PointerRNA * ptr,
blender::StringRefNull propname,
PointerRNA * searchptr,
const char * searchpropname,
const char * newop,
const char * unlinkop,
int rows,
int cols,
std::optional< blender::StringRef > text = std::nullopt )

◆ uiTemplateShaderFx()

◆ uiTemplateStatusBarModalItem()

◆ uiTemplateStatusInfo()

◆ uiTemplateStripModifiers()

◆ uiTemplateTextureShow()

◆ uiTemplateTextureUser()

◆ uiTemplateTrack()

◆ uiTemplateVectorscope()

◆ uiTemplateWaveform()