Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_select.c
| Show First 20 Lines • Show All 1,075 Lines • ▼ Show 20 Lines | static uiBlock *node_find_menu(bContext *C, ARegion *ar, void *arg_op) | ||||
| uiBut *but; | uiBut *but; | ||||
| wmOperator *op = (wmOperator *)arg_op; | wmOperator *op = (wmOperator *)arg_op; | ||||
| block = UI_block_begin(C, ar, "_popup", UI_EMBOSS); | block = UI_block_begin(C, ar, "_popup", UI_EMBOSS); | ||||
| UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_MOVEMOUSE_QUIT | UI_BLOCK_SEARCH_MENU); | UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_MOVEMOUSE_QUIT | UI_BLOCK_SEARCH_MENU); | ||||
| UI_block_theme_style_set(block, UI_BLOCK_THEME_STYLE_POPUP); | UI_block_theme_style_set(block, UI_BLOCK_THEME_STYLE_POPUP); | ||||
| but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 10, 9 * UI_UNIT_X, UI_UNIT_Y, 0, 0, ""); | but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 10, 9 * UI_UNIT_X, UI_UNIT_Y, 0, 0, ""); | ||||
| UI_but_func_search_set(but, NULL, node_find_cb, op->type, node_find_call_cb, NULL); | UI_but_func_search_set(but, NULL, node_find_cb, op->type, false, node_find_call_cb, NULL); | ||||
| /* fake button, it holds space for search items */ | /* fake button, it holds space for search items */ | ||||
| uiDefBut(block, UI_BTYPE_LABEL, 0, "", 10, 10 - UI_searchbox_size_y(), UI_searchbox_size_x(), UI_searchbox_size_y(), NULL, 0, 0, 0, 0, NULL); | uiDefBut(block, UI_BTYPE_LABEL, 0, "", 10, 10 - UI_searchbox_size_y(), UI_searchbox_size_x(), UI_searchbox_size_y(), NULL, 0, 0, 0, 0, NULL); | ||||
| /* Move it downwards, mouse over button. */ | /* Move it downwards, mouse over button. */ | ||||
| UI_block_bounds_set_popup(block, 6, (const int[2]){0, -UI_UNIT_Y}); | UI_block_bounds_set_popup(block, 6, (const int[2]){0, -UI_UNIT_Y}); | ||||
| // UI_but_active_only(C, ar, block, but); XXX using this here makes Blender hang - investigate | // UI_but_active_only(C, ar, block, but); XXX using this here makes Blender hang - investigate | ||||
| Show All 37 Lines | |||||