From 82704ac3edf0e37d9eea2860bc565bcf521ae593 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 7 May 2020 23:16:22 +1000 Subject: UI: support context menu in menu search popup --- source/blender/editors/include/UI_interface.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 4f010156c17..2ea03fa5bc2 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -512,6 +512,10 @@ typedef void (*uiButSearchUpdateFn)(const struct bContext *C, const char *str, uiSearchItems *items); typedef void (*uiButSearchArgFreeFn)(void *arg); +typedef bool (*uiButSearchContextMenuFn)(struct bContext *C, + void *arg, + void *active, + const struct wmEvent *event); /* Must return allocated string. */ typedef char *(*uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip); @@ -1579,6 +1583,7 @@ void UI_but_func_search_set(uiBut *but, uiButSearchArgFreeFn search_arg_free_fn, uiButHandleFunc handle_fn, void *active); +void UI_but_func_search_set_context_menu(uiBut *but, uiButSearchContextMenuFn context_menu_fn); void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string); /* height in pixels, it's using hardcoded values still */ -- cgit v1.2.3