Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_handlers.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 8,426 Lines • ▼ Show 20 Lines | void ui_but_activate_event(bContext *C, ARegion *ar, uiBut *but) | ||||
| button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER); | button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER); | ||||
| wm_event_init_from_window(win, &event); | wm_event_init_from_window(win, &event); | ||||
| event.type = EVT_BUT_OPEN; | event.type = EVT_BUT_OPEN; | ||||
| event.val = KM_PRESS; | event.val = KM_PRESS; | ||||
| event.customdata = but; | event.customdata = but; | ||||
| event.customdatafree = false; | event.customdatafree = false; | ||||
| ARegion *old_ar = CTX_wm_region(C); | |||||
| CTX_wm_region_set(C, ar); | |||||
| ui_do_button(C, but->block, but, &event); | ui_do_button(C, but->block, but, &event); | ||||
| CTX_wm_region_set(C, old_ar); | |||||
| } | } | ||||
| /** | /** | ||||
| * Simulate moving the mouse over a button (or navigating to it with arrow keys). | * Simulate moving the mouse over a button (or navigating to it with arrow keys). | ||||
| * | * | ||||
| * exported so menus can start with a highlighted button, | * exported so menus can start with a highlighted button, | ||||
| * even if the mouse isnt over it | * even if the mouse isnt over it | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 2,536 Lines • Show Last 20 Lines | |||||