|
Blender V4.3
|
#include <algorithm>#include <cerrno>#include <cstring>#include <sstream>#include "MEM_guardedalloc.h"#include "DNA_text_types.h"#include "BLI_blenlib.h"#include "BLI_math_base.h"#include "BLI_math_vector.h"#include "BLI_string_cursor_utf8.h"#include "BLI_string_utf8.h"#include "BLI_time.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_report.hh"#include "BKE_text.h"#include "WM_api.hh"#include "WM_types.hh"#include "ED_curve.hh"#include "ED_screen.hh"#include "ED_text.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "text_format.hh"#include "text_intern.hh"Go to the source code of this file.
Classes | |
| struct | TextScroll |
| struct | SetSelection |
Convert Whitespace Operator | |
| enum | { TO_SPACES , TO_TABS } |
| static const EnumPropertyItem | whitespace_type_items [] |
| static int | text_convert_whitespace_exec (bContext *C, wmOperator *op) |
| void | TEXT_OT_convert_whitespace (wmOperatorType *ot) |
Scroll Operator | |
| enum | eScrollZone { SCROLLHANDLE_INVALID_OUTSIDE = -1 , SCROLLHANDLE_BAR , SCROLLHANDLE_MIN_OUTSIDE , SCROLLHANDLE_MAX_OUTSIDE } |
| static void | space_text_screen_clamp (SpaceText *st, const ARegion *region) |
| static void | space_text_screen_skip (SpaceText *st, ARegion *region, int lines) |
| static void | text_scroll_state_init (TextScroll *tsc, SpaceText *st, ARegion *region) |
| static bool | text_scroll_poll (bContext *C) |
| static int | text_scroll_exec (bContext *C, wmOperator *op) |
| static void | text_scroll_apply (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | scroll_exit (bContext *C, wmOperator *op) |
| static int | text_scroll_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | text_scroll_cancel (bContext *C, wmOperator *op) |
| static int | text_scroll_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | TEXT_OT_scroll (wmOperatorType *ot) |
Find Operator | |
| enum | { TEXT_FIND = 0 , TEXT_REPLACE = 1 } |
| static int | text_find_and_replace (bContext *C, wmOperator *op, short mode) |
| static int | text_find_exec (bContext *C, wmOperator *op) |
| void | TEXT_OT_find (wmOperatorType *ot) |
Resolve Conflict Operator | |
| enum | { RESOLVE_IGNORE , RESOLVE_RELOAD , RESOLVE_SAVE , RESOLVE_MAKE_INTERNAL } |
| static const EnumPropertyItem | resolution_items [] |
| static bool | text_resolve_conflict_poll (bContext *C) |
| static int | text_resolve_conflict_exec (bContext *C, wmOperator *op) |
| static int | text_resolve_conflict_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| void | TEXT_OT_resolve_conflict (wmOperatorType *ot) |
Move Operator | |
| static const EnumPropertyItem | move_type_items [] |
| static int | space_text_get_cursor_rel (const SpaceText *st, const ARegion *region, TextLine *linein, int rell, int relc) |
| static int | cursor_skip_find_line (const SpaceText *st, const ARegion *region, int lines, TextLine **linep, int *charp, int *rell, int *relc) |
| static void | txt_wrap_move_bol (SpaceText *st, ARegion *region, const bool sel) |
| static void | txt_wrap_move_eol (SpaceText *st, ARegion *region, const bool sel) |
| static void | txt_wrap_move_up (SpaceText *st, ARegion *region, const bool sel) |
| static void | txt_wrap_move_down (SpaceText *st, ARegion *region, const bool sel) |
| static void | space_text_cursor_skip (const SpaceText *st, const ARegion *region, Text *text, int lines, const bool sel) |
| static int | text_move_cursor (bContext *C, int type, bool select) |
| static int | text_move_exec (bContext *C, wmOperator *op) |
| void | TEXT_OT_move (wmOperatorType *ot) |
Delete Operator | |
| static const EnumPropertyItem | delete_type_items [] |
| static bool | text_unlink_poll (bContext *C) |
| static int | text_unlink_exec (bContext *C, wmOperator *) |
| static int | text_unlink_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| void | TEXT_OT_unlink (wmOperatorType *ot) |
| static int | text_delete_exec (bContext *C, wmOperator *op) |
| void | TEXT_OT_delete (wmOperatorType *ot) |
| anonymous enum |
| Enumerator | |
|---|---|
| TO_SPACES | |
| TO_TABS | |
Definition at line 1441 of file text_ops.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| TEXT_FIND | |
| TEXT_REPLACE | |
Definition at line 3776 of file text_ops.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| RESOLVE_IGNORE | |
| RESOLVE_RELOAD | |
| RESOLVE_SAVE | |
| RESOLVE_MAKE_INTERNAL | |
Definition at line 4177 of file text_ops.cc.
| enum eScrollZone |
| Enumerator | |
|---|---|
| SCROLLHANDLE_INVALID_OUTSIDE | |
| SCROLLHANDLE_BAR | |
| SCROLLHANDLE_MIN_OUTSIDE | |
| SCROLLHANDLE_MAX_OUTSIDE | |
Definition at line 2689 of file text_ops.cc.
|
static |
This function converts the indentation tabs from a buffer to spaces.
| in_buf | A pointer to a cstring. |
| tab_size | The size, in spaces, of the tab character. |
| r_out_buf_len | The #strlen of the returned buffer. |
Definition at line 152 of file text_ops.cc.
References MEM_mallocN, and test_line_start().
Referenced by text_paste_exec().
|
static |
Definition at line 1873 of file text_ops.cc.
References TextLine::next, TextLine::prev, space_text_get_char_pos(), space_text_get_visible_lines(), and space_text_wrap_offset_in_line().
Referenced by space_text_cursor_skip().
Definition at line 3096 of file text_ops.cc.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), col, str, and SpaceText::tabnumber.
Referenced by text_cursor_set_to_pos().
Definition at line 3083 of file text_ops.cc.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), str, and SpaceText::tabnumber.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 1710 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), space_text_update_cursor_moved(), text_run_script(), txt_move_lines(), and WM_event_add_notifier().
Referenced by TEXT_OT_move_lines().
|
static |
Definition at line 2842 of file text_ops.cc.
References CTX_wm_area(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), SpaceText::flags, MEM_freeN(), SpaceText::runtime, TextScroll::size_px, TextScroll::state, and SpaceText::top.
Referenced by text_scroll_cancel(), text_scroll_invoke(), and text_scroll_modal().
|
static |
Definition at line 3138 of file text_ops.cc.
References BLI_assert, BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), ELEM, ListBase::first, ListBase::last, len, TextLine::len, TextLine::line, Text::lines, max, space_text_get_line_pos_wrapped(), space_text_wrap_width(), SpaceText::tabnumber, and SpaceText::text.
Referenced by text_cursor_set_to_pos().
|
static |
Moves the cursor vertically by the specified number of lines. If the destination line is shorter than the current cursor position, the cursor will be positioned at the end of this line.
This is to replace screen_skip for PageUp/Down operations.
Definition at line 2226 of file text_ops.cc.
References cursor_skip_find_line(), TextLine::len, TextLine::next, TextLine::prev, space_text_get_cursor_rel(), txt_pop_sel(), and SpaceText::wordwrap.
Referenced by text_move_cursor().
|
static |
Get cursor position in line by relative wrapped line and column positions.
Definition at line 1779 of file text_ops.cc.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), ELEM, TextLine::len, TextLine::line, max, space_text_wrap_width(), and SpaceText::tabnumber.
Referenced by space_text_cursor_skip(), txt_wrap_move_down(), and txt_wrap_move_up().
|
static |
Definition at line 3114 of file text_ops.cc.
References ListBase::first, TextLine::line, Text::lines, TextLine::next, space_text_get_visible_lines(), SpaceText::text, SpaceText::top, and y.
Referenced by space_text_cursor_set_to_pos_wrapped().
| BLI_INLINE int space_text_pixel_x_to_column | ( | const SpaceText * | st, |
| const int | x ) |
Definition at line 206 of file text_ops.cc.
References SpaceText::runtime.
Referenced by text_cursor_set_to_pos().
Definition at line 2666 of file text_ops.cc.
References SpaceText::runtime, space_text_get_total_lines(), and SpaceText::top.
Referenced by space_text_screen_skip(), and text_reload_exec().
Definition at line 2682 of file text_ops.cc.
References space_text_screen_clamp(), and SpaceText::top.
Referenced by text_scroll_exec(), and text_scroll_modal().
|
static |
Tests if the given character represents a start of a new line or the indentation part of a line.
| c | The current character. |
| r_last_state | A pointer to a flag representing the last state. The flag may be modified. |
Definition at line 66 of file text_ops.cc.
References ELEM.
Referenced by buf_tabs_to_spaces().
|
static |
This function receives a character and returns its closing pair if it exists.
| character | Character to find the closing pair. |
Definition at line 81 of file text_ops.cc.
Referenced by text_delete_exec(), and text_insert_invoke().
|
static |
Definition at line 1372 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), ED_text_format_comment_line_prefix(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), space_text_drawcache_tag_update(), space_text_update_cursor_moved(), text_update_edited(), txt_comment(), txt_has_sel(), txt_order_cursors(), txt_uncomment(), and WM_event_add_notifier().
Referenced by TEXT_OT_comment_toggle().
|
static |
Definition at line 1448 of file text_ops.cc.
References BLI_assert, BLI_str_utf8_offset_from_column_with_tabs(), BLI_str_utf8_offset_to_column_with_tabs(), BLI_str_utf8_size_safe(), BLI_strdup(), BLI_strdupn(), FlattenString::buf, CTX_data_edit_text(), CTX_wm_space_text(), flatten_string(), flatten_string_free(), len, LISTBASE_FOREACH, MEM_freeN(), MEM_mallocN, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), space_text_drawcache_tag_update(), space_text_update_cursor_moved(), STREQ, SpaceText::tabnumber, text_update_edited(), TO_TABS, TXT_TABSIZE, and WM_event_add_notifier().
Referenced by TEXT_OT_convert_whitespace().
|
static |
Definition at line 1122 of file text_ops.cc.
References CTX_data_edit_text(), OPERATOR_FINISHED, and txt_copy_clipboard().
Referenced by TEXT_OT_copy().
|
static |
Definition at line 3345 of file text_ops.cc.
References CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, ED_space_text_scroll_to_cursor(), wmEvent::mval, SetSelection::mval_prev, NC_TEXT, ND_CURSOR, SpaceText::text, text_cursor_set_to_pos(), text_cursor_timer_ensure(), text_cursor_timer_remove(), TIMER, wmEvent::type, WM_event_add_notifier(), and SpaceText::wordwrap.
Referenced by text_selection_set_invoke(), and text_selection_set_modal().
|
static |
Definition at line 3465 of file text_ops.cc.
References CTX_wm_region(), CTX_wm_space_text(), NC_TEXT, ND_CURSOR, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_get(), space_text_update_cursor_moved(), SpaceText::text, text_cursor_set_to_pos(), and WM_event_add_notifier().
Referenced by text_cursor_set_invoke(), and TEXT_OT_cursor_set().
|
static |
Definition at line 3384 of file text_ops.cc.
References CTX_wm_space_text(), wmOperator::customdata, MEM_freeN(), NC_TEXT, ND_CURSOR, space_text_update_cursor_moved(), SpaceText::text, text_cursor_timer_remove(), text_select_update_primary_clipboard(), and WM_event_add_notifier().
Referenced by text_selection_set_cancel(), and text_selection_set_modal().
|
static |
Definition at line 3480 of file text_ops.cc.
References CTX_wm_space_text(), wmEvent::mval, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_set(), SpaceText::runtime, and text_cursor_set_exec().
Referenced by TEXT_OT_cursor_set().
|
static |
Definition at line 3264 of file text_ops.cc.
References flatten_column_to_offset(), flatten_width(), SpaceText::left, TextLine::next, TextLine::prev, space_text_cursor_set_to_pos_wrapped(), space_text_pixel_x_to_column(), space_text_update_character_width(), SpaceText::text, SpaceText::top, TXT_BODY_LEFT, txt_get_span(), TXT_LINE_HEIGHT, txt_pop_sel(), w(), SpaceText::wordwrap, and y.
Referenced by text_cursor_set_apply(), and text_cursor_set_exec().
|
static |
Definition at line 3324 of file text_ops.cc.
References CTX_wm_manager(), CTX_wm_window(), TIMER, SetSelection::timer, and WM_event_timer_add().
Referenced by text_cursor_set_apply().
|
static |
Definition at line 3334 of file text_ops.cc.
References CTX_wm_manager(), CTX_wm_window(), SetSelection::timer, and WM_event_timer_remove().
Referenced by text_cursor_set_apply(), and text_cursor_set_exit().
|
static |
Definition at line 1149 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), SpaceText::live_edit, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, space_text_drawcache_tag_update(), space_text_update_cursor_moved(), text_run_script(), txt_copy_clipboard(), txt_delete_selected(), and WM_event_add_notifier().
Referenced by TEXT_OT_cut().
|
static |
Definition at line 239 of file text_ops.cc.
References CTX_data_edit_text().
Referenced by TEXT_OT_run_script(), and TEXT_OT_to_3d_object().
|
static |
Definition at line 2516 of file text_ops.cc.
References BLI_str_find_prev_char_utf8(), CTX_data_edit_text(), CTX_wm_space_text(), DEL_NEXT_CHAR, DEL_NEXT_WORD, DEL_PREV_CHAR, DEL_PREV_WORD, ED_text_undo_push_init(), SpaceText::live_edit, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), space_text_drawcache_tag_update(), space_text_update_cursor_moved(), text_closing_character_pair_get(), text_run_script(), text_update_line_edited(), txt_backspace_char(), txt_backspace_word(), txt_calc_tab_left(), txt_calc_tab_right(), txt_cursor_is_line_end(), txt_cursor_is_line_start(), txt_delete_char(), txt_delete_word(), txt_has_sel(), txt_move_right(), txt_order_cursors(), TXT_TABSTOSPACES, USER_TEXT_EDIT_AUTO_CLOSE, and WM_event_add_notifier().
Referenced by TEXT_OT_delete().
|
static |
Definition at line 1067 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_run_script(), txt_duplicate_line(), and WM_event_add_notifier().
Referenced by TEXT_OT_duplicate_line().
|
static |
Definition at line 248 of file text_ops.cc.
References BKE_id_is_editable(), CTX_data_edit_text(), and CTX_data_main().
Referenced by TEXT_OT_comment_toggle(), TEXT_OT_convert_whitespace(), TEXT_OT_copy(), TEXT_OT_cut(), TEXT_OT_delete(), TEXT_OT_duplicate_line(), TEXT_OT_indent(), TEXT_OT_indent_or_autocomplete(), TEXT_OT_insert(), TEXT_OT_jump(), TEXT_OT_line_break(), TEXT_OT_make_internal(), TEXT_OT_move(), TEXT_OT_move_lines(), TEXT_OT_paste(), TEXT_OT_refresh_pyconstraints(), TEXT_OT_reload(), TEXT_OT_save(), TEXT_OT_save_as(), TEXT_OT_select_all(), TEXT_OT_select_line(), TEXT_OT_select_word(), TEXT_OT_unindent(), and text_resolve_conflict_poll().
|
static |
Definition at line 3781 of file text_ops.cc.
References BKE_reportf(), BLI_strcasecmp(), CTX_data_main(), CTX_wm_space_text(), ED_text_undo_push_init(), SpaceText::findstr, ListBase::first, SpaceText::flags, MEM_freeN(), NA_EDITED, NC_TEXT, ND_CURSOR, OPERATOR_CANCELLED, OPERATOR_FINISHED, SpaceText::replacestr, wmOperator::reports, RPT_INFO, space_text_drawcache_tag_update(), space_text_update_cursor_moved(), ST_FIND_ALL, ST_FIND_WRAP, ST_MATCH_CASE, STREQ, SpaceText::text, TEXT_FIND, TEXT_REPLACE, Main::texts, txt_find_string(), txt_has_sel(), txt_insert_buf(), txt_move_toline(), txt_sel_to_buf(), and WM_event_add_notifier().
Referenced by text_find_exec(), text_find_set_selected_exec(), and text_replace_exec().
|
static |
Definition at line 3852 of file text_ops.cc.
References TEXT_FIND, and text_find_and_replace().
Referenced by TEXT_OT_find().
|
static |
Definition at line 3952 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), SpaceText::findstr, MEM_freeN(), OPERATOR_FINISHED, STRNCPY, TEXT_FIND, text_find_and_replace(), and txt_sel_to_buf().
Referenced by TEXT_OT_find_set_selected().
|
static |
Definition at line 1228 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, space_text_drawcache_tag_update(), space_text_update_cursor_moved(), text_update_edited(), txt_add_char(), txt_has_sel(), txt_indent(), txt_order_cursors(), and WM_event_add_notifier().
Referenced by TEXT_OT_indent().
|
static |
Definition at line 1193 of file text_ops.cc.
References CTX_data_edit_text(), ELEM, OPERATOR_FINISHED, txt_has_sel(), WM_OP_EXEC_DEFAULT, WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().
Referenced by TEXT_OT_indent_or_autocomplete().
|
static |
Definition at line 3580 of file text_ops.cc.
References BLI_str_utf8_as_unicode_step_safe(), CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), MEM_freeN(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, SpaceText::overwrite, wmOperator::ptr, RNA_string_get_alloc(), space_text_drawcache_tag_update(), space_text_update_cursor_moved(), str, text_update_line_edited(), txt_add_char(), txt_replace_char(), and WM_event_add_notifier().
Referenced by text_insert_invoke(), and TEXT_OT_insert().
|
static |
Definition at line 3623 of file text_ops.cc.
References BLI_str_utf8_as_unicode_or_error(), BLI_str_utf8_from_unicode_len(), BLI_str_utf8_size_safe(), BLI_UTF8_MAX, CTX_wm_space_text(), Text::curc, Text::curl, KM_CTRL, KM_OSKEY, len, SpaceText::live_edit, wmEvent::modifier, TextLine::next, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, ret, RNA_string_length(), RNA_string_set(), Text::selc, Text::sell, str, SpaceText::text, text_closing_character_pair_get(), text_insert_exec(), text_run_script(), text_span_is_blank(), text_update_line_edited(), txt_add_char(), txt_has_sel(), txt_move_left(), txt_order_cursors(), txt_pop_sel(), USER_TEXT_EDIT_AUTO_CLOSE, and wmEvent::utf8_buf.
Referenced by TEXT_OT_insert().
|
static |
Definition at line 2455 of file text_ops.cc.
References CTX_data_edit_text(), NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), space_text_update_cursor_moved(), txt_get_span(), txt_move_toline(), and WM_event_add_notifier().
Referenced by TEXT_OT_jump().
|
static |
Definition at line 2479 of file text_ops.cc.
References IFACE_, and WM_operator_props_dialog_popup().
Referenced by TEXT_OT_jump().
|
static |
Definition at line 4102 of file text_ops.cc.
References BKE_report(), BLI_findindex(), BLI_str_utf8_offset_to_index(), CTX_data_edit_text(), FILE_MAX, OPERATOR_CANCELLED, OPERATOR_FINISHED, printf, wmOperator::ptr, wmOperator::reports, RNA_property_int_get(), RNA_property_int_set(), RNA_property_is_set(), RNA_property_string_get(), RNA_property_string_set(), RNA_struct_find_property(), RPT_WARNING, text_jump_to_file_at_point_external(), and text_jump_to_file_at_point_internal().
Referenced by TEXT_OT_jump_to_file_at_point().
|
static |
Definition at line 4021 of file text_ops.cc.
References BKE_report(), BKE_reportf(), BLI_path_basename(), BPY_run_string_as_string(), int, MEM_freeN(), BPy_RunErrInfo::report_prefix, BPy_RunErrInfo::reports, RPT_ERROR, RPT_INFO, and UNUSED_VARS.
Referenced by text_jump_to_file_at_point_exec().
|
static |
Definition at line 4064 of file text_ops.cc.
References BKE_main_blendfile_path(), BKE_reportf(), BKE_text_load(), BLI_path_cmp, CTX_data_main(), ED_text_activate_in_screen(), LISTBASE_FOREACH, NC_TEXT, ND_CURSOR, RPT_INFO, RPT_WARNING, Main::texts, txt_move_to(), and WM_event_add_notifier().
Referenced by text_jump_to_file_at_point_exec().
|
static |
Definition at line 1315 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, space_text_drawcache_tag_update(), space_text_update_cursor_moved(), SpaceText::tabnumber, text_update_line_edited(), txt_add_char(), txt_setcurr_tab_spaces(), txt_split_curline(), TXT_TABSTOSPACES, and WM_event_add_notifier().
Referenced by TEXT_OT_line_break().
|
static |
Definition at line 3517 of file text_ops.cc.
References BLI_time_now_seconds(), CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), int, NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, SpaceText::runtime, SpaceText::showlinenrs, space_text_update_character_width(), space_text_update_cursor_moved(), time, TXT_BODY_LPAD, txt_move_toline(), TXT_NUMCOL_WIDTH, WM_event_add_notifier(), and WM_event_utf8_to_ascii().
Referenced by TEXT_OT_line_number().
|
static |
Definition at line 638 of file text_ops.cc.
References CTX_data_edit_text(), MEM_SAFE_FREE, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, space_text_update_cursor_moved(), TXT_ISDIRTY, TXT_ISMEM, and WM_event_add_notifier().
Referenced by TEXT_OT_make_internal(), and text_resolve_conflict_exec().
Definition at line 2269 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), FILE_BOTTOM, FILE_TOP, LINE_BEGIN, LINE_END, NC_TEXT, ND_CURSOR, NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, OPERATOR_FINISHED, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, RGN_TYPE_WINDOW, SpaceText::runtime, select(), space_text_cursor_skip(), space_text_update_cursor_moved(), SpaceText::text, text_select_update_primary_clipboard(), txt_cursor_is_line_end(), txt_cursor_is_line_start(), txt_has_sel(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_down(), txt_move_eof(), txt_move_eol(), txt_move_left(), txt_move_right(), txt_move_up(), txt_order_cursors(), txt_pop_sel(), txt_sel_clear(), txt_wrap_move_bol(), txt_wrap_move_down(), txt_wrap_move_eol(), txt_wrap_move_up(), WM_event_add_notifier(), and SpaceText::wordwrap.
Referenced by text_move_exec(), and text_move_select_exec().
|
static |
Definition at line 2394 of file text_ops.cc.
References wmOperator::ptr, RNA_enum_get(), and text_move_cursor().
Referenced by TEXT_OT_move().
|
static |
Definition at line 2422 of file text_ops.cc.
References wmOperator::ptr, RNA_enum_get(), and text_move_cursor().
Referenced by TEXT_OT_move_select().
|
static |
Definition at line 332 of file text_ops.cc.
References BKE_text_add(), CTX_data_main(), CTX_wm_space_text(), DATA_, SpaceText::left, NA_ADDED, NC_TEXT, OPERATOR_FINISHED, ptr, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), SpaceText::runtime, space_text_drawcache_tag_update(), SpaceText::text, SpaceText::top, UI_context_active_but_prop_get_templateID(), and WM_event_add_notifier().
Referenced by TEXT_OT_new().
|
static |
Definition at line 234 of file text_ops.cc.
Referenced by TEXT_OT_new(), and TEXT_OT_open().
|
static |
Definition at line 394 of file text_ops.cc.
References wmOperator::customdata, and MEM_freeN().
Referenced by TEXT_OT_open().
|
static |
Definition at line 399 of file text_ops.cc.
References BKE_main_blendfile_path(), BKE_text_load_ex(), CTX_data_main(), CTX_wm_space_text(), wmOperator::customdata, FILE_MAX, SpaceText::left, MEM_freeN(), NA_ADDED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, PropertyPointerRNA::prop, PropertyPointerRNA::ptr, wmOperator::ptr, RNA_boolean_get(), RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RNA_string_get(), SpaceText::runtime, space_text_drawcache_tag_update(), SpaceText::text, text_open_init(), SpaceText::top, and WM_event_add_notifier().
Referenced by text_open_invoke(), and TEXT_OT_open().
|
static |
Definition at line 385 of file text_ops.cc.
References wmOperator::customdata, MEM_callocN, PropertyPointerRNA::prop, PropertyPointerRNA::ptr, and UI_context_active_but_prop_get_templateID().
Referenced by text_open_exec(), and text_open_invoke().
|
static |
Definition at line 447 of file text_ops.cc.
References BKE_main_blendfile_path(), CTX_data_edit_text(), CTX_data_main(), OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), text_open_exec(), text_open_init(), and WM_event_add_fileselect().
Referenced by TEXT_OT_open().
| void TEXT_OT_comment_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 1409 of file text_ops.cc.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), wmOperatorType::srna, text_comment_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_convert_whitespace | ( | wmOperatorType * | ot | ) |
Definition at line 1584 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, text_convert_whitespace_exec(), text_edit_poll(), TO_SPACES, and whitespace_type_items.
Referenced by text_operatortypes().
| void TEXT_OT_copy | ( | wmOperatorType * | ot | ) |
Definition at line 1131 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_copy_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_cursor_set | ( | wmOperatorType * | ot | ) |
Definition at line 3494 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, text_cursor_set_exec(), text_cursor_set_invoke(), and text_region_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_cut | ( | wmOperatorType * | ot | ) |
Definition at line 1172 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_cut_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 2606 of file text_ops.cc.
References DEL_NEXT_CHAR, delete_type_items, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), wmOperatorType::srna, text_delete_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_duplicate_line | ( | wmOperatorType * | ot | ) |
Definition at line 1085 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_duplicate_line_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_find | ( | wmOperatorType * | ot | ) |
Definition at line 3857 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_find_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_find_set_selected | ( | wmOperatorType * | ot | ) |
Definition at line 3969 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_find_set_selected_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_indent | ( | wmOperatorType * | ot | ) |
Definition at line 1253 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_edit_poll(), and text_indent_exec().
Referenced by text_operatortypes().
| void TEXT_OT_indent_or_autocomplete | ( | wmOperatorType * | ot | ) |
Definition at line 1207 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), and text_indent_or_autocomplete_exec().
Referenced by text_operatortypes().
| void TEXT_OT_insert | ( | wmOperatorType * | ot | ) |
Definition at line 3746 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_property_flag(), RNA_def_string(), wmOperatorType::srna, text_edit_poll(), text_insert_exec(), and text_insert_invoke().
Referenced by text_operatortypes().
| void TEXT_OT_jump | ( | wmOperatorType * | ot | ) |
Definition at line 2484 of file text_ops.cc.
References BLT_I18NCONTEXT_ID_TEXT, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_int(), RNA_def_property_translation_context(), wmOperatorType::srna, text_edit_poll(), text_jump_exec(), and text_jump_invoke().
Referenced by text_operatortypes().
| void TEXT_OT_jump_to_file_at_point | ( | wmOperatorType * | ot | ) |
Definition at line 4148 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, FILE_MAX, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), RNA_def_string(), wmOperatorType::srna, and text_jump_to_file_at_point_exec().
Referenced by text_operatortypes().
| void TEXT_OT_line_break | ( | wmOperatorType * | ot | ) |
Definition at line 1351 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_edit_poll(), and text_line_break_exec().
Referenced by text_operatortypes().
| void TEXT_OT_line_number | ( | wmOperatorType * | ot | ) |
Definition at line 3562 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, text_line_number_invoke(), and text_region_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_make_internal | ( | wmOperatorType * | ot | ) |
Definition at line 652 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_edit_poll(), and text_make_internal_exec().
Referenced by text_operatortypes().
| void TEXT_OT_move | ( | wmOperatorType * | ot | ) |
Definition at line 2401 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, LINE_BEGIN, move_type_items, wmOperatorType::name, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, text_edit_poll(), and text_move_exec().
Referenced by text_operatortypes().
| void TEXT_OT_move_lines | ( | wmOperatorType * | ot | ) |
Definition at line 1730 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, move_lines_exec(), wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, text_edit_poll(), TXT_MOVE_LINE_DOWN, and TXT_MOVE_LINE_UP.
Referenced by text_operatortypes().
| void TEXT_OT_move_select | ( | wmOperatorType * | ot | ) |
Definition at line 2429 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, LINE_BEGIN, move_type_items, wmOperatorType::name, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, text_move_select_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_new | ( | wmOperatorType * | ot | ) |
Definition at line 364 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_new_exec(), and text_new_poll().
Referenced by text_operatortypes().
| void TEXT_OT_open | ( | wmOperatorType * | ot | ) |
Definition at line 464 of file text_ops.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, FILE_TYPE_PYSCRIPT, FILE_TYPE_TEXT, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, text_new_poll(), text_open_cancel(), text_open_exec(), text_open_invoke(), WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by text_operatortypes().
| void TEXT_OT_overwrite_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 2648 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_space_edit_poll(), and text_toggle_overwrite_exec().
Referenced by text_operatortypes().
| void TEXT_OT_paste | ( | wmOperatorType * | ot | ) |
Definition at line 1037 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, text_edit_poll(), and text_paste_exec().
Referenced by text_operatortypes().
| void TEXT_OT_refresh_pyconstraints | ( | wmOperatorType * | ot | ) |
Definition at line 975 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), and text_refresh_pyconstraints_exec().
Referenced by text_operatortypes().
| void TEXT_OT_reload | ( | wmOperatorType * | ot | ) |
Definition at line 554 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), text_reload_exec(), and text_reload_invoke().
Referenced by text_operatortypes().
| void TEXT_OT_replace | ( | wmOperatorType * | ot | ) |
Definition at line 3926 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, text_replace_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_replace_set_selected | ( | wmOperatorType * | ot | ) |
Definition at line 4000 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_replace_set_selected_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_resolve_conflict | ( | wmOperatorType * | ot | ) |
Definition at line 4284 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, resolution_items, RESOLVE_IGNORE, RNA_def_enum(), wmOperatorType::srna, text_resolve_conflict_exec(), text_resolve_conflict_invoke(), and text_resolve_conflict_poll().
Referenced by text_operatortypes().
| void TEXT_OT_run_script | ( | wmOperatorType * | ot | ) |
Definition at line 907 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, text_data_poll(), and text_run_script_exec().
Referenced by text_operatortypes().
| void TEXT_OT_save | ( | wmOperatorType * | ot | ) |
Definition at line 756 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), text_save_exec(), and text_save_invoke().
Referenced by text_operatortypes().
| void TEXT_OT_save_as | ( | wmOperatorType * | ot | ) |
Definition at line 827 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, FILE_DEFAULTDISPLAY, FILE_SAVE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, FILE_TYPE_PYSCRIPT, FILE_TYPE_TEXT, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), text_save_as_exec(), text_save_as_invoke(), WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by text_operatortypes().
| void TEXT_OT_scroll | ( | wmOperatorType * | ot | ) |
Definition at line 2937 of file text_ops.cc.
References BLT_I18NCONTEXT_ID_TEXT, wmOperatorType::cancel, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_XY, OPTYPE_INTERNAL, ot, wmOperatorType::poll, RNA_def_int(), RNA_def_property_translation_context(), wmOperatorType::srna, text_scroll_cancel(), text_scroll_exec(), text_scroll_invoke(), text_scroll_modal(), and text_scroll_poll().
Referenced by text_operatortypes().
| void TEXT_OT_scroll_bar | ( | wmOperatorType * | ot | ) |
Definition at line 3047 of file text_ops.cc.
References BLT_I18NCONTEXT_ID_TEXT, wmOperatorType::cancel, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, ot, wmOperatorType::poll, RNA_def_int(), RNA_def_property_translation_context(), wmOperatorType::srna, text_region_scroll_poll(), text_scroll_bar_invoke(), text_scroll_cancel(), and text_scroll_modal().
Referenced by text_operatortypes().
| void TEXT_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 1627 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), and text_select_all_exec().
Referenced by text_operatortypes().
| void TEXT_OT_select_line | ( | wmOperatorType * | ot | ) |
Definition at line 1659 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), and text_select_line_exec().
Referenced by text_operatortypes().
| void TEXT_OT_select_word | ( | wmOperatorType * | ot | ) |
Definition at line 1692 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), and text_select_word_exec().
Referenced by text_operatortypes().
| void TEXT_OT_selection_set | ( | wmOperatorType * | ot | ) |
Definition at line 3445 of file text_ops.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, wmOperatorType::poll, text_region_edit_poll(), text_selection_set_cancel(), text_selection_set_invoke(), and text_selection_set_modal().
Referenced by text_operatortypes().
| void TEXT_OT_to_3d_object | ( | wmOperatorType * | ot | ) |
Definition at line 4321 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, text_data_poll(), and text_to_3d_object_exec().
Referenced by text_operatortypes().
| void TEXT_OT_unindent | ( | wmOperatorType * | ot | ) |
Definition at line 1294 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_edit_poll(), and text_unindent_exec().
Referenced by text_operatortypes().
| void TEXT_OT_unlink | ( | wmOperatorType * | ot | ) |
Definition at line 616 of file text_ops.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_unlink_exec(), text_unlink_invoke(), and text_unlink_poll().
Referenced by text_operatortypes().
|
static |
Definition at line 993 of file text_ops.cc.
References buf_tabs_to_spaces(), CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), SpaceText::live_edit, MEM_freeN(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), space_text_drawcache_tag_update(), space_text_update_cursor_moved(), text_run_script(), text_update_edited(), txt_insert_buf(), TXT_TABSIZE, TXT_TABSTOSPACES, WM_clipboard_text_get(), and WM_event_add_notifier().
Referenced by TEXT_OT_paste().
|
static |
Definition at line 928 of file text_ops.cc.
References BPY_pyconstraint_update(), bPose::chanbase, CONSTRAINT_TYPE_PYTHON, bPoseChannel::constraints, Object::constraints, CTX_data_edit_text(), CTX_data_main(), bConstraint::data, DEG_id_tag_update(), ListBase::first, Object::id, ID_RECALC_GEOMETRY, bConstraint::next, bPoseChannel::next, ID::next, OB_ARMATURE, Main::objects, OPERATOR_FINISHED, Object::pose, bConstraint::type, Object::type, and update().
Referenced by TEXT_OT_refresh_pyconstraints().
|
static |
Definition at line 281 of file text_ops.cc.
References BKE_id_is_editable(), CTX_data_edit_text(), CTX_data_main(), CTX_wm_region(), CTX_wm_space_text(), and RGN_TYPE_WINDOW.
Referenced by TEXT_OT_cursor_set(), TEXT_OT_line_number(), and TEXT_OT_selection_set().
|
static |
Definition at line 2968 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), and RGN_TYPE_WINDOW.
Referenced by TEXT_OT_scroll_bar().
|
static |
Definition at line 498 of file text_ops.cc.
References BKE_report(), BKE_text_reload(), BLI_findindex(), BPY_text_free_code(), CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, space_text_drawcache_tag_update(), space_text_screen_clamp(), space_text_update_cursor_moved(), text_update_edited(), SpaceText::top, txt_move_to(), and WM_event_add_notifier().
Referenced by TEXT_OT_reload(), and text_resolve_conflict_exec().
|
static |
Definition at line 543 of file text_ops.cc.
References ALERT_ICON_NONE, IFACE_, and WM_operator_confirm_ex().
Referenced by TEXT_OT_reload().
Definition at line 3875 of file text_ops.cc.
References BLI_findindex(), CTX_wm_space_text(), ED_text_undo_push_init(), SpaceText::findstr, SpaceText::flags, MEM_freeN(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, SpaceText::replacestr, space_text_drawcache_tag_update(), ST_MATCH_CASE, SpaceText::text, txt_find_string(), txt_has_sel(), txt_insert_buf(), txt_move_to(), txt_move_toline(), and WM_event_add_notifier().
Referenced by text_replace_exec().
|
static |
Definition at line 3917 of file text_ops.cc.
References wmOperator::ptr, RNA_boolean_get(), text_find_and_replace(), TEXT_REPLACE, and text_replace_all().
Referenced by TEXT_OT_replace().
|
static |
Definition at line 3987 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), MEM_freeN(), OPERATOR_FINISHED, SpaceText::replacestr, STRNCPY, and txt_sel_to_buf().
Referenced by TEXT_OT_replace_set_selected().
|
static |
Definition at line 4197 of file text_ops.cc.
References BKE_text_file_modified_ignore(), CTX_data_edit_text(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RESOLVE_IGNORE, RESOLVE_MAKE_INTERNAL, RESOLVE_RELOAD, RESOLVE_SAVE, RNA_enum_get(), text_make_internal_exec(), text_reload_exec(), and text_save_exec().
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 4217 of file text_ops.cc.
References BKE_text_file_modified_check(), CTX_data_edit_text(), IFACE_, OPERATOR_INTERFACE, RESOLVE_IGNORE, RESOLVE_MAKE_INTERNAL, RESOLVE_RELOAD, RESOLVE_SAVE, TXT_ISDIRTY, wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uiItemEnumO_ptr().
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 4186 of file text_ops.cc.
References CTX_data_edit_text(), text_edit_poll(), and TXT_ISMEM.
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 855 of file text_ops.cc.
References BPY_run_text(), CTX_data_edit_text(), NA_EDITED, NC_TEXT, NC_WINDOW, OPERATOR_CANCELLED, OPERATOR_FINISHED, space_text_update_cursor_moved(), and WM_event_add_notifier().
Referenced by move_lines_exec(), text_cut_exec(), text_delete_exec(), text_duplicate_line_exec(), text_insert_invoke(), text_paste_exec(), and text_run_script_exec().
|
static |
Definition at line 894 of file text_ops.cc.
References BKE_report(), OPERATOR_CANCELLED, wmOperator::reports, RPT_ERROR, and text_run_script().
Referenced by TEXT_OT_run_script().
|
static |
Definition at line 775 of file text_ops.cc.
References BLI_strdup(), CTX_data_edit_text(), CTX_data_main(), FILE_MAX, MEM_freeN(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_string_get(), space_text_update_cursor_moved(), txt_write_file(), and WM_event_add_notifier().
Referenced by TEXT_OT_save_as(), and text_save_as_invoke().
|
static |
Definition at line 801 of file text_ops.cc.
References BKE_main_blendfile_path(), CTX_data_edit_text(), CTX_data_main(), OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), text_save_as_exec(), TXT_ISMEM, and WM_event_add_fileselect().
Referenced by TEXT_OT_save_as().
|
static |
Definition at line 731 of file text_ops.cc.
References CTX_data_edit_text(), CTX_data_main(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::reports, space_text_update_cursor_moved(), txt_write_file(), and WM_event_add_notifier().
Referenced by TEXT_OT_save(), text_resolve_conflict_exec(), and text_save_invoke().
|
static |
Definition at line 744 of file text_ops.cc.
References CTX_data_edit_text(), OPERATOR_CANCELLED, text_save_exec(), TXT_ISMEM, WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().
Referenced by TEXT_OT_save().
|
static |
Definition at line 2753 of file text_ops.cc.
References copy_v2_v2_int(), CTX_wm_area(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), TextScroll::is_first, TextScroll::is_scrollbar, SpaceText::left, MOUSEPAN, TextScroll::mval_delta, TextScroll::mval_prev, TextScroll::ofs_delta, TextScroll::ofs_delta_px, TextScroll::ofs_init, TextScroll::ofs_max, SpaceText::runtime, TextScroll::size_px, space_text_update_character_width(), TextScroll::state, sub_v2_v2v2_int(), SpaceText::top, wmEvent::type, and SpaceText::wordwrap.
Referenced by text_scroll_bar_invoke(), text_scroll_invoke(), and text_scroll_modal().
|
static |
Definition at line 2986 of file text_ops.cc.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, SpaceText::flags, TextScroll::is_first, TextScroll::is_scrollbar, MEM_callocN, MIDDLEMOUSE, TextScroll::mval_prev, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_struct_property_is_set(), SpaceText::runtime, SCROLLHANDLE_BAR, SCROLLHANDLE_INVALID_OUTSIDE, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN_OUTSIDE, ST_SCROLL_SELECT, text_scroll_apply(), text_scroll_exec(), text_scroll_state_init(), TXT_SCROLL_SPACE, wmEvent::type, WM_event_add_modal_handler(), and TextScroll::zone.
Referenced by TEXT_OT_scroll_bar().
|
static |
Definition at line 2892 of file text_ops.cc.
References scroll_exit().
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
|
static |
Definition at line 2735 of file text_ops.cc.
References CTX_wm_area(), CTX_wm_region(), CTX_wm_space_text(), ED_area_tag_redraw(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), and space_text_screen_skip().
Referenced by TEXT_OT_scroll(), text_scroll_bar_invoke(), and text_scroll_invoke().
|
static |
Definition at line 2897 of file text_ops.cc.
References copy_v2_v2_int(), CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, SpaceText::flags, TextScroll::is_first, TextScroll::is_scrollbar, MEM_callocN, MOUSEPAN, TextScroll::mval_delta, TextScroll::mval_prev, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_struct_property_is_set(), SpaceText::runtime, scroll_exit(), SCROLLHANDLE_BAR, space_text_update_character_width(), ST_SCROLL_SELECT, text_scroll_apply(), text_scroll_exec(), text_scroll_state_init(), wmEvent::type, WM_event_add_modal_handler(), wmEvent::xy, and TextScroll::zone.
Referenced by TEXT_OT_scroll().
|
static |
Definition at line 2860 of file text_ops.cc.
References CTX_wm_area(), CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), ELEM, KM_RELEASE, LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, SpaceText::runtime, scroll_exit(), SCROLLHANDLE_BAR, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN_OUTSIDE, space_text_screen_skip(), text_scroll_apply(), wmEvent::type, wmEvent::val, and TextScroll::zone.
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
|
static |
Definition at line 2728 of file text_ops.cc.
References CTX_data_edit_text().
Referenced by TEXT_OT_scroll().
|
static |
Definition at line 2715 of file text_ops.cc.
References SpaceText::left, max_ii(), TextScroll::ofs_init, TextScroll::ofs_max, SpaceText::runtime, TextScroll::size_px, space_text_get_total_lines(), TextScroll::state, SpaceText::top, and TXT_LINE_HEIGHT.
Referenced by text_scroll_bar_invoke(), and text_scroll_invoke().
|
static |
Definition at line 1613 of file text_ops.cc.
References CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, space_text_update_cursor_moved(), text_select_update_primary_clipboard(), txt_sel_all(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_all().
|
static |
Definition at line 1645 of file text_ops.cc.
References CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, space_text_update_cursor_moved(), text_select_update_primary_clipboard(), txt_sel_line(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_line().
|
static |
Definition at line 212 of file text_ops.cc.
References MEM_freeN(), txt_has_sel(), txt_sel_to_buf(), WM_capabilities_flag(), WM_CAPABILITY_PRIMARY_CLIPBOARD, and WM_clipboard_text_set().
Referenced by text_cursor_set_exit(), text_move_cursor(), text_select_all_exec(), text_select_line_exec(), and text_select_word_exec().
|
static |
Definition at line 1677 of file text_ops.cc.
References BLI_str_cursor_step_bounds_utf8(), CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, space_text_update_cursor_moved(), text_select_update_primary_clipboard(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_word().
|
static |
Definition at line 3440 of file text_ops.cc.
References text_cursor_set_exit().
Referenced by TEXT_OT_selection_set().
|
static |
Definition at line 3398 of file text_ops.cc.
References CTX_wm_space_text(), wmOperator::customdata, ListBase::first, Text::lines, MEM_callocN, wmEvent::mval, SetSelection::mval_prev, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, SpaceText::runtime, SetSelection::selc, Text::selc, SetSelection::sell, Text::sell, SpaceText::text, text_cursor_set_apply(), txt_get_span(), and WM_event_add_modal_handler().
Referenced by TEXT_OT_selection_set().
|
static |
Definition at line 3423 of file text_ops.cc.
References LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, text_cursor_set_apply(), text_cursor_set_exit(), TIMER, and wmEvent::type.
Referenced by TEXT_OT_selection_set().
| bool text_space_edit_poll | ( | bContext * | C | ) |
Definition at line 264 of file text_ops.cc.
References BKE_id_is_editable(), CTX_data_edit_text(), CTX_data_main(), and CTX_wm_space_text().
Referenced by TEXT_OT_autocomplete(), TEXT_OT_find(), TEXT_OT_find_set_selected(), TEXT_OT_move_select(), TEXT_OT_overwrite_toggle(), TEXT_OT_replace(), and TEXT_OT_replace_set_selected().
|
static |
This function receives a range and returns true if the range is blank.
| line1 | The first TextLine argument. |
| line1_char | The character number of line1. |
| line2 | The second TextLine argument. |
| line2_char | The character number of line2. |
Definition at line 108 of file text_ops.cc.
References ELEM, TextLine::next, and txt_get_span().
Referenced by text_insert_invoke().
|
static |
Definition at line 4311 of file text_ops.cc.
References CTX_data_edit_text(), ED_text_to_object(), OPERATOR_FINISHED, wmOperator::ptr, and RNA_boolean_get().
Referenced by TEXT_OT_to_3d_object().
|
static |
Definition at line 2637 of file text_ops.cc.
References CTX_wm_space_text(), NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, SpaceText::overwrite, SpaceText::text, and WM_event_add_notifier().
Referenced by TEXT_OT_overwrite_toggle().
|
static |
Definition at line 1274 of file text_ops.cc.
References CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, space_text_drawcache_tag_update(), space_text_update_cursor_moved(), text_update_edited(), txt_order_cursors(), txt_unindent(), and WM_event_add_notifier().
Referenced by TEXT_OT_unindent().
|
static |
Definition at line 579 of file text_ops.cc.
References BKE_id_delete(), CTX_data_edit_text(), CTX_data_main(), CTX_wm_space_text(), NA_REMOVED, NC_TEXT, OPERATOR_FINISHED, space_text_drawcache_tag_update(), space_text_update_cursor_moved(), SpaceText::text, and WM_event_add_notifier().
Referenced by TEXT_OT_unlink().
|
static |
Definition at line 605 of file text_ops.cc.
References ALERT_ICON_NONE, IFACE_, and WM_operator_confirm_ex().
Referenced by TEXT_OT_unlink().
|
static |
Definition at line 573 of file text_ops.cc.
References CTX_data_edit_text().
Referenced by TEXT_OT_unlink().
| void text_update_edited | ( | Text * | text | ) |
Definition at line 319 of file text_ops.cc.
References LISTBASE_FOREACH, and text_update_line_edited().
Referenced by text_comment_exec(), text_convert_whitespace_exec(), text_indent_exec(), text_paste_exec(), text_reload_exec(), and text_unindent_exec().
| void text_update_line_edited | ( | TextLine * | line | ) |
Definition at line 309 of file text_ops.cc.
References MEM_SAFE_FREE.
Referenced by text_autocomplete_invoke(), text_autocomplete_modal(), text_delete_exec(), text_insert_exec(), text_insert_invoke(), text_line_break_exec(), and text_update_edited().
|
static |
Definition at line 1106 of file text_ops.cc.
References MEM_freeN(), txt_has_sel(), txt_sel_to_buf(), and WM_clipboard_text_set().
Referenced by text_copy_exec(), and text_cut_exec().
Definition at line 1967 of file text_ops.cc.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_offset_from_column_with_tabs(), BLI_str_utf8_size_safe(), ELEM, max, space_text_update_character_width(), space_text_wrap_width(), SpaceText::tabnumber, SpaceText::text, txt_pop_sel(), and TXT_TABSIZE.
Referenced by text_move_cursor().
Definition at line 2180 of file text_ops.cc.
References col, TextLine::next, space_text_get_char_pos(), space_text_get_cursor_rel(), space_text_get_visible_lines(), space_text_update_character_width(), space_text_wrap_offset_in_line(), SpaceText::text, and txt_pop_sel().
Referenced by text_move_cursor().
Definition at line 2054 of file text_ops.cc.
References BLI_str_find_prev_char_utf8(), BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), ELEM, max, space_text_update_character_width(), space_text_wrap_width(), SpaceText::tabnumber, SpaceText::text, and txt_pop_sel().
Referenced by text_move_cursor().
Definition at line 2139 of file text_ops.cc.
References col, TextLine::prev, space_text_get_char_pos(), space_text_get_cursor_rel(), space_text_get_visible_lines(), space_text_update_character_width(), space_text_wrap_offset_in_line(), SpaceText::text, and txt_pop_sel().
Referenced by text_move_cursor().
|
static |
Definition at line 673 of file text_ops.cc.
References BKE_main_blendfile_path(), BKE_reportf(), BLI_exists(), BLI_file_is_writable(), BLI_fopen(), BLI_path_abs(), BLI_stat(), FILE_MAX, LISTBASE_FOREACH, RPT_, RPT_ERROR, RPT_INFO, RPT_WARNING, and STRNCPY.
Referenced by text_save_as_exec(), and text_save_exec().
|
static |
Definition at line 2508 of file text_ops.cc.
Referenced by TEXT_OT_delete().
|
static |
Definition at line 1760 of file text_ops.cc.
Referenced by TEXT_OT_move(), and TEXT_OT_move_select().
|
static |
Definition at line 4178 of file text_ops.cc.
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 1442 of file text_ops.cc.
Referenced by TEXT_OT_convert_whitespace().