13#include <fmt/format.h>
51 const size_t str_len = strlen(
str);
55 str, str_len,
' ',
reinterpret_cast<int (*)[2]
>(words.
data()), words_max);
58 const char *ot_ui_name =
CTX_IFACE_(ot->translation_context, ot->name);
65 ot_ui_name,
str,
reinterpret_cast<int (*)[2]
>(words.
data()), words_len))
68 std::string name = ot_ui_name;
106 static char search[256] =
"";
108 block = layout->
block();
#define CTX_IFACE_(context, msgid)
void uiTemplateOperatorSearch(Layout *layout)
static void operator_search_exec_fn(bContext *C, void *, void *arg2)
ARegion * searchbox_create_operator(bContext *C, ARegion *butregion, ButtonSearch *search_but)
Button * uiDefSearchBut(Block *block, void *arg, int icon, int maxncpy, int x, int y, short width, short height, std::optional< StringRef > tip)
void button_func_operator_search(Button *but)
static void operator_search_update_fn(const bContext *C, void *, const char *str, SearchItems *items, const bool)
bool search_item_add(SearchItems *items, StringRef name, void *poin, int iconid, int64_t but_flag, uint8_t name_prefix_offset)
void block_layout_set_current(Block *block, Layout *layout)
void button_func_search_set(Button *but, ButtonSearchCreateFn search_create_fn, ButtonSearchUpdateFn search_update_fn, void *arg, bool free_arg, FreeArgFunc search_arg_free_fn, ButtonHandleFunc search_exec_fn, void *active)
std::optional< std::string > WM_key_event_operator_string(const bContext *C, const char *opname, wm::OpCallContext opcontext, IDProperty *properties, const bool is_strict)
bool bool int BLI_string_find_split_words(const char *str, size_t str_maxlen, char delim, int r_words[][2], int words_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
Span< wmOperatorType * > WM_operatortypes_registered_get()
int bool bool bool size_t size_t size_t int BLI_string_max_possible_word_count(int str_len) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
bool bool BLI_string_all_words_matched(const char *name, const char *str, int(*words)[2], int words_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
bool WM_operator_poll(bContext *C, wmOperatorType *ot)