Blender
V3.3
|
#include "BLI_array.hh"
#include "BLI_linear_allocator.hh"
#include "BLI_multi_value_map.hh"
#include "BLI_span.hh"
#include "BLI_string.h"
#include "BLI_string_ref.hh"
#include "BLI_string_search.h"
#include "BLI_string_utf8.h"
#include "BLI_timeit.hh"
Go to the source code of this file.
Classes | |
struct | SearchItem |
struct | StringSearch |
Namespaces | |
blender | |
blender::string_search | |
Macros | |
#define | UI_MENU_ARROW_SEP "\xe2\x96\xb6" |
#define | UI_MENU_ARROW_SEP_UNICODE 0x25b6 |
Variables | |
static constexpr int | blender::string_search::unused_word = -1 |
#define UI_MENU_ARROW_SEP "\xe2\x96\xb6" |
Definition at line 14 of file string_search.cc.
#define UI_MENU_ARROW_SEP_UNICODE 0x25b6 |
Definition at line 15 of file string_search.cc.
void BLI_string_search_add | ( | StringSearch * | search, |
const char * | str, | ||
void * | user_data, | ||
int | weight | ||
) |
Add a new possible result to the search. The caller keeps ownership of all parameters.
weight | Can be used to customize the order when multiple items have the same match score. |
Definition at line 412 of file string_search.cc.
References StringSearch::allocator, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::LinearAllocator< Allocator >::construct_array_copy(), blender::string_search::extract_normalized_words(), StringSearch::items, str, and user_data.
Referenced by blender::ui::attribute_search_add_items(), id_search_cb(), id_search_cb_tagged(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::space_node::node_find_update_fn(), operator_enum_search_update_fn(), and ui_rna_collection_search_update_fn().
void BLI_string_search_free | ( | StringSearch * | string_search | ) |
Definition at line 487 of file string_search.cc.
Referenced by blender::ui::attribute_search_add_items(), id_search_cb(), id_search_cb_tagged(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::space_node::node_find_update_fn(), and operator_enum_search_update_fn().
StringSearch* BLI_string_search_new | ( | void | ) |
Definition at line 407 of file string_search.cc.
Referenced by blender::ui::attribute_search_add_items(), id_search_cb(), id_search_cb_tagged(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::space_node::node_find_update_fn(), operator_enum_search_update_fn(), and ui_rna_collection_search_update_fn().
int BLI_string_search_query | ( | StringSearch * | search, |
const char * | query, | ||
void *** | r_data | ||
) |
Filter and sort all previously added search items. Returns an array containing the filtered user data. The caller has to free the returned array.
Definition at line 427 of file string_search.cc.
References Freestyle::a, blender::MultiValueMap< Key, Value >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), AT, usdtokens::b(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::string_search::extract_normalized_words(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), indices, blender::StringRefBase::is_empty(), StringSearch::items, blender::MultiValueMap< Key, Value >::keys(), blender::MultiValueMap< Key, Value >::lookup(), MEM_malloc_arrayN, query, blender::string_search::score_query_against_words(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), sort(), and SearchItem::user_data.
Referenced by blender::ui::attribute_search_add_items(), id_search_cb(), id_search_cb_tagged(), blender::ed::space_node::link_drag_search_update_fn(), menu_search_update_fn(), blender::ed::space_node::node_find_update_fn(), and operator_enum_search_update_fn().