Blender V5.3
blender::ui::ButtonLabel Struct Reference

#include <interface_intern.hh>

Inherits blender::ui::Button.

Public Attributes

float alpha_factor = 1.0f
bool draw_icon_border = false
ButtonLabelType label_type = ButtonLabelType::Standard
std::shared_ptr< TextWrapCache > wrap_cache
std::shared_ptr< MarkdownLayoutCache > markdown_cache
int max_lines = 0
FontStyleAlign text_align = UI_STYLE_TEXT_LEFT
Public Attributes inherited from blender::ui::Button
Layout * layout = nullptr
int64_t flag = 0
int drawflag = 0
TextDirection text_direction = TextDirection::Default
ButtonType type = ButtonType(0)
ButPointerType pointype = ButPointerType::None
bool bit = false
char bitnr = 0
uchar menu_key = 0
int retval = 0
short strwidth = 0
short alignnr = 0
int ofs = 0
int pos = 0
int selsta = 0
int selend = 0
uchar col [4] = {0}
std::string str
std::string drawstr
char * placeholder = nullptr
rctf rect = {}
char * poin = nullptr
float hardmin = 0
float hardmax = 0
float softmin = 0
float softmax = 0
ButtonIdentityCompareFunc identity_cmp_func = nullptr
ButtonHandleFunc func = nullptr
void * func_arg1 = nullptr
void * func_arg2 = nullptr
std::function< void(bContext &)> apply_func
ButtonHandleNFunc funcN = nullptr
void * func_argN = nullptr
ButtonArgNFree func_argN_free_fn
ButtonArgNCopy func_argN_copy_fn
const bContextStore * context = nullptr
ButtonCompleteFunc autocomplete_func = nullptr
void * autofunc_arg = nullptr
ButtonHandleHoldFunc hold_func = nullptr
void * hold_argN = nullptr
StringRef tip
ButtonToolTipFunc tip_func = nullptr
void * tip_arg = nullptr
FreeArgFunc tip_arg_free = nullptr
std::function< std::string(const Button *)> tip_quick_func
ButtonToolTipCustomFunc tip_custom_func = nullptr
const char * disabled_info = nullptr
IconTextOverlay icon_overlay_text = {}
EmbossType emboss = EmbossType::Emboss
RadialDirection pie_dir = UI_RADIAL_NONE
bool changed = false
BIFIconID icon = ICON_NONE
float icon_scale = 1.0f
float search_weight = 0.0f
short iconadd = 0
uchar unit_type = 0
bool menu_no_hover_open = false
BlockCreateFunc block_create_func = nullptr
MenuCreateFunc menu_create_func = nullptr
MenuStepFunc menu_step_func = nullptr
PointerRNA rnapoin = {}
PropertyRNA * rnaprop = nullptr
int rnaindex = 0
BIFIconID drag_preview_icon_id
void * dragpoin = nullptr
const ImBuf * imb = nullptr
float imb_scale = 0
eWM_DragDataType dragtype = WM_DRAG_ID
int8_t dragflag = 0
bool operator_never_call = false
wm::OpCallContext opcontext = wm::OpCallContext::InvokeDefault
wmOperatorType * optype = nullptr
PointerRNA * opptr = nullptr
ListBaseT< ButtonExtraOpIcon > extra_op_icons = {nullptr, nullptr}
HandleButtonData * active = nullptr
HandleButtonData * semi_modal_state = nullptr
void * custom_data = nullptr
char * editstr = nullptr
double * editval = nullptr
float * editvec = nullptr
std::function< bool(const Button &)> pushed_state_func
Block * block = nullptr

Additional Inherited Members

Public Member Functions inherited from blender::ui::Button
 Button ()=default
 Button (const Button &other)=default
Button & operator= (const Button &other)=delete
virtual ~Button ()=default
Public Member Functions inherited from blender::blender::NonMovable
 NonMovable (NonMovable &&other)=delete
NonMovable & operator= (NonMovable &&other)=delete
 NonMovable ()=default
 NonMovable (const NonMovable &other)=default
NonMovable & operator= (const NonMovable &other)=default

Detailed Description

Derived struct for #ButtonType::Label.

Definition at line 509 of file interface_intern.hh.

Member Data Documentation

◆ alpha_factor

float blender::ui::ButtonLabel::alpha_factor = 1.0f

◆ draw_icon_border

bool blender::ui::ButtonLabel::draw_icon_border = false

When the button draws an icon, also draw a mono-colored border for it.

Definition at line 512 of file interface_intern.hh.

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

◆ label_type

◆ markdown_cache

std::shared_ptr<MarkdownLayoutCache> blender::ui::ButtonLabel::markdown_cache

◆ max_lines

int blender::ui::ButtonLabel::max_lines = 0

Maximum lines to be drawn in multi-line labels, 0 means all.

Definition at line 525 of file interface_intern.hh.

Referenced by blender::ui::Layout::label_multiline(), blender::ui::resolve_label_multiline(), and blender::ui::widget_draw_multiline_text().

◆ text_align

FontStyleAlign blender::ui::ButtonLabel::text_align = UI_STYLE_TEXT_LEFT

◆ wrap_cache

std::shared_ptr<TextWrapCache> blender::ui::ButtonLabel::wrap_cache

Wrap cache from last layout pass. This is also referenced in the button owning Block so it can be looked up and reused in following layout passes. Wrapped text references an allocated string, so it can't be just copied/moved around.

Definition at line 521 of file interface_intern.hh.

Referenced by blender::ui::invalidate_text_wrap_cache(), blender::ui::label_multiline_wrap_lines(), blender::ui::resolve_label_multiline(), and blender::ui::widget_draw_multiline_text().


The documentation for this struct was generated from the following file: