Blender V4.3
blender::string_search::SearchItem Struct Reference

#include <BLI_string_search.hh>

Public Attributes

void * user_data
 
Span< StringRefnormalized_words
 
Span< intword_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 15 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 40 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 28 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 29 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 36 of file BLI_string_search.hh.

◆ total_length

int blender::string_search::SearchItem::total_length

Definition at line 30 of file BLI_string_search.hh.

◆ user_data

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

Definition at line 16 of file BLI_string_search.hh.

◆ weight

float blender::string_search::SearchItem::weight

Definition at line 31 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 23 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: