Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface.c
| Show First 20 Lines • Show All 6,655 Lines • ▼ Show 20 Lines | |||||
| void UI_but_func_search_set_tooltip(uiBut *but, uiButSearchTooltipFn tooltip_fn) | void UI_but_func_search_set_tooltip(uiBut *but, uiButSearchTooltipFn tooltip_fn) | ||||
| { | { | ||||
| uiButSearch *but_search = (uiButSearch *)but; | uiButSearch *but_search = (uiButSearch *)but; | ||||
| BLI_assert(but->type == UI_BTYPE_SEARCH_MENU); | BLI_assert(but->type == UI_BTYPE_SEARCH_MENU); | ||||
| but_search->item_tooltip_fn = tooltip_fn; | but_search->item_tooltip_fn = tooltip_fn; | ||||
| } | } | ||||
| void UI_but_func_search_set_all_strings_valid(uiBut *but, const bool value) | |||||
| { | |||||
| uiButSearch *but_search = (uiButSearch *)but; | |||||
| BLI_assert(but->type == UI_BTYPE_SEARCH_MENU); | |||||
| but_search->all_strings_valid = value; | |||||
| } | |||||
| /* Callbacks for operator search button. */ | /* Callbacks for operator search button. */ | ||||
| static void operator_enum_search_update_fn(const struct bContext *C, | static void operator_enum_search_update_fn(const struct bContext *C, | ||||
| void *but, | void *but, | ||||
| const char *str, | const char *str, | ||||
| uiSearchItems *items) | uiSearchItems *items) | ||||
| { | { | ||||
| wmOperatorType *ot = ((uiBut *)but)->optype; | wmOperatorType *ot = ((uiBut *)but)->optype; | ||||
| PropertyRNA *prop = ot->prop; | PropertyRNA *prop = ot->prop; | ||||
| ▲ Show 20 Lines • Show All 421 Lines • Show Last 20 Lines | |||||