本文整理汇总了C++中TextEdit::call_deferred方法的典型用法代码示例。如果您正苦于以下问题:C++ TextEdit::call_deferred方法的具体用法?C++ TextEdit::call_deferred怎么用?C++ TextEdit::call_deferred使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEdit
的用法示例。
在下文中一共展示了TextEdit::call_deferred方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _edit_option
void TextEditor::_edit_option(int p_op) {
TextEdit *tx = code_editor->get_text_edit();
switch (p_op) {
case EDIT_UNDO: {
tx->undo();
tx->call_deferred("grab_focus");
} break;
case EDIT_REDO: {
tx->redo();
tx->call_deferred("grab_focus");
} break;
case EDIT_CUT: {
tx->cut();
tx->call_deferred("grab_focus");
} break;
case EDIT_COPY: {
tx->copy();
tx->call_deferred("grab_focus");
} break;
case EDIT_PASTE: {
tx->paste();
tx->call_deferred("grab_focus");
} break;
case EDIT_SELECT_ALL: {
tx->select_all();
tx->call_deferred("grab_focus");
} break;
case EDIT_MOVE_LINE_UP: {
code_editor->move_lines_up();
} break;
case EDIT_MOVE_LINE_DOWN: {
code_editor->move_lines_down();
} break;
case EDIT_INDENT_LEFT: {
tx->indent_left();
} break;
case EDIT_INDENT_RIGHT: {
tx->indent_right();
} break;
case EDIT_DELETE_LINE: {
code_editor->delete_lines();
} break;
case EDIT_CLONE_DOWN: {
code_editor->clone_lines_down();
} break;
case EDIT_TOGGLE_FOLD_LINE: {
tx->toggle_fold_line(tx->cursor_get_line());
tx->update();
} break;
case EDIT_FOLD_ALL_LINES: {
tx->fold_all_lines();
tx->update();
} break;
case EDIT_UNFOLD_ALL_LINES: {
tx->unhide_all_lines();
tx->update();
} break;
case EDIT_TRIM_TRAILING_WHITESAPCE: {
trim_trailing_whitespace();
} break;
case EDIT_CONVERT_INDENT_TO_SPACES: {
convert_indent_to_spaces();
} break;
case EDIT_CONVERT_INDENT_TO_TABS: {
convert_indent_to_tabs();
} break;
case EDIT_TO_UPPERCASE: {
_convert_case(CodeTextEditor::UPPER);
} break;
case EDIT_TO_LOWERCASE: {
_convert_case(CodeTextEditor::LOWER);
} break;
case EDIT_CAPITALIZE: {
_convert_case(CodeTextEditor::CAPITALIZE);
} break;
case SEARCH_FIND: {
code_editor->get_find_replace_bar()->popup_search();
//.........这里部分代码省略.........