Blender V5.0
interface_template_search.cc File Reference
#include "BLI_string_ref.hh"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "BLT_translation.hh"
#include "ANIM_action.hh"
#include "UI_interface_layout.hh"
#include "interface_intern.hh"
#include "interface_templates_intern.hh"

Go to the source code of this file.

Classes

struct  TemplateSearch

Functions

static void template_search_exec_fn (bContext *C, void *arg_template, void *item)
static uiBlocktemplate_search_menu (bContext *C, ARegion *region, void *arg_template)
static void template_search_add_button_searchmenu (const bContext *C, uiLayout *layout, uiBlock *block, TemplateSearch &template_search, const bool editable, const bool live_icon)
static void template_search_add_button_name (uiBlock *block, PointerRNA *active_ptr, const StructRNA *type)
static void template_search_add_button_operator (uiBlock *block, const char *const operator_name, const blender::wm::OpCallContext opcontext, const int icon, const bool editable, const std::optional< StringRefNull > button_text={})
static void template_search_buttons (const bContext *C, uiLayout *layout, TemplateSearch &template_search, const char *newop, const char *unlinkop, const std::optional< StringRef > text)
static PropertyRNAtemplate_search_get_searchprop (PointerRNA *targetptr, PropertyRNA *targetprop, PointerRNA *searchptr, const char *const searchpropname)
static bool template_search_setup (TemplateSearch &template_search, PointerRNA *ptr, const StringRefNull propname, PointerRNA *searchptr, const char *const searchpropname)
void uiTemplateSearch (uiLayout *layout, const bContext *C, PointerRNA *ptr, const StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, const std::optional< StringRef > text)
void uiTemplateSearchPreview (uiLayout *layout, bContext *C, PointerRNA *ptr, const StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, const int rows, const int cols, const std::optional< StringRef > text)

Function Documentation

◆ template_search_add_button_name()

◆ template_search_add_button_operator()

void template_search_add_button_operator ( uiBlock * block,
const char *const operator_name,
const blender::wm::OpCallContext opcontext,
const int icon,
const bool editable,
const std::optional< StringRefNull > button_text = {} )
static

Definition at line 116 of file interface_template_search.cc.

Referenced by template_search_buttons().

◆ template_search_add_button_searchmenu()

void template_search_add_button_searchmenu ( const bContext * C,
uiLayout * layout,
uiBlock * block,
TemplateSearch & template_search,
const bool editable,
const bool live_icon )
static

◆ template_search_buttons()

◆ template_search_exec_fn()

◆ template_search_get_searchprop()

PropertyRNA * template_search_get_searchprop ( PointerRNA * targetptr,
PropertyRNA * targetprop,
PointerRNA * searchptr,
const char *const searchpropname )
static

◆ template_search_menu()

◆ template_search_setup()

◆ 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,
const StringRefNull propname,
PointerRNA * searchptr,
const char * searchpropname,
const char * newop,
const char * unlinkop,
const int rows,
const int cols,
const std::optional< StringRef > text )