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 3,501 Lines • ▼ Show 20 Lines | #endif | ||||
| } | } | ||||
| else { | else { | ||||
| UI_but_ensure_in_view(C, data->region, but); | UI_but_ensure_in_view(C, data->region, but); | ||||
| } | } | ||||
| WM_cursor_modal_set(win, WM_CURSOR_TEXT_EDIT); | WM_cursor_modal_set(win, WM_CURSOR_TEXT_EDIT); | ||||
| #ifdef WITH_INPUT_IME | #ifdef WITH_INPUT_IME | ||||
| if (is_num_but == false && BLT_lang_is_ime_supported()) { | if (!is_num_but) { | ||||
| ui_textedit_ime_begin(win, but); | ui_textedit_ime_begin(win, but); | ||||
| } | } | ||||
| #endif | #endif | ||||
| } | } | ||||
| static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data) | static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data) | ||||
| { | { | ||||
| wmWindow *win = data->window; | wmWindow *win = data->window; | ||||
| ▲ Show 20 Lines • Show All 387 Lines • ▼ Show 20 Lines | #endif | ||||
| skip_undo_push = true; | skip_undo_push = true; | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| if ((event->ascii || event->utf8_buf[0]) && (retval == WM_UI_HANDLER_CONTINUE) | if ((event->ascii || event->utf8_buf[0]) && (retval == WM_UI_HANDLER_CONTINUE) | ||||
| #ifdef WITH_INPUT_IME | #ifdef WITH_INPUT_IME | ||||
| && !is_ime_composing && (!WM_event_is_ime_switch(event) || !BLT_lang_is_ime_supported()) | && !is_ime_composing && !WM_event_is_ime_switch(event) | ||||
| #endif | #endif | ||||
| ) { | ) { | ||||
| char ascii = event->ascii; | char ascii = event->ascii; | ||||
| const char *utf8_buf = event->utf8_buf; | const char *utf8_buf = event->utf8_buf; | ||||
| /* Exception that's useful for number buttons, some keyboard | /* Exception that's useful for number buttons, some keyboard | ||||
| * numpads have a comma instead of a period. */ | * numpads have a comma instead of a period. */ | ||||
| if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER)) { /* Could use `data->min`. */ | if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER)) { /* Could use `data->min`. */ | ||||
| ▲ Show 20 Lines • Show All 7,904 Lines • Show Last 20 Lines | |||||