|
Blender V4.3
|
#include <cctype>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_text_types.h"#include "BLI_blenlib.h"#include "BLI_ghash.h"#include "BKE_context.hh"#include "BKE_screen.hh"#include "BKE_text.h"#include "BKE_text_suggestions.h"#include "WM_api.hh"#include "WM_types.hh"#include "ED_screen.hh"#include "ED_text.hh"#include "ED_undo.hh"#include "text_format.hh"#include "text_intern.hh"Go to the source code of this file.
Functions | |
Public API | |
| bool | space_text_do_suggest_select (SpaceText *st, const ARegion *region, const int mval[2]) |
| void | text_pop_suggest_list () |
Private API | |
| static void | text_autocomplete_free (bContext *C, wmOperator *op) |
| static GHash * | text_autocomplete_build (Text *text) |
| static void | get_suggest_prefix (Text *text, int offset) |
| static void | confirm_suggestion (Text *text) |
Auto Complete Operator | |
| static int | text_autocomplete_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| static int | text_autocomplete_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | text_autocomplete_cancel (bContext *C, wmOperator *op) |
| void | TEXT_OT_autocomplete (wmOperatorType *ot) |
|
static |
Definition at line 248 of file text_autocomplete.cc.
References BLI_assert, SuggItem::name, text_find_identifier_start(), texttool_suggest_selected(), texttool_text_clear(), texttool_text_is_active(), and txt_insert_buf().
Referenced by text_autocomplete_invoke(), and text_autocomplete_modal().
Definition at line 230 of file text_autocomplete.cc.
References len, text_find_identifier_start(), texttool_suggest_prefix(), and texttool_text_is_active().
Referenced by text_autocomplete_modal().
Definition at line 38 of file text_autocomplete.cc.
References Text::curc, Text::curl, l, SpaceText::left, SuggItem::next, TextLine::prev, SpaceText::runtime, space_text_update_character_width(), SUGG_LIST_SIZE, SUGG_LIST_WIDTH, SpaceText::text, texttool_suggest_first(), texttool_suggest_last(), texttool_suggest_select(), texttool_suggest_top(), texttool_text_is_active(), SpaceText::top, top, TXT_BODY_LEFT, TXT_LINE_HEIGHT, w(), x, and y.
Referenced by text_autocomplete_modal().
Definition at line 132 of file text_autocomplete.cc.
References BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_str_new(), BLI_ghashIterator_getValue(), BLI_str_utf8_as_unicode_or_error(), BLI_str_utf8_as_unicode_step_safe(), BLI_strdupn(), ED_text_format_get(), TextFormatType::format_identifier, GHASH_ITER, len, LISTBASE_FOREACH, STREQLEN, text_check_identifier_nodigit_unicode(), text_check_identifier_unicode(), text_find_identifier_start(), texttool_suggest_add(), texttool_suggest_prefix(), texttool_text_clear(), and texttool_text_set_active().
Referenced by text_autocomplete_invoke().
|
static |
Definition at line 554 of file text_autocomplete.cc.
References text_autocomplete_free().
Referenced by TEXT_OT_autocomplete().
|
static |
Definition at line 538 of file text_autocomplete.cc.
References BLI_ghash_free(), CTX_wm_space_text(), wmOperator::customdata, SpaceText::doplugins, MEM_freeN(), and texttool_text_clear().
Referenced by text_autocomplete_cancel(), text_autocomplete_invoke(), and text_autocomplete_modal().
|
static |
Definition at line 288 of file text_autocomplete.cc.
References confirm_suggestion(), CTX_data_edit_text(), CTX_wm_area(), CTX_wm_space_text(), Text::curl, wmOperator::customdata, SpaceText::doplugins, ED_area_tag_redraw(), ED_text_undo_push_init(), ED_undo_push(), wmOperatorType::name, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, SpaceText::text, text_autocomplete_build(), text_autocomplete_free(), text_update_line_edited(), texttool_suggest_first(), texttool_suggest_last(), wmOperator::type, and WM_event_add_modal_handler().
Referenced by TEXT_OT_autocomplete().
|
static |
Definition at line 316 of file text_autocomplete.cc.
References ATTR_FALLTHROUGH, BKE_area_find_region_type(), confirm_suggestion(), CTX_wm_area(), CTX_wm_space_text(), Text::curc, Text::curl, SpaceText::doplugins, ED_area_tag_redraw(), ED_text_undo_push_init(), ED_undo_push(), EVT_BACKSPACEKEY, EVT_DOWNARROWKEY, EVT_ESCKEY, EVT_LEFTARROWKEY, EVT_LEFTSHIFTKEY, EVT_PADENTER, EVT_PAGEDOWNKEY, EVT_PAGEUPKEY, EVT_RETKEY, EVT_RIGHTARROWKEY, EVT_RIGHTSHIFTKEY, EVT_UPARROWKEY, get_suggest_prefix(), KM_CTRL, KM_PRESS, LEFTMOUSE, TextLine::len, TextLine::line, wmEvent::modifier, MOUSEMOVE, wmEvent::mval, wmOperatorType::name, SuggItem::next, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, SuggItem::prev, RGN_TYPE_WINDOW, space_text_do_suggest_select(), SUGG_LIST_SIZE, SpaceText::text, text_autocomplete_free(), text_check_whitespace(), text_pop_suggest_list(), text_update_line_edited(), texttool_suggest_clear(), texttool_suggest_first(), texttool_suggest_last(), texttool_suggest_select(), texttool_suggest_selected(), texttool_text_is_active(), TOOL_SUGG_LIST, txt_move_left(), txt_move_right(), wmEvent::type, wmOperator::type, wmEvent::val, WHEELDOWNMOUSE, and WHEELUPMOUSE.
Referenced by TEXT_OT_autocomplete().
| void TEXT_OT_autocomplete | ( | wmOperatorType * | ot | ) |
Definition at line 559 of file text_autocomplete.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, ot, wmOperatorType::poll, text_autocomplete_cancel(), text_autocomplete_invoke(), text_autocomplete_modal(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void text_pop_suggest_list | ( | ) |
Definition at line 102 of file text_autocomplete.cc.
References SuggItem::next, SUGG_LIST_SIZE, texttool_suggest_first(), texttool_suggest_selected(), texttool_suggest_top(), and top.
Referenced by text_autocomplete_modal().