Blender V5.0
blender::string_search::SearchItem Struct Reference

#include <BLI_string_search.hh>

Public Attributes

void * user_data
Span< StringRefnormalized_words
Span< int > word_group_ids
int main_group_id
int main_group_length
int total_length
float weight
int recent_time
bool is_deprecated

Detailed Description

Definition at line 19 of file BLI_string_search.hh.

Member Data Documentation

◆ is_deprecated

bool blender::string_search::SearchItem::is_deprecated

Deprecated items can still be found via search, but are at the bottom of the list.

Definition at line 44 of file BLI_string_search.hh.

Referenced by blender::string_search::score_query_against_words().

◆ main_group_id

int blender::string_search::SearchItem::main_group_id

The id of the group that is highlighted in the UI. In some places, the words in this group are given higher weight.

Definition at line 32 of file BLI_string_search.hh.

Referenced by blender::string_search::InitialsMatch::count_main_group_matches(), blender::string_search::get_best_word_index_that_startswith(), and blender::string_search::score_query_against_words().

◆ main_group_length

int blender::string_search::SearchItem::main_group_length

Definition at line 33 of file BLI_string_search.hh.

◆ normalized_words

◆ recent_time

int blender::string_search::SearchItem::recent_time

This is a logical time stamp, i.e. the greater it is, the more recent the item was used. The number is not based on an actual clock.

Definition at line 40 of file BLI_string_search.hh.

◆ total_length

int blender::string_search::SearchItem::total_length

Definition at line 34 of file BLI_string_search.hh.

◆ user_data

void* blender::string_search::SearchItem::user_data

Definition at line 20 of file BLI_string_search.hh.

◆ weight

float blender::string_search::SearchItem::weight

Definition at line 35 of file BLI_string_search.hh.

◆ word_group_ids

Span<int> blender::string_search::SearchItem::word_group_ids

When using menu-search, the search item is often split into multiple groups of words, each of which corresponds to a menu entry. This id is the same for words in the same group and different otherwise.

Definition at line 27 of file BLI_string_search.hh.

Referenced by blender::string_search::InitialsMatch::count_main_group_matches(), blender::string_search::get_best_word_index_that_startswith(), and blender::string_search::score_query_against_words().


The documentation for this struct was generated from the following file: