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

#include <interface_intern.hh>

Public Member Functions

std::ranges::transform_view< std::ranges::ref_view< const Vector< std::unique_ptr< Button > > >, Button &(*)(const std::unique_ptr< Button > &)> buttons () const
Window Matrix
void remove_but (const Button *but)
Button * first_but () const
Button * last_but () const
int but_index (const Button *but) const
Button * next_but (const Button *but) const
Button * prev_but (const Button *but) const

Static Public Member Functions

static Button & button_ptr_dereference (const std::unique_ptr< Button > &button)

Public Attributes

Block * next = nullptr
Block * prev = nullptr
Vector< std::unique_ptr< Button > > buttons_ptrs
Vector< std::shared_ptr< TextWrapCache > > text_wrap_cache
Vector< std::shared_ptr< MarkdownLayoutCache > > markdown_layout_cache
Panel * panel = nullptr
Block * oldblock = nullptr
ListBaseT< ButStore > butstore = {nullptr, nullptr}
Vector< ButtonGroup > button_groups
ListBaseT< LayoutRoot > layouts = {nullptr, nullptr}
Layout * curlayout = nullptr
Vector< std::unique_ptr< bContextStore > > contexts
ListBaseT< ViewLink > views = {nullptr, nullptr}
ListBaseT< BlockDynamicListener > dynamic_listeners = {nullptr, nullptr}
std::string name
float winmat [4][4] = {}
rctf rect = {}
float aspect = 0.0f
BlockAlertLevel alert_level = BlockAlertLevel::None
uint puphash = 0
ButtonHandleFunc func = nullptr
void * func_arg1 = nullptr
void * func_arg2 = nullptr
ButtonHandleNFunc funcN = nullptr
void * func_argN = nullptr
ButtonArgNFree func_argN_free_fn = nullptr
ButtonArgNCopy func_argN_copy_fn = nullptr
BlockHandleFunc handle_func = nullptr
void * handle_func_arg = nullptr
BlockInteraction_CallbackData custom_interaction_callbacks = {}
int(*) block_event_func (const bContext *C, Block *, const wmEvent *) = nullptr
std::function< void(const bContext *, rcti *)> drawextra
int flag = 0
short alignnr = 0
short content_hints = 0
char direction = 0
char theme_style = 0
EmbossType emboss = EmbossType::Emboss
bool auto_open = false
double auto_open_last = 0.0
const char * lockstr = nullptr
bool lock = false
bool active = false
bool tooltipdisabled = false
bool endblock = false
bool post_block_layout_fns_pending = false
BlockBoundsCalc bounds_type = BLOCK_BOUNDS_NONE
int bounds_offset [2] = {}
int bounds = 0
int minbounds = 0
rctf safety = {}
ListBaseT< SafetyRect > saferct = {nullptr, nullptr}
PopupBlockHandle * handle = nullptr
wmOperator * ui_operator = nullptr
bool ui_operator_free = false
void * evil_C = nullptr
const UnitSettings * unit = nullptr
ColorPickerData color_pickers
bool is_color_gamma_picker = false
char display_device [64] = ""
std::unique_ptr< PieMenuData > pie_data

Detailed Description

Definition at line 703 of file interface_intern.hh.

Member Function Documentation

◆ but_index()

◆ button_ptr_dereference()

Button & blender::ui::Block::button_ptr_dereference ( const std::unique_ptr< Button > & button)
inlinestatic

Definition at line 836 of file interface_intern.hh.

Referenced by buttons().

◆ buttons()

std::ranges::transform_view< std::ranges::ref_view< const Vector< std::unique_ptr< Button > > >, Button &(*)(const std::unique_ptr< Button > &)> blender::ui::Block::buttons ( ) const
inline

A view of #Block::buttons_ptrs which allows range-based for loops as #Buttons references.

Definition at line 844 of file interface_intern.hh.

References button_ptr_dereference().

Referenced by blender::ui::apply_but_ROW(), blender::ui::block_active_but_get(), blender::ui::block_active_default_button_find(), blender::ui::block_active_only_flagged_buttons(), blender::ui::block_align_calc(), blender::ui::block_bounds_calc(), blender::ui::block_draw(), blender::ui::block_end_ex(), blender::ui::block_find_rna_text_button(), blender::ui::block_free(), blender::ui::block_func_POPOVER(), blender::ui::block_func_POPUP(), blender::ui::block_interaction_begin(), blender::ui::block_message_subscribe(), blender::ui::block_pie_dir_activate(), blender::ui::block_translate(), blender::ui::block_update_from_old(), blender::ui::block_view_find_matching_view_item_but_in_old_block(), blender::ui::but_find(), blender::ui::but_find_old(), blender::ui::but_find_open_event(), blender::ui::but_next_non_separator(), blender::ui::button_activate_exit(), blender::ui::button_drag_multi_edit_get(), blender::ui::button_find_mouse_over_ex(), blender::ui::button_find_new(), blender::ui::button_find_rect_over(), blender::ui::button_first(), blender::ui::button_last(), blender::ui::button_next(), blender::ui::button_prev(), blender::ui::button_section_bounds_calc(), blender::ui::colorband_buttons_layout(), blender::ui::colorpicker_hide_reveal(), blender::ui::colorpicker_wheel_cb(), blender::ui::context_active_but_prop_get_filebrowser(), blender::ui::context_button_active(), blender::ui::context_update_anim_flag(), blender::ui::drag_toggle_set_xy_xy(), blender::ui::find_first_view_item_but(), blender::ui::foreach_semi_modal_but_as_active(), blender::ui::handle_menu_event(), blender::ui::handle_viewlist_items_hover(), blender::ui::invalidate_text_wrap_cache(), blender::ui::item_enum_expand_tabs(), blender::ui::label_markdown_create_link_buttons(), blender::ui::layer_but_cb(), blender::ui::listbox_find_mouse_over_ex(), blender::ui::menu_block_set_keyaccels(), blender::ui::menu_block_set_keymaps(), blender::ui::menu_items_from_ui_create(), blender::ui::menu_scroll_apply_offset_y(), blender::ui::multibut_restore(), blender::ui::multibut_states_apply(), blender::ui::multibut_states_create(), blender::ui::multibut_states_tag(), blender::ui::offset_panel_block(), blender::ui::panel_category_show_tab(), blender::ui::panel_category_tabs_draw_all(), blender::ui::panel_remove_invisible_layouts_recursive(), blender::ui::pie_handler(), blender::ui::popup_block_clip(), blender::ui::popup_block_position(), blender::ui::popup_block_refresh(), blender::ui::popup_block_scrolltest(), blender::ui::popup_menu_memory__internal(), blender::ui::popup_needs_update_for_unreg_srna_recursive(), blender::ui::region_find_first_but_test_flag(), blender::ui::template_operator_property_buts_draw_single(), blender::ui::textbutton_activate_but(), blender::ui::textedit_next_but(), blender::ui::textedit_prev_but(), blender::ui::UI_region_free_active_but_all(), blender::ui::uiTemplateKeymapItemProperties(), blender::ui::update_color_picker_buts_rgba(), blender::ui::update_flexible_spacing(), blender::ui::ViewLink::views_bounds_calc(), blender::ui::wm_searchbox_tooltip_init(), and blender::wm_xr_viewfinder_ui_block_draw().

◆ first_but()

Button * blender::ui::Block::first_but ( ) const
nodiscard

◆ last_but()

Button * blender::ui::Block::last_but ( ) const
nodiscard

◆ next_but()

Button * blender::ui::Block::next_but ( const Button * but) const
nodiscard

◆ prev_but()

Button * blender::ui::Block::prev_but ( const Button * but) const
nodiscard

Definition at line 294 of file interface.cc.

References but_index(), and buttons_ptrs.

Referenced by blender::ui::def_but_rna__menu(), and blender::ui::do_but_TOG().

◆ remove_but()

void blender::ui::Block::remove_but ( const Button * but)

Definition at line 300 of file interface.cc.

References but_index(), and buttons_ptrs.

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

Member Data Documentation

◆ active

◆ alert_level

◆ alignnr

short blender::ui::Block::alignnr = 0

Definition at line 764 of file interface_intern.hh.

Referenced by blender::ui::block_align_begin(), and blender::ui::def_but().

◆ aspect

float blender::ui::Block::aspect = 0.0f

Definition at line 735 of file interface_intern.hh.

Referenced by blender::ui::block_draw(), blender::ui::button_text_padding(), blender::ui::create_link_buttons_for_label(), blender::ui::def_but_rna__menu(), blender::ui::do_but_COLORBAND(), blender::ui::do_but_TEXTBOX(), blender::ui::do_but_textedit_select(), blender::ui::do_button(), blender::ui::draw_aligned_panel(), blender::ui::draw_but_CURVE(), blender::ui::draw_but_CURVEPROFILE(), blender::ui::draw_but_HSVCIRCLE(), blender::ui::draw_but_HSVCUBE(), blender::ui::draw_button(), blender::ui::draw_clip_tri(), blender::ui::draw_layout_panels_backdrop(), blender::ui::draw_menu_back(), blender::ui::draw_popover_back(), blender::ui::label_multiline_wrap_lines(), blender::ui::markdown_apply_button_height(), blender::ui::markdown_layout_key_for_button(), blender::ui::menu_scroll_step(), blender::ui::menu_scroll_test(), blender::ui::menu_scroll_to_but(), blender::ui::menu_scroll_to_y(), blender::ui::panel_category_tabs_draw_all(), blender::ui::panel_draw_aligned_backdrop(), blender::ui::panel_draw_border(), blender::ui::popup_block_position(), blender::ui::popup_block_refresh(), blender::ui::popup_block_scrolltest(), blender::ui::search_menu_create_tooltip(), blender::ui::searchbox_create_generic_ex(), blender::ui::text_clip_middle(), blender::ui::text_clip_middle_protect_right(), blender::ui::text_icon_width_ex(), blender::ui::textbox_jump_line(), blender::ui::textbox_textedit_set_cursor_pos(), blender::ui::textbox_wrap_lines(), blender::ui::textbox_wrap_placeholder(), blender::ui::textedit_set_cursor_pos(), blender::ui::update_window_matrix(), blender::ui::widget_draw_icon(), blender::ui::widget_draw_multiline_text(), blender::ui::widget_draw_node_link_socket(), blender::ui::widget_draw_submenu_tria(), blender::ui::widget_draw_text_icon(), blender::ui::widget_draw_textbox(), and blender::wm_xr_viewfinder_ui_block_begin().

◆ auto_open

◆ auto_open_last

double blender::ui::Block::auto_open_last = 0.0

◆ block_event_func

int(*) blender::ui::Block::block_event_func(const bContext *C, Block *, const wmEvent *) = nullptr

Custom extra event handling.

Definition at line 758 of file interface_intern.hh.

Referenced by blender::ui::block_func_COLOR(), and blender::ui::handle_menu_event().

◆ bounds

◆ bounds_offset

◆ bounds_type

◆ butstore

◆ button_groups

◆ buttons_ptrs

◆ color_pickers

ColorPickerData blender::ui::Block::color_pickers
Note
only accessed by color picker templates.

Definition at line 816 of file interface_intern.hh.

Referenced by blender::ui::block_colorpicker_create(), blender::ui::block_free(), and blender::ui::block_update_from_old().

◆ content_hints

short blender::ui::Block::content_hints = 0

Hints about the buttons of this block. Used to avoid iterating over buttons to find out if some criteria is met by any. Instead, check this criteria when adding the button and set a flag here if it's met.

Definition at line 768 of file interface_intern.hh.

Referenced by blender::ui::but_submenu_enable(), blender::ui::popup_block_position(), and blender::ui::widget_draw_text_icon().

◆ contexts

◆ curlayout

◆ custom_interaction_callbacks

◆ direction

◆ display_device

char blender::ui::Block::display_device[64] = ""

Display device name used to display this block, used by color widgets to transform colors from/to scene linear.

Definition at line 825 of file interface_intern.hh.

Referenced by blender::ui::block_begin(), and blender::ui::block_cm_display_get().

◆ drawextra

std::function<void(const bContext *, rcti *)> blender::ui::Block::drawextra

Custom extra draw function for custom blocks.

Definition at line 761 of file interface_intern.hh.

Referenced by blender::ui::button_func_drawextra_set(), and blender::ui::widget_draw_extra_mask().

◆ dynamic_listeners

ListBaseT<BlockDynamicListener> blender::ui::Block::dynamic_listeners = {nullptr, nullptr}

◆ emboss

◆ endblock

bool blender::ui::Block::endblock = false

◆ evil_C

◆ flag

int blender::ui::Block::flag = 0

Definition at line 763 of file interface_intern.hh.

Referenced by blender::ui::block_align_begin(), blender::ui::block_align_end(), blender::ui::block_begin(), blender::ui::block_bounds_calc_popup(), blender::ui::block_draw(), blender::ui::block_end_ex(), blender::ui::block_find_mouse_over_ex(), blender::ui::block_flag_disable(), blender::ui::block_flag_enable(), blender::ui::block_func_COLOR(), blender::ui::block_func_POPUP(), blender::ui::block_is_menu(), blender::ui::block_is_pie_menu(), blender::ui::block_is_popover(), blender::ui::block_is_popup_any(), blender::ui::block_is_search_only(), blender::ui::block_pie_dir_activate(), blender::ui::block_set_search_only(), blender::ui::but_update_ex(), blender::ui::button_activate_exit(), blender::ui::button_activate_state(), blender::ui::button_find_mouse_over_ex(), blender::ui::button_find_rect_over(), blender::ui::button_func_search_set(), blender::ui::def_but(), blender::ui::draw_button(), blender::ui::draw_clip_tri(), blender::ui::draw_menu_back(), blender::ui::handle_button_event(), blender::ui::handle_menu_event(), blender::ui::handle_menu_mmb_event(), blender::ui::handle_menu_return_submenu(), blender::ui::handle_menus_recursive(), blender::ui::item_menu_hold(), blender::ui::menu_block_set_keymaps(), blender::ui::menu_scroll_step(), blender::ui::menu_scroll_test(), blender::ui::menu_scroll_to_but(), blender::ui::mouse_motion_towards_check(), blender::ui::pie_menu_begin(), blender::ui::popup_block_clip(), blender::ui::popup_block_free(), blender::ui::popup_block_refresh(), blender::ui::popup_block_scrolltest(), blender::ui::popup_block_template_confirm(), blender::ui::popup_block_template_confirm_is_supported(), blender::ui::popup_handler(), blender::ui::popup_menu_create_block(), blender::ui::Layout::prop(), blender::ui::region_winrct_get_no_margin(), blender::ui::searchbox_create_generic_ex(), blender::ui::searchbox_region_layout_fn(), blender::ui::template_operator_property_buts_draw_single(), blender::ui::textedit_begin(), blender::ui::tooltip_data_from_tool(), blender::ui::try_activate_rna_button(), blender::ui::uiItem_simple(), and blender::ui::widget_draw_text_icon().

◆ func

◆ func_arg1

void* blender::ui::Block::func_arg1 = nullptr

Definition at line 743 of file interface_intern.hh.

Referenced by blender::ui::block_func_set(), and blender::ui::def_but().

◆ func_arg2

void* blender::ui::Block::func_arg2 = nullptr

◆ func_argN

void* blender::ui::Block::func_argN = nullptr

◆ func_argN_copy_fn

ButtonArgNCopy blender::ui::Block::func_argN_copy_fn = nullptr

Definition at line 749 of file interface_intern.hh.

Referenced by blender::ui::block_funcN_set(), and blender::ui::def_but().

◆ func_argN_free_fn

ButtonArgNFree blender::ui::Block::func_argN_free_fn = nullptr

◆ funcN

ButtonHandleNFunc blender::ui::Block::funcN = nullptr

Definition at line 746 of file interface_intern.hh.

Referenced by blender::ui::block_funcN_set(), and blender::ui::def_but().

◆ handle

PopupBlockHandle* blender::ui::Block::handle = nullptr

Definition at line 802 of file interface_intern.hh.

Referenced by blender::ui::afterfunc_check(), blender::ui::apply_but_func(), blender::ui::block_bounds_calc_post_centered(), blender::ui::block_end_ex(), blender::ui::block_func_POPOVER(), blender::ui::block_func_POPUP(), blender::ui::block_open_begin(), blender::ui::block_region_set(), blender::ui::but_event_property_operator_string(), blender::ui::button_activate_exit(), blender::ui::button_activate_state(), blender::ui::colorpicker_hex_rna_cb(), blender::ui::colorpicker_hsv_linear_slider_update_cb(), blender::ui::colorpicker_hsv_perceptual_slider_update_cb(), blender::ui::colorpicker_rgb_perceptual_slider_update_cb(), blender::ui::colorpicker_rgba_update_cb(), blender::ui::colorpicker_wheel_cb(), blender::ui::def_but_rna__menu(), blender::ui::do_but_BUT(), blender::ui::handle_afterfunc_add_operator_ex(), blender::ui::handle_button_event(), blender::ui::menu_scroll_apply_offset_y(), blender::ui::paneltype_draw_impl(), blender::ui::popover_begin(), blender::ui::popover_keymap_fn(), blender::ui::popover_panel_invoke(), blender::ui::popup_block_close(), blender::ui::popup_block_create(), blender::ui::popup_block_free(), blender::ui::popup_block_position(), blender::ui::popup_block_refresh(), blender::ui::popup_block_scrolltest(), blender::ui::popup_block_template_close_cb(), blender::ui::popup_close_cb(), blender::ui::popup_context_menu_for_button(), blender::ui::popup_menu_begin_ex(), blender::ui::popup_menu_end_or_cancel(), blender::ui::popup_menu_retval_set(), blender::ui::popup_region_from_operator(), blender::ui::popup_translate(), and blender::ui::shortcut_get_operator_property().

◆ handle_func

◆ handle_func_arg

void* blender::ui::Block::handle_func_arg = nullptr

◆ is_color_gamma_picker

◆ layouts

◆ lock

bool blender::ui::Block::lock = false

◆ lockstr

const char* blender::ui::Block::lockstr = nullptr

◆ markdown_layout_cache

Vector<std::shared_ptr<MarkdownLayoutCache> > blender::ui::Block::markdown_layout_cache

◆ minbounds

◆ name

◆ next

Block* blender::ui::Block::next = nullptr

Definition at line 704 of file interface_intern.hh.

◆ oldblock

◆ panel

◆ pie_data

◆ post_block_layout_fns_pending

bool blender::ui::Block::post_block_layout_fns_pending = false

◆ prev

Block * blender::ui::Block::prev = nullptr

Definition at line 704 of file interface_intern.hh.

◆ puphash

uint blender::ui::Block::puphash = 0

Unique hash used to implement popup menu memory.

Definition at line 740 of file interface_intern.hh.

Referenced by blender::ui::pie_menu_begin(), blender::ui::popup_menu_create_block(), and blender::ui::popup_menu_memory__internal().

◆ rect

◆ saferct

◆ safety

rctf blender::ui::Block::safety = {}

Pull-downs, to detect outside, can differ per case how it is created.

Definition at line 799 of file interface_intern.hh.

Referenced by blender::ui::block_bounds_calc(), blender::ui::popup_block_position(), and blender::ui::popup_block_refresh().

◆ text_wrap_cache

Vector<std::shared_ptr<TextWrapCache> > blender::ui::Block::text_wrap_cache

◆ theme_style

char blender::ui::Block::theme_style = 0

BLOCK_THEME_STYLE_*

Definition at line 772 of file interface_intern.hh.

Referenced by blender::ui::block_theme_style_set(), and blender::ui::draw_button().

◆ tooltipdisabled

◆ ui_operator

wmOperator* blender::ui::Block::ui_operator = nullptr

use so presets can find the operator, across menus and from nested popups which fail for operator context.

Definition at line 806 of file interface_intern.hh.

Referenced by blender::ui::block_free_active_operator(), blender::ui::block_set_active_operator(), and blender::ui::context_active_operator_get().

◆ ui_operator_free

bool blender::ui::Block::ui_operator_free = false

◆ unit

◆ views

◆ winmat


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