|
Blender V5.0
|
#include "BKE_library.hh"#include "BKE_screen.hh"#include "BLI_math_color.h"#include "BLI_string_ref.hh"#include "ED_fileselect.hh"#include "ED_screen.hh"#include "RNA_access.hh"#include "UI_interface_layout.hh"#include "interface_intern.hh"#include "interface_templates_intern.hh"Go to the source code of this file.
Functions | |
Search Menu Helpers | |
| 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, const std::optional< blender::StringRef > tip, const bool use_previews, const bool editable, const bool live_icon, uiButArgNFree func_argN_free_fn, uiButArgNCopy func_argN_copy_fn) |
| 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) |
Header Template | |
| void | uiTemplateHeader (uiLayout *layout, bContext *C) |
RNA Path Builder Template | |
| void | uiTemplatePathBuilder (uiLayout *layout, PointerRNA *ptr, const StringRefNull propname, PointerRNA *, const std::optional< StringRefNull > text) |
Node Socket Icon Template | |
| void | uiTemplateNodeSocket (uiLayout *layout, bContext *, const float color[4]) |
FileSelectParams Path Button Template | |
| void | uiTemplateFileSelectPath (uiLayout *layout, bContext *C, FileSelectParams *params) |
| 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().
| void uiTemplateFileSelectPath | ( | uiLayout * | layout, |
| bContext * | C, | ||
| FileSelectParams * | params ) |
Definition at line 306 of file interface_templates.cc.
References uiLayout::block(), C, CTX_wm_screen(), CTX_wm_space_file(), ED_file_path_button(), and params.
Definition at line 245 of file interface_templates.cc.
References uiLayout::absolute_block(), C, and ED_area_header_switchbutton().
Definition at line 287 of file interface_templates.cc.
References uiLayout::block(), uiBut::col, NodeSocket, rgba_float_to_uchar(), UI_block_align_begin(), UI_block_align_end(), UI_UNIT_X, UI_UNIT_Y, and uiDefBut().
Referenced by blender::nodes::socket_items::ui::draw_item_in_list().
| void uiTemplatePathBuilder | ( | uiLayout * | layout, |
| PointerRNA * | ptr, | ||
| blender::StringRefNull | propname, | ||
| PointerRNA * | root_ptr, | ||
| std::optional< blender::StringRefNull > | text ) |
This is creating/editing RNA-Paths
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().