|
Blender V4.5
|
#include <algorithm>#include <cerrno>#include <cstring>#include <sstream>#include "MEM_guardedalloc.h"#include "DNA_camera_types.h"#include "DNA_text_types.h"#include "BLI_fileops.h"#include "BLI_listbase.h"#include "BLI_math_base.h"#include "BLI_math_vector.h"#include "BLI_path_utils.hh"#include "BLI_rect.h"#include "BLI_string.h"#include "BLI_string_cursor_utf8.h"#include "BLI_string_utf8.h"#include "BLI_time.h"#include "BLI_vector_set.hh"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_node.hh"#include "BKE_node_legacy_types.hh"#include "BKE_node_runtime.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 "RE_engine.h"#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 wmOperatorStatus | 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 wmOperatorStatus | 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 wmOperatorStatus | text_scroll_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| static void | text_scroll_cancel (bContext *C, wmOperator *op) |
| static wmOperatorStatus | 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 wmOperatorStatus | text_find_and_replace (bContext *C, wmOperator *op, short mode) |
| static wmOperatorStatus | 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 wmOperatorStatus | text_resolve_conflict_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | 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 wmOperatorStatus | text_move_cursor (bContext *C, int type, bool select) |
| static wmOperatorStatus | 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 wmOperatorStatus | text_unlink_exec (bContext *C, wmOperator *) |
| static wmOperatorStatus | text_unlink_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| void | TEXT_OT_unlink (wmOperatorType *ot) |
| static wmOperatorStatus | text_delete_exec (bContext *C, wmOperator *op) |
| void | TEXT_OT_delete (wmOperatorType *ot) |
| anonymous enum |
| Enumerator | |
|---|---|
| RESOLVE_IGNORE | |
| RESOLVE_RELOAD | |
| RESOLVE_SAVE | |
| RESOLVE_MAKE_INTERNAL | |
Definition at line 4129 of file text_ops.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| TO_SPACES | |
| TO_TABS | |
Definition at line 1386 of file text_ops.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| TEXT_FIND | |
| TEXT_REPLACE | |
Definition at line 3726 of file text_ops.cc.
| enum eScrollZone |
Enum for TextScroll::zone (scroll-bar handles).
| Enumerator | |
|---|---|
| SCROLLHANDLE_INVALID_OUTSIDE | |
| SCROLLHANDLE_BAR | |
| SCROLLHANDLE_MIN_OUTSIDE | |
| SCROLLHANDLE_MAX_OUTSIDE | |
Definition at line 2630 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 165 of file text_ops.cc.
References MEM_malloc_arrayN(), and test_line_start().
Referenced by text_paste_exec().
|
static |
Definition at line 1816 of file text_ops.cc.
References linep, space_text_get_char_pos(), space_text_get_visible_lines(), and space_text_wrap_offset_in_line().
Referenced by space_text_cursor_skip().
|
static |
Definition at line 3041 of file text_ops.cc.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), col, i, str, and SpaceText::tabnumber.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 3028 of file text_ops.cc.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), i, str, and SpaceText::tabnumber.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 1653 of file text_ops.cc.
References C, 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 2783 of file text_ops.cc.
References C, CTX_wm_area(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), SpaceText::flags, MEM_freeN(), SpaceText::runtime, TextScroll::size_px, ST_SCROLL_SELECT, TextScroll::state, and SpaceText::top.
Referenced by text_scroll_cancel(), text_scroll_invoke(), and text_scroll_modal().
|
static |
Definition at line 3083 of file text_ops.cc.
References BLI_assert, BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), Text::curc, Text::curl, ELEM, ListBase::first, i, ListBase::last, len, linep, Text::lines, max, Text::selc, Text::sell, space_text_get_line_pos_wrapped(), space_text_wrap_width(), SpaceText::tabnumber, SpaceText::text, x, and y.
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 2169 of file text_ops.cc.
References Text::curc, Text::curl, cursor_skip_find_line(), linep, Text::selc, Text::sell, 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 1722 of file text_ops.cc.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), ELEM, i, 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 3059 of file text_ops.cc.
References ListBase::first, i, linep, Text::lines, next, space_text_get_visible_lines(), SpaceText::text, SpaceText::top, 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 219 of file text_ops.cc.
References BLI_INLINE, SpaceText::runtime, and x.
Referenced by text_cursor_set_to_pos().
Definition at line 2607 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 2623 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 79 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 94 of file text_ops.cc.
Referenced by text_delete_exec(), and text_insert_invoke().
|
static |
Definition at line 1317 of file text_ops.cc.
References C, 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 1393 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, C, CTX_data_edit_text(), CTX_wm_space_text(), Text::curc, Text::curl, flatten_string(), flatten_string_free(), len, TextLine::len, TextLine::line, Text::lines, LISTBASE_FOREACH, MEM_freeN(), MEM_malloc_arrayN(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), Text::selc, Text::sell, 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 1067 of file text_ops.cc.
References C, CTX_data_edit_text(), OPERATOR_FINISHED, and txt_copy_clipboard().
Referenced by TEXT_OT_copy().
|
static |
Definition at line 3288 of file text_ops.cc.
References C, 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, ARegion::winx, ARegion::winy, WM_event_add_notifier(), and SpaceText::wordwrap.
Referenced by text_selection_set_invoke(), and text_selection_set_modal().
|
static |
Definition at line 3413 of file text_ops.cc.
References C, 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(), WM_event_add_notifier(), x, and y.
Referenced by text_cursor_set_invoke(), and TEXT_OT_cursor_set().
|
static |
Definition at line 3327 of file text_ops.cc.
References C, 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 3428 of file text_ops.cc.
References C, 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 3209 of file text_ops.cc.
References Text::curc, Text::curl, ListBase::first, flatten_column_to_offset(), flatten_width(), SpaceText::left, linep, Text::lines, Text::selc, Text::sell, 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(), ARegion::winy, SpaceText::wordwrap, x, and y.
Referenced by text_cursor_set_apply(), and text_cursor_set_exec().
|
static |
Definition at line 3267 of file text_ops.cc.
References C, CTX_wm_manager(), CTX_wm_window(), TIMER, SetSelection::timer, and WM_event_timer_add().
Referenced by text_cursor_set_apply().
|
static |
Definition at line 3277 of file text_ops.cc.
References C, 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 1094 of file text_ops.cc.
References C, 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 252 of file text_ops.cc.
References C, and CTX_data_edit_text().
Referenced by TEXT_OT_run_script(), and TEXT_OT_to_3d_object().
|
static |
Definition at line 2457 of file text_ops.cc.
References BLI_str_find_prev_char_utf8(), C, CTX_data_edit_text(), CTX_wm_space_text(), Text::curc, Text::curl, DEL_NEXT_CHAR, DEL_NEXT_WORD, DEL_PREV_CHAR, DEL_PREV_WORD, ED_text_undo_push_init(), Text::flags, TextLine::line, SpaceText::live_edit, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), Text::selc, Text::sell, 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, U, USER_TEXT_EDIT_AUTO_CLOSE, and WM_event_add_notifier().
Referenced by TEXT_OT_delete().
|
static |
Definition at line 1012 of file text_ops.cc.
References C, 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 261 of file text_ops.cc.
References BKE_id_is_editable(), C, CTX_data_edit_text(), CTX_data_main(), and Text::id.
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_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 3731 of file text_ops.cc.
References BKE_reportf(), BLI_strcasecmp(), C, CTX_data_main(), CTX_wm_space_text(), Text::curl, ED_text_undo_push_init(), SpaceText::findstr, ListBase::first, SpaceText::flags, TextLine::format, Text::id, MEM_freeN(), NA_EDITED, NC_TEXT, ND_CURSOR, ID::next, 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 3802 of file text_ops.cc.
References C, TEXT_FIND, and text_find_and_replace().
Referenced by TEXT_OT_find().
|
static |
Definition at line 3902 of file text_ops.cc.
References C, 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 1173 of file text_ops.cc.
References C, 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 1138 of file text_ops.cc.
References C, CTX_data_edit_text(), Text::curc, Text::curl, ELEM, TextLine::line, 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 3530 of file text_ops.cc.
References BLI_str_utf8_as_unicode_step_safe(), C, CTX_data_edit_text(), CTX_wm_space_text(), Text::curl, ED_text_undo_push_init(), i, 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 3573 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, C, 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(), U, USER_TEXT_EDIT_AUTO_CLOSE, and wmEvent::utf8_buf.
Referenced by TEXT_OT_insert().
|
static |
Definition at line 2396 of file text_ops.cc.
References C, CTX_data_edit_text(), ListBase::first, ListBase::last, Text::lines, 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 2420 of file text_ops.cc.
References C, IFACE_, and WM_operator_props_dialog_popup().
Referenced by TEXT_OT_jump().
|
static |
Definition at line 4052 of file text_ops.cc.
References BKE_report(), BLI_findindex(), BLI_str_utf8_offset_to_index(), C, CTX_data_edit_text(), FILE_MAX, TextLine::len, TextLine::line, 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(), text_jump_to_file_at_point_internal(), and U.
Referenced by TEXT_OT_jump_to_file_at_point().
|
static |
Definition at line 3971 of file text_ops.cc.
References BKE_report(), BKE_reportf(), BLI_path_basename(), BPY_run_string_as_string(), C, MEM_freeN(), BPy_RunErrInfo::report_prefix, BPy_RunErrInfo::reports, reports, RPT_ERROR, RPT_INFO, and UNUSED_VARS.
Referenced by text_jump_to_file_at_point_exec().
|
static |
Definition at line 4014 of file text_ops.cc.
References BKE_main_blendfile_path(), BKE_reportf(), BKE_text_load(), BLI_path_cmp, C, CTX_data_main(), ED_text_activate_in_screen(), Text::id, LISTBASE_FOREACH, ID::name, NC_TEXT, ND_CURSOR, reports, 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 1260 of file text_ops.cc.
References C, CTX_data_edit_text(), CTX_wm_space_text(), Text::curl, ED_text_undo_push_init(), Text::flags, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, TextLine::prev, 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 3465 of file text_ops.cc.
References BLI_time_now_seconds(), C, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, SpaceText::runtime, SpaceText::showlinenrs, space_text_update_character_width(), space_text_update_cursor_moved(), TXT_BODY_LPAD, txt_move_toline(), TXT_NUMCOL_WIDTH, ARegion::winy, WM_event_add_notifier(), and WM_event_utf8_to_ascii().
Referenced by TEXT_OT_line_number().
|
static |
Definition at line 648 of file text_ops.cc.
References C, CTX_data_edit_text(), Text::filepath, Text::flags, 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().
|
static |
Definition at line 2210 of file text_ops.cc.
References C, 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, ARegion::regiontype, 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 2335 of file text_ops.cc.
References C, wmOperator::ptr, RNA_enum_get(), and text_move_cursor().
Referenced by TEXT_OT_move().
|
static |
Definition at line 2363 of file text_ops.cc.
References C, wmOperator::ptr, RNA_enum_get(), and text_move_cursor().
Referenced by TEXT_OT_move_select().
|
static |
Definition at line 345 of file text_ops.cc.
References BKE_text_add(), C, CTX_data_main(), CTX_wm_space_text(), DATA_, Text::id, 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 247 of file text_ops.cc.
Referenced by TEXT_OT_new(), and TEXT_OT_open().
|
static |
Definition at line 406 of file text_ops.cc.
References wmOperator::customdata.
Referenced by TEXT_OT_open().
|
static |
Definition at line 411 of file text_ops.cc.
References BKE_main_blendfile_path(), BKE_text_load_ex(), C, CTX_data_main(), CTX_wm_space_text(), wmOperator::customdata, FILE_MAX, Text::id, SpaceText::left, 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 398 of file text_ops.cc.
References C, wmOperator::customdata, 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 457 of file text_ops.cc.
References BKE_main_blendfile_path(), C, CTX_data_edit_text(), CTX_data_main(), Text::filepath, 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 1354 of file text_ops.cc.
References OPTYPE_UNDO, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), text_comment_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_convert_whitespace | ( | wmOperatorType * | ot | ) |
Definition at line 1527 of file text_ops.cc.
References OPTYPE_UNDO, ot, RNA_def_enum(), 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 1076 of file text_ops.cc.
References ot, text_copy_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_cursor_set | ( | wmOperatorType * | ot | ) |
Definition at line 3442 of file text_ops.cc.
References ot, RNA_def_int(), 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 1117 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_cut_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 2547 of file text_ops.cc.
References DEL_NEXT_CHAR, delete_type_items, OPTYPE_UNDO, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), text_delete_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_duplicate_line | ( | wmOperatorType * | ot | ) |
Definition at line 1030 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_duplicate_line_exec(), and text_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_find | ( | wmOperatorType * | ot | ) |
Definition at line 3807 of file text_ops.cc.
References ot, text_find_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_find_set_selected | ( | wmOperatorType * | ot | ) |
Definition at line 3919 of file text_ops.cc.
References ot, text_find_set_selected_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_indent | ( | wmOperatorType * | ot | ) |
Definition at line 1198 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_edit_poll(), and text_indent_exec().
Referenced by text_operatortypes().
| void TEXT_OT_indent_or_autocomplete | ( | wmOperatorType * | ot | ) |
Definition at line 1152 of file text_ops.cc.
References ot, text_edit_poll(), and text_indent_or_autocomplete_exec().
Referenced by text_operatortypes().
| void TEXT_OT_insert | ( | wmOperatorType * | ot | ) |
Definition at line 3696 of file text_ops.cc.
References OPTYPE_UNDO, ot, PROP_SKIP_SAVE, RNA_def_property_flag(), RNA_def_string(), text_edit_poll(), text_insert_exec(), and text_insert_invoke().
Referenced by text_operatortypes().
| void TEXT_OT_jump | ( | wmOperatorType * | ot | ) |
Definition at line 2425 of file text_ops.cc.
References BLT_I18NCONTEXT_ID_TEXT, ot, RNA_def_int(), RNA_def_property_translation_context(), 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 4098 of file text_ops.cc.
References BLT_I18NCONTEXT_ID_TEXT, FILE_MAX, ot, PROP_FILEPATH, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), RNA_def_property_subtype(), RNA_def_property_translation_context(), RNA_def_string(), and text_jump_to_file_at_point_exec().
Referenced by text_operatortypes().
| void TEXT_OT_line_break | ( | wmOperatorType * | ot | ) |
Definition at line 1296 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_edit_poll(), and text_line_break_exec().
Referenced by text_operatortypes().
| void TEXT_OT_line_number | ( | wmOperatorType * | ot | ) |
Definition at line 3512 of file text_ops.cc.
References ot, text_line_number_invoke(), and text_region_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_make_internal | ( | wmOperatorType * | ot | ) |
Definition at line 662 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_edit_poll(), and text_make_internal_exec().
Referenced by text_operatortypes().
| void TEXT_OT_move | ( | wmOperatorType * | ot | ) |
Definition at line 2342 of file text_ops.cc.
References LINE_BEGIN, move_type_items, ot, RNA_def_enum(), text_edit_poll(), and text_move_exec().
Referenced by text_operatortypes().
| void TEXT_OT_move_lines | ( | wmOperatorType * | ot | ) |
Definition at line 1673 of file text_ops.cc.
References move_lines_exec(), OPTYPE_UNDO, ot, RNA_def_enum(), 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 2370 of file text_ops.cc.
References LINE_BEGIN, move_type_items, ot, RNA_def_enum(), text_move_select_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_new | ( | wmOperatorType * | ot | ) |
Definition at line 377 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_new_exec(), and text_new_poll().
Referenced by text_operatortypes().
| void TEXT_OT_open | ( | wmOperatorType * | ot | ) |
Definition at line 474 of file text_ops.cc.
References FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, FILE_TYPE_PYSCRIPT, FILE_TYPE_TEXT, OPTYPE_UNDO, ot, RNA_def_boolean(), 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 2589 of file text_ops.cc.
References ot, text_space_edit_poll(), and text_toggle_overwrite_exec().
Referenced by text_operatortypes().
| void TEXT_OT_paste | ( | wmOperatorType * | ot | ) |
Definition at line 982 of file text_ops.cc.
References OPTYPE_UNDO, ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), text_edit_poll(), and text_paste_exec().
Referenced by text_operatortypes().
| void TEXT_OT_reload | ( | wmOperatorType * | ot | ) |
Definition at line 564 of file text_ops.cc.
References ot, text_edit_poll(), text_reload_exec(), and text_reload_invoke().
Referenced by text_operatortypes().
| void TEXT_OT_replace | ( | wmOperatorType * | ot | ) |
Definition at line 3876 of file text_ops.cc.
References OPTYPE_UNDO, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), text_replace_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_replace_set_selected | ( | wmOperatorType * | ot | ) |
Definition at line 3950 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_replace_set_selected_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
| void TEXT_OT_resolve_conflict | ( | wmOperatorType * | ot | ) |
Definition at line 4238 of file text_ops.cc.
References ot, resolution_items, RESOLVE_IGNORE, RNA_def_enum(), 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 917 of file text_ops.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, text_data_poll(), and text_run_script_exec().
Referenced by text_operatortypes().
| void TEXT_OT_save | ( | wmOperatorType * | ot | ) |
Definition at line 766 of file text_ops.cc.
References ot, text_edit_poll(), text_save_exec(), and text_save_invoke().
Referenced by text_operatortypes().
| void TEXT_OT_save_as | ( | wmOperatorType * | ot | ) |
Definition at line 837 of file text_ops.cc.
References FILE_DEFAULTDISPLAY, FILE_SAVE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, FILE_TYPE_PYSCRIPT, FILE_TYPE_TEXT, ot, 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 2882 of file text_ops.cc.
References BLT_I18NCONTEXT_ID_TEXT, OPTYPE_BLOCKING, OPTYPE_GRAB_CURSOR_XY, OPTYPE_INTERNAL, ot, RNA_def_int(), RNA_def_property_translation_context(), 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 2992 of file text_ops.cc.
References BLT_I18NCONTEXT_ID_TEXT, OPTYPE_BLOCKING, OPTYPE_INTERNAL, ot, RNA_def_int(), RNA_def_property_translation_context(), 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 1570 of file text_ops.cc.
References ot, text_edit_poll(), and text_select_all_exec().
Referenced by text_operatortypes().
| void TEXT_OT_select_line | ( | wmOperatorType * | ot | ) |
Definition at line 1602 of file text_ops.cc.
References ot, text_edit_poll(), and text_select_line_exec().
Referenced by text_operatortypes().
| void TEXT_OT_select_word | ( | wmOperatorType * | ot | ) |
Definition at line 1635 of file text_ops.cc.
References ot, text_edit_poll(), and text_select_word_exec().
Referenced by text_operatortypes().
| void TEXT_OT_selection_set | ( | wmOperatorType * | ot | ) |
Definition at line 3393 of file text_ops.cc.
References ot, 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 4275 of file text_ops.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), text_data_poll(), and text_to_3d_object_exec().
Referenced by text_operatortypes().
| void TEXT_OT_unindent | ( | wmOperatorType * | ot | ) |
Definition at line 1239 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_edit_poll(), and text_unindent_exec().
Referenced by text_operatortypes().
| void TEXT_OT_unlink | ( | wmOperatorType * | ot | ) |
Definition at line 626 of file text_ops.cc.
References OPTYPE_UNDO, ot, text_unlink_exec(), text_unlink_invoke(), and text_unlink_poll().
Referenced by text_operatortypes().
| void TEXT_OT_update_shader | ( | wmOperatorType * | ot | ) |
Definition at line 4390 of file text_ops.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, text_update_shader_exec(), and text_update_shader_poll().
Referenced by text_operatortypes().
|
static |
Definition at line 938 of file text_ops.cc.
References buf_tabs_to_spaces(), C, CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), Text::flags, 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 294 of file text_ops.cc.
References BKE_id_is_editable(), C, CTX_data_edit_text(), CTX_data_main(), CTX_wm_region(), CTX_wm_space_text(), Text::id, ARegion::regiontype, and RGN_TYPE_WINDOW.
Referenced by TEXT_OT_cursor_set(), TEXT_OT_line_number(), and TEXT_OT_selection_set().
|
static |
Definition at line 2913 of file text_ops.cc.
References C, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), ARegion::regiontype, and RGN_TYPE_WINDOW.
Referenced by TEXT_OT_scroll_bar().
|
static |
Definition at line 508 of file text_ops.cc.
References BKE_report(), BKE_text_reload(), BLI_findindex(), BPY_text_free_code(), C, Text::compiled, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), Text::curc, Text::curl, Text::filepath, Text::flags, Text::lines, 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_ISDIRTY, txt_move_to(), and WM_event_add_notifier().
Referenced by TEXT_OT_reload(), and text_resolve_conflict_exec().
|
static |
Definition at line 553 of file text_ops.cc.
References ALERT_ICON_NONE, C, IFACE_, and WM_operator_confirm_ex().
Referenced by TEXT_OT_reload().
|
static |
Definition at line 3825 of file text_ops.cc.
References BLI_findindex(), C, CTX_wm_space_text(), Text::curc, Text::curl, ED_text_undo_push_init(), SpaceText::findstr, SpaceText::flags, TextLine::format, Text::lines, 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 3867 of file text_ops.cc.
References C, wmOperator::ptr, RNA_boolean_get(), text_find_and_replace(), TEXT_REPLACE, and text_replace_all().
Referenced by TEXT_OT_replace().
|
static |
Definition at line 3937 of file text_ops.cc.
References C, 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 4149 of file text_ops.cc.
References BKE_text_file_modified_ignore(), C, 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 4169 of file text_ops.cc.
References BKE_text_file_modified_check(), C, CTX_data_edit_text(), Text::flags, 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 4138 of file text_ops.cc.
References C, CTX_data_edit_text(), Text::filepath, Text::flags, text_edit_poll(), and TXT_ISMEM.
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 865 of file text_ops.cc.
References BPY_run_text(), C, CTX_data_edit_text(), Text::curc, Text::curl, NA_EDITED, NC_TEXT, NC_WINDOW, OPERATOR_CANCELLED, OPERATOR_FINISHED, reports, Text::selc, 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 904 of file text_ops.cc.
References BKE_report(), C, OPERATOR_CANCELLED, wmOperator::reports, RPT_ERROR, and text_run_script().
Referenced by TEXT_OT_run_script().
|
static |
Definition at line 785 of file text_ops.cc.
References BLI_strdup(), C, CTX_data_edit_text(), CTX_data_main(), FILE_MAX, Text::filepath, Text::flags, MEM_freeN(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_string_get(), space_text_update_cursor_moved(), TXT_ISMEM, txt_write_file(), and WM_event_add_notifier().
Referenced by TEXT_OT_save_as(), and text_save_as_invoke().
|
static |
Definition at line 811 of file text_ops.cc.
References BKE_main_blendfile_path(), C, CTX_data_edit_text(), CTX_data_main(), Text::filepath, Text::flags, Text::id, ID::name, 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 741 of file text_ops.cc.
References C, 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 754 of file text_ops.cc.
References C, CTX_data_edit_text(), Text::filepath, Text::flags, 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 2694 of file text_ops.cc.
References C, copy_v2_v2_int(), CTX_wm_area(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), i, 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 2931 of file text_ops.cc.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), C, 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, ARegion::winrct, ARegion::winy, WM_event_add_modal_handler(), rcti::xmin, rcti::ymin, and TextScroll::zone.
Referenced by TEXT_OT_scroll_bar().
|
static |
Definition at line 2837 of file text_ops.cc.
References C, and scroll_exit().
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
|
static |
Definition at line 2676 of file text_ops.cc.
References C, 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 2842 of file text_ops.cc.
References C, 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 2802 of file text_ops.cc.
References C, 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 2669 of file text_ops.cc.
References C, and CTX_data_edit_text().
Referenced by TEXT_OT_scroll().
|
static |
Definition at line 2656 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 1556 of file text_ops.cc.
References C, 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 1588 of file text_ops.cc.
References C, 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 225 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 1620 of file text_ops.cc.
References BLI_str_cursor_step_bounds_utf8(), C, CTX_data_edit_text(), Text::curc, Text::curl, TextLine::len, TextLine::line, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, Text::selc, 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 3388 of file text_ops.cc.
References C, and text_cursor_set_exit().
Referenced by TEXT_OT_selection_set().
|
static |
Definition at line 3341 of file text_ops.cc.
References C, 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 3368 of file text_ops.cc.
References C, 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 277 of file text_ops.cc.
References BKE_id_is_editable(), C, CTX_data_edit_text(), CTX_data_main(), CTX_wm_space_text(), and Text::id.
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 121 of file text_ops.cc.
References ELEM, i, TextLine::next, and txt_get_span().
Referenced by text_insert_invoke().
|
static |
Definition at line 4265 of file text_ops.cc.
References C, 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 2578 of file text_ops.cc.
References C, 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 1219 of file text_ops.cc.
References C, 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 589 of file text_ops.cc.
References BKE_id_delete(), C, CTX_data_edit_text(), CTX_data_main(), CTX_wm_space_text(), Text::id, NA_REMOVED, NC_TEXT, ID::next, OPERATOR_FINISHED, ID::prev, 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 615 of file text_ops.cc.
References ALERT_ICON_NONE, C, IFACE_, and WM_operator_confirm_ex().
Referenced by TEXT_OT_unlink().
|
static |
Definition at line 583 of file text_ops.cc.
References C, and CTX_data_edit_text().
Referenced by TEXT_OT_unlink().
| void text_update_edited | ( | Text * | text | ) |
Definition at line 332 of file text_ops.cc.
References Text::lines, 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 322 of file text_ops.cc.
References TextLine::format, and 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 4347 of file text_ops.cc.
References BKE_report(), C, Main::cameras, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CTX_data_edit_text(), CTX_data_engine_type(), CTX_data_main(), FOREACH_NODETREE_BEGIN, FOREACH_NODETREE_END, LISTBASE_FOREACH, NTREE_SHADER, OPERATOR_CANCELLED, OPERATOR_FINISHED, RE_engine_create(), RE_engine_free(), RenderEngine::reports, wmOperator::reports, RPT_INFO, text_update_shader_text_recursive(), RenderEngineType::update_custom_camera, and RenderEngineType::update_script_node.
Referenced by TEXT_OT_update_shader().
|
static |
Definition at line 4300 of file text_ops.cc.
References C, CTX_data_edit_text(), CTX_data_engine_type(), RenderEngineType::update_custom_camera, and RenderEngineType::update_script_node.
Referenced by TEXT_OT_update_shader().
|
static |
Definition at line 4320 of file text_ops.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), bNodeTree::id, Text::id, NODE_GROUP, SH_NODE_SCRIPT, text_update_shader_text_recursive(), and RenderEngineType::update_script_node.
Referenced by text_update_shader_exec(), and text_update_shader_text_recursive().
|
static |
Definition at line 1051 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 1910 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(), Text::curc, Text::curl, ELEM, i, linep, max, Text::selc, Text::sell, 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 2123 of file text_ops.cc.
References col, Text::curc, Text::curl, linep, Text::selc, Text::sell, 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 1997 of file text_ops.cc.
References BLI_str_find_prev_char_utf8(), BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), Text::curc, Text::curl, ELEM, i, linep, max, Text::selc, Text::sell, 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 2082 of file text_ops.cc.
References col, Text::curc, Text::curl, linep, Text::selc, Text::sell, 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 683 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, Text::filepath, Text::flags, Text::id, Text::lines, LISTBASE_FOREACH, Text::mtime, ID::name, reports, RPT_, RPT_ERROR, RPT_INFO, RPT_WARNING, STRNCPY(), and TXT_ISDIRTY.
Referenced by text_save_as_exec(), and text_save_exec().
|
static |
Definition at line 2449 of file text_ops.cc.
|
static |
Definition at line 1703 of file text_ops.cc.
|
static |
Definition at line 4130 of file text_ops.cc.
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 1387 of file text_ops.cc.
Referenced by TEXT_OT_convert_whitespace().