Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | uiDefBut( | ||||
| block, UI_BTYPE_LABEL, 0, "", 10, 15, searchbox_width, searchbox_height, | block, UI_BTYPE_LABEL, 0, "", 10, 15, searchbox_width, searchbox_height, | ||||
| NULL, 0, 0, 0, 0, NULL); | NULL, 0, 0, 0, 0, NULL); | ||||
| but = uiDefSearchBut( | but = uiDefSearchBut( | ||||
| block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, | block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, | ||||
| searchbox_width, UI_UNIT_Y - 1, 0, 0, ""); | searchbox_width, UI_UNIT_Y - 1, 0, 0, ""); | ||||
| } | } | ||||
| UI_but_func_search_set( | UI_but_func_search_set( | ||||
| but, ui_searchbox_create_generic, search_func, | but, ui_searchbox_create_generic, search_func, | ||||
| search_arg, handle_func, active_item); | search_arg, false, handle_func, active_item); | ||||
| UI_block_bounds_set_normal(block, 0.3f * U.widget_unit); | UI_block_bounds_set_normal(block, 0.3f * U.widget_unit); | ||||
| UI_block_direction_set(block, UI_DIR_DOWN); | UI_block_direction_set(block, UI_DIR_DOWN); | ||||
| /* give search-field focus */ | /* give search-field focus */ | ||||
| UI_but_focus_on_enter_event(win, but); | UI_but_focus_on_enter_event(win, but); | ||||
| /* this type of search menu requires undo */ | /* this type of search menu requires undo */ | ||||
| ▲ Show 20 Lines • Show All 4,115 Lines • ▼ Show 20 Lines | for (WM_operatortype_iter(&iter); !BLI_ghashIterator_done(&iter); BLI_ghashIterator_step(&iter)) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void UI_but_func_operator_search(uiBut *but) | void UI_but_func_operator_search(uiBut *but) | ||||
| { | { | ||||
| UI_but_func_search_set( | UI_but_func_search_set( | ||||
| but, ui_searchbox_create_operator, operator_search_cb, | but, ui_searchbox_create_operator, operator_search_cb, | ||||
| NULL, operator_call_cb, NULL); | NULL, false, operator_call_cb, NULL); | ||||
| } | } | ||||
| void uiTemplateOperatorSearch(uiLayout *layout) | void uiTemplateOperatorSearch(uiLayout *layout) | ||||
| { | { | ||||
| uiBlock *block; | uiBlock *block; | ||||
| uiBut *but; | uiBut *but; | ||||
| static char search[256] = ""; | static char search[256] = ""; | ||||
| ▲ Show 20 Lines • Show All 761 Lines • Show Last 20 Lines | |||||