|
Blender V5.0
|
#include "MEM_guardedalloc.h"#include "RNA_access.hh"#include "RNA_types.hh"#include "UI_interface_layout.hh"Go to the source code of this file.
Classes | |
| struct | RNAUpdateCb |
Macros | |
| #define | CURVE_ZOOM_MAX (1.0f / 25.0f) |
| #define | ERROR_LIBDATA_MESSAGE N_("Cannot edit external library data") |
| #define | TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH (UI_UNIT_X * 4) |
| #define | TEMPLATE_SEARCH_TEXTBUT_HEIGHT UI_UNIT_Y |
Functions | |
| static void | rna_update_cb (bContext &C, const RNAUpdateCb &cb) |
| static void | rna_update_cb (bContext *C, void *arg_cb, void *) |
| int | template_search_textbut_width (PointerRNA *ptr, PropertyRNA *name_prop) |
| int | template_search_textbut_height () |
| void | template_add_button_search_menu (const bContext *C, uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, uiBlockCreateFunc block_func, void *block_argN, std::optional< blender::StringRef > tip, const bool use_previews, const bool editable, const bool live_icon, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN) |
| uiBlock * | template_common_search_menu (const bContext *C, ARegion *region, uiButSearchUpdateFn search_update_fn, void *search_arg, uiButHandleFunc search_exec_fn, void *active_item, uiButSearchTooltipFn item_tooltip_fn, const int preview_rows, const int preview_cols, float scale) |
Share between interface/templates/ files.
Definition in file interface_templates_intern.hh.
| #define CURVE_ZOOM_MAX (1.0f / 25.0f) |
Definition at line 22 of file interface_templates_intern.hh.
Referenced by curve_profile_can_zoom_in(), and curvemap_can_zoom_in().
Definition at line 23 of file interface_templates_intern.hh.
Referenced by modifier_panel_get_property_pointers(), shaderfx_panel_header(), uiTemplateColorRamp(), uiTemplateConstraintHeader(), uiTemplateCurveMapping(), and uiTemplateCurveProfile().
| #define TEMPLATE_SEARCH_TEXTBUT_HEIGHT UI_UNIT_Y |
Definition at line 27 of file interface_templates_intern.hh.
Referenced by template_search_textbut_height().
| #define TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH (UI_UNIT_X * 4) |
Definition at line 26 of file interface_templates_intern.hh.
Referenced by template_search_textbut_width().
|
inlinestatic |
Definition at line 34 of file interface_templates_intern.hh.
References C, RNAUpdateCb::prop, RNAUpdateCb::ptr, and RNA_property_update().
Referenced by add_preset_button(), colorband_add(), colorband_buttons_layout(), colorband_tools_fn(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_buttons_layout(), curvemap_tools_func(), CurveProfile_buttons_layout(), rna_update_cb(), and uiTemplateImage().
|
inlinestatic |
Definition at line 42 of file interface_templates_intern.hh.
References C, and rna_update_cb().
| void template_add_button_search_menu | ( | const bContext * | C, |
| uiLayout * | layout, | ||
| uiBlock * | block, | ||
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| uiBlockCreateFunc | block_func, | ||
| void * | block_argN, | ||
| std::optional< blender::StringRef > | tip, | ||
| const bool | use_previews, | ||
| const bool | editable, | ||
| const bool | live_icon, | ||
| uiButArgNFree | func_argN_free_fn = MEM_freeN, | ||
| uiButArgNCopy | func_argN_copy_fn = MEM_dupallocN ) |
Add a block button for the search menu for templateID and templateSearch.
Definition at line 57 of file interface_templates.cc.
References C, col, uiLayout::column(), CTX_wm_region(), PointerRNA::data, GS, ID_IS_EDITABLE, ID_SCR, ID::name, ptr, ARegion::regiontype, RGN_TYPE_TOOL_HEADER, RNA_property_pointer_get(), RNA_property_pointer_type(), RNA_struct_is_ID(), RNA_struct_ui_icon(), PointerRNA::type, UI_BUT_DISABLED, UI_but_drag_set_id(), UI_but_drawflag_enable(), UI_but_flag_enable(), UI_BUT_ICON_LEFT, UI_BUT_ICON_PREVIEW, ui_def_but_icon(), UI_HAS_ICON, ui_id_icon_get(), UI_UNIT_X, UI_UNIT_Y, and uiDefBlockButN().
Referenced by template_ID(), and template_search_add_button_searchmenu().
| uiBlock * template_common_search_menu | ( | const bContext * | C, |
| ARegion * | region, | ||
| uiButSearchUpdateFn | search_update_fn, | ||
| void * | search_arg, | ||
| uiButHandleFunc | search_exec_fn, | ||
| void * | active_item, | ||
| uiButSearchTooltipFn | item_tooltip_fn, | ||
| const int | preview_rows, | ||
| const int | preview_cols, | ||
| float | scale ) |
Definition at line 155 of file interface_templates.cc.
References C, CTX_wm_window(), blender::ui::Emboss, uiBut::flag, Label, U, UI_block_begin(), UI_block_bounds_set_normal(), UI_block_direction_set(), UI_block_flag_enable(), UI_BLOCK_LOOP, UI_BLOCK_SEARCH_MENU, UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), UI_but_focus_on_enter_event(), UI_but_func_search_set(), UI_but_func_search_set_tooltip(), UI_but_search_preview_grid_size_set(), UI_BUT_UNDO, UI_DIR_DOWN, UI_SCALE_FAC, UI_SEARCHBOX_BOUNDS, ui_searchbox_create_generic(), UI_searchbox_size_x_guess(), UI_searchbox_size_y(), UI_SEARCHBOX_TRIA_H, UI_UNIT_Y, uiDefBut(), uiDefSearchBut(), and w().
Referenced by id_search_menu(), and template_search_menu().
| int template_search_textbut_height | ( | ) |
Definition at line 52 of file interface_templates.cc.
References TEMPLATE_SEARCH_TEXTBUT_HEIGHT.
Referenced by template_ID(), and template_search_add_button_name().
| int template_search_textbut_width | ( | PointerRNA * | ptr, |
| PropertyRNA * | name_prop ) |
Definition at line 30 of file interface_templates.cc.
References BLI_assert, MEM_freeN(), name, PROP_STRING, ptr, RNA_property_string_get_alloc(), RNA_property_type(), str, TEMPLATE_SEARCH_TEXTBUT_MIN_WIDTH, UI_fontstyle_string_width(), UI_FSTYLE_WIDGET, UI_MAX_DRAW_STR, and UI_UNIT_X.
Referenced by template_ID(), and template_search_add_button_name().