Blender
V3.3
|
#include <errno.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_text_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_math_base.h"
#include "BLT_translation.h"
#include "PIL_time.h"
#include "BKE_context.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_text.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_curve.h"
#include "ED_screen.h"
#include "ED_text.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "text_format.h"
#include "text_intern.h"
Go to the source code of this file.
Classes | |
struct | TextScroll |
struct | SetSelection |
Find Operator | |
#define | TEXT_FIND 0 |
#define | 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) |
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 } |
typedef struct TextScroll | TextScroll |
static void | txt_screen_clamp (SpaceText *st, ARegion *region) |
static void | txt_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) |
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 *UNUSED(event)) |
void | TEXT_OT_resolve_conflict (wmOperatorType *ot) |
Move Operator | |
static const EnumPropertyItem | move_type_items [] |
static int | text_get_cursor_rel (SpaceText *st, ARegion *region, TextLine *linein, int rell, int relc) |
static int | cursor_skip_find_line (SpaceText *st, 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 | cursor_skip (SpaceText *st, 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 *UNUSED(op)) |
void | TEXT_OT_unlink (wmOperatorType *ot) |
static int | text_delete_exec (bContext *C, wmOperator *op) |
void | TEXT_OT_delete (wmOperatorType *ot) |
#define TEXT_FIND 0 |
Definition at line 3558 of file text_ops.c.
#define TEXT_REPLACE 1 |
Definition at line 3559 of file text_ops.c.
typedef struct SetSelection SetSelection |
typedef struct TextScroll TextScroll |
anonymous enum |
Enumerator | |
---|---|
TO_SPACES | |
TO_TABS |
Definition at line 1339 of file text_ops.c.
anonymous enum |
Enumerator | |
---|---|
RESOLVE_IGNORE | |
RESOLVE_RELOAD | |
RESOLVE_SAVE | |
RESOLVE_MAKE_INTERNAL |
Definition at line 3801 of file text_ops.c.
enum eScrollZone |
Enumerator | |
---|---|
SCROLLHANDLE_INVALID_OUTSIDE | |
SCROLLHANDLE_BAR | |
SCROLLHANDLE_MIN_OUTSIDE | |
SCROLLHANDLE_MAX_OUTSIDE |
Definition at line 2546 of file text_ops.c.
|
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 102 of file text_ops.c.
References MEM_mallocN, and test_line_start().
Referenced by text_paste_exec().
|
static |
Definition at line 2090 of file text_ops.c.
References Text::curc, Text::curl, cursor_skip_find_line(), TextLine::len, TextLine::next, TextLine::prev, Text::selc, Text::sell, usdtokens::st(), text_get_cursor_rel(), and txt_pop_sel().
Referenced by text_move_cursor().
|
static |
Definition at line 1747 of file text_ops.c.
References TextLine::next, TextLine::prev, usdtokens::st(), text_get_char_pos(), text_get_visible_lines(), and wrap_offset_in_line().
Referenced by cursor_skip().
|
static |
Definition at line 2949 of file text_ops.c.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), col, usdtokens::st(), and str.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 2933 of file text_ops.c.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), usdtokens::st(), and str.
Referenced by text_cursor_set_to_pos().
Definition at line 2972 of file text_ops.c.
References TextLine::line, next, NULL, usdtokens::st(), text_get_visible_lines(), top, and y.
Referenced by text_cursor_set_to_pos_wrapped().
|
static |
Definition at line 1587 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), text_run_script(), text_update_cursor_moved(), txt_move_lines(), and WM_event_add_notifier().
Referenced by TEXT_OT_move_lines().
|
static |
Definition at line 2698 of file text_ops.c.
References C, CTX_wm_area(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), MEM_freeN, TextScroll::size_px, usdtokens::st(), ST_SCROLL_SELECT, and TextScroll::state.
Referenced by text_scroll_cancel(), text_scroll_invoke(), and text_scroll_modal().
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 62 of file text_ops.c.
References Freestyle::c, and 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 77 of file text_ops.c.
Referenced by text_delete_exec(), and text_insert_invoke().
|
static |
Definition at line 1272 of file text_ops.c.
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(), text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), txt_comment(), txt_has_sel(), txt_order_cursors(), txt_uncomment(), type, and WM_event_add_notifier().
Referenced by TEXT_OT_comment_toggle().
|
static |
Definition at line 1346 of file text_ops.c.
References Freestyle::a, BLI_assert, BLI_str_utf8_size_safe(), BLI_strdup(), FlattenString::buf, C, CTX_data_edit_text(), CTX_wm_space_text(), ListBase::first, flatten_string(), flatten_string_free(), TextLine::format, len, TextLine::len, TextLine::line, Text::lines, MEM_freeN, MEM_mallocN, NA_EDITED, NC_TEXT, TextLine::next, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), usdtokens::st(), STREQ, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), TO_TABS, type, and WM_event_add_notifier().
Referenced by TEXT_OT_convert_whitespace().
|
static |
Definition at line 1025 of file text_ops.c.
References C, CTX_data_edit_text(), OPERATOR_FINISHED, and txt_copy_clipboard().
Referenced by TEXT_OT_copy().
|
static |
Definition at line 3199 of file text_ops.c.
References C, CLAMPIS, CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, ED_text_scroll_to_cursor(), wmEvent::mval, SetSelection::mval_prev, NC_TEXT, ND_CURSOR, usdtokens::st(), text_cursor_set_to_pos(), text_cursor_timer_ensure(), text_cursor_timer_remove(), TIMER, wmEvent::type, ARegion::winx, ARegion::winy, and WM_event_add_notifier().
Referenced by text_selection_set_invoke(), and text_selection_set_modal().
|
static |
Definition at line 3325 of file text_ops.c.
References C, CTX_wm_region(), CTX_wm_space_text(), NC_TEXT, ND_CURSOR, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_get(), usdtokens::st(), text_cursor_set_to_pos(), text_update_cursor_moved(), WM_event_add_notifier(), x, and y.
Referenced by text_cursor_set_invoke(), and TEXT_OT_cursor_set().
|
static |
Definition at line 3238 of file text_ops.c.
References buffer, C, CTX_wm_space_text(), wmOperator::customdata, MEM_freeN, NC_TEXT, ND_CURSOR, NULL, usdtokens::st(), text_cursor_timer_remove(), text_update_cursor_moved(), txt_has_sel(), txt_sel_to_buf(), WM_clipboard_text_set(), and WM_event_add_notifier().
Referenced by text_selection_set_cancel(), and text_selection_set_modal().
|
static |
Definition at line 3340 of file text_ops.c.
References C, CTX_wm_space_text(), wmEvent::mval, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_set(), usdtokens::st(), and text_cursor_set_exec().
Referenced by TEXT_OT_cursor_set().
|
static |
Definition at line 3119 of file text_ops.c.
References Text::curc, Text::curl, ListBase::first, flatten_column_to_offset(), flatten_width(), Text::lines, TextLine::next, TextLine::prev, Text::selc, Text::sell, usdtokens::st(), text_cursor_set_to_pos_wrapped(), text_pixel_x_to_column(), text_update_character_width(), TXT_BODY_LEFT, txt_get_span(), TXT_LINE_HEIGHT, txt_pop_sel(), w(), ARegion::winy, x, and y.
Referenced by text_cursor_set_apply(), and text_cursor_set_exec().
|
static |
Definition at line 2994 of file text_ops.c.
References BLI_assert, BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), Text::curc, Text::curl, ELEM, get_line_pos_wrapped(), len, TextLine::len, TextLine::line, max, MIN2, Text::selc, Text::sell, usdtokens::st(), wrap_width(), x, and y.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 3178 of file text_ops.c.
References C, CTX_wm_manager(), CTX_wm_window(), NULL, SetSelection::timer, TIMER, and WM_event_add_timer().
Referenced by text_cursor_set_apply().
|
static |
Definition at line 3188 of file text_ops.c.
References C, CTX_wm_manager(), CTX_wm_window(), NULL, SetSelection::timer, and WM_event_remove_timer().
Referenced by text_cursor_set_apply(), and text_cursor_set_exit().
|
static |
Definition at line 1052 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, NULL, OPERATOR_FINISHED, text_drawcache_tag_update(), text_run_script(), text_update_cursor_moved(), txt_copy_clipboard(), txt_delete_selected(), and WM_event_add_notifier().
Referenced by TEXT_OT_cut().
Definition at line 173 of file text_ops.c.
References C, and CTX_data_edit_text().
Referenced by TEXT_OT_run_script(), and TEXT_OT_to_3d_object().
|
static |
Definition at line 2374 of file text_ops.c.
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, NA_EDITED, NC_TEXT, NULL, OPERATOR_FINISHED, blender::meshintersect::prev(), wmOperator::ptr, RNA_enum_get(), Text::selc, Text::sell, usdtokens::st(), text_closing_character_pair_get(), text_drawcache_tag_update(), text_run_script(), text_update_cursor_moved(), 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, type, USER_TEXT_EDIT_AUTO_CLOSE, and WM_event_add_notifier().
Referenced by TEXT_OT_delete().
|
static |
Definition at line 970 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, NULL, OPERATOR_FINISHED, text_run_script(), txt_duplicate_line(), and WM_event_add_notifier().
Referenced by TEXT_OT_duplicate_line().
Definition at line 182 of file text_ops.c.
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_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 3561 of file text_ops.c.
References BKE_reportf(), BLI_strcasecmp(), C, CTX_data_main(), CTX_wm_space_text(), Text::curl, ED_text_undo_push_init(), ListBase::first, TextLine::format, Text::id, MEM_freeN, NA_EDITED, NC_TEXT, ND_CURSOR, ID::next, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_WARNING, usdtokens::st(), ST_FIND_ALL, ST_FIND_WRAP, ST_MATCH_CASE, STREQ, text_drawcache_tag_update(), TEXT_FIND, TEXT_REPLACE, text_update_cursor_moved(), 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 3632 of file text_ops.c.
References C, TEXT_FIND, and text_find_and_replace().
Referenced by TEXT_OT_find().
|
static |
Definition at line 3732 of file text_ops.c.
References BLI_strncpy(), C, CTX_data_edit_text(), CTX_wm_space_text(), MEM_freeN, NULL, OPERATOR_FINISHED, usdtokens::st(), ST_MAX_FIND_STR, TEXT_FIND, text_find_and_replace(), and txt_sel_to_buf().
Referenced by TEXT_OT_find_set_selected().
|
static |
Definition at line 1654 of file text_ops.c.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), ELEM, TextLine::len, TextLine::line, max, MIN2, usdtokens::st(), and wrap_width().
Referenced by cursor_skip(), txt_wrap_move_down(), and txt_wrap_move_up().
|
static |
Definition at line 1130 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_drawcache_tag_update(), 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 1095 of file text_ops.c.
References C, CTX_data_edit_text(), Text::curc, Text::curl, ELEM, TextLine::line, NULL, 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 3439 of file text_ops.c.
References BLI_str_utf8_as_unicode_step(), C, CTX_data_edit_text(), CTX_wm_space_text(), Text::curl, ED_text_undo_push_init(), MEM_freeN, NA_EDITED, NC_TEXT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get_alloc(), usdtokens::st(), str, text_drawcache_tag_update(), text_update_cursor_moved(), 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 3482 of file text_ops.c.
References BLI_str_utf8_as_unicode(), BLI_str_utf8_size_safe(), BLI_UTF8_MAX, C, CTX_data_edit_text(), CTX_wm_space_text(), KM_CTRL, KM_OSKEY, len, wmEvent::modifier, NULL, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, ret, RNA_string_length(), RNA_string_set(), str, text_closing_character_pair_get(), text_insert_exec(), text_run_script(), txt_add_char(), txt_move_left(), USER_TEXT_EDIT_AUTO_CLOSE, and wmEvent::utf8_buf.
Referenced by TEXT_OT_insert().
|
static |
Definition at line 2314 of file text_ops.c.
References C, CTX_data_edit_text(), ListBase::first, ListBase::last, Text::lines, NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), text_update_cursor_moved(), txt_get_span(), txt_move_toline(), and WM_event_add_notifier().
Referenced by TEXT_OT_jump().
|
static |
Definition at line 2336 of file text_ops.c.
References C, and WM_operator_props_dialog_popup().
Referenced by TEXT_OT_jump().
|
static |
Definition at line 1215 of file text_ops.c.
References Freestyle::a, 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, usdtokens::st(), text_drawcache_tag_update(), text_update_cursor_moved(), 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 3377 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, PIL_check_seconds_timer(), usdtokens::st(), text_update_character_width(), text_update_cursor_moved(), time, 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 552 of file text_ops.c.
References C, CTX_data_edit_text(), Text::filepath, Text::flags, MEM_SAFE_FREE, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, 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 2132 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), cursor_skip(), FILE_BOTTOM, FILE_TOP, LINE_BEGIN, LINE_END, NC_TEXT, ND_CURSOR, NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, NULL, OPERATOR_FINISHED, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, ARegion::regiontype, RGN_TYPE_WINDOW, select(), usdtokens::st(), text_update_cursor_moved(), 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(), type, and WM_event_add_notifier().
Referenced by text_move_exec(), and text_move_select_exec().
|
static |
Definition at line 2253 of file text_ops.c.
References C, wmOperator::ptr, RNA_enum_get(), text_move_cursor(), and type.
Referenced by TEXT_OT_move().
|
static |
Definition at line 2281 of file text_ops.c.
References C, wmOperator::ptr, RNA_enum_get(), text_move_cursor(), and type.
Referenced by TEXT_OT_move_select().
|
static |
Definition at line 268 of file text_ops.c.
References BKE_text_add(), C, CTX_data_main(), CTX_wm_space_text(), DATA_, Text::id, NA_ADDED, NC_TEXT, NULL, OPERATOR_FINISHED, ptr, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), usdtokens::st(), text_drawcache_tag_update(), UI_context_active_but_prop_get_templateID(), and WM_event_add_notifier().
Referenced by TEXT_OT_new().
Definition at line 168 of file text_ops.c.
Referenced by TEXT_OT_new(), and TEXT_OT_open().
|
static |
Definition at line 329 of file text_ops.c.
References wmOperator::customdata, and MEM_freeN.
Referenced by TEXT_OT_open().
|
static |
Definition at line 334 of file text_ops.c.
References BKE_main_blendfile_path(), BKE_text_load_ex(), C, CTX_data_main(), CTX_wm_space_text(), wmOperator::customdata, FILE_MAX, Text::id, MEM_freeN, NA_ADDED, NC_TEXT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, PropertyPointerRNA::prop, wmOperator::ptr, PropertyPointerRNA::ptr, RNA_boolean_get(), RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RNA_string_get(), usdtokens::st(), str, text_drawcache_tag_update(), text_open_init(), and WM_event_add_notifier().
Referenced by text_open_invoke(), and TEXT_OT_open().
|
static |
Definition at line 321 of file text_ops.c.
References C, 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 383 of file text_ops.c.
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 1307 of file text_ops.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, 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 1465 of file text_ops.c.
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 1034 of file text_ops.c.
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 3354 of file text_ops.c.
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 1074 of file text_ops.c.
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 2463 of file text_ops.c.
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 988 of file text_ops.c.
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 3637 of file text_ops.c.
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 3749 of file text_ops.c.
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 1154 of file text_ops.c.
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 1109 of file text_ops.c.
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 3528 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, 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 2341 of file text_ops.c.
References BLT_I18NCONTEXT_ID_TEXT, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, 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_line_break | ( | wmOperatorType * | ot | ) |
Definition at line 1251 of file text_ops.c.
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 3421 of file text_ops.c.
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 566 of file text_ops.c.
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 2260 of file text_ops.c.
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 1607 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, move_lines_exec(), wmOperatorType::name, NULL, 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 2288 of file text_ops.c.
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 300 of file text_ops.c.
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 400 of file text_ops.c.
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 2505 of file text_ops.c.
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 942 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, text_edit_poll(), and text_paste_exec().
Referenced by text_operatortypes().
void TEXT_OT_refresh_pyconstraints | ( | wmOperatorType * | ot | ) |
Definition at line 884 of file text_ops.c.
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 479 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, text_edit_poll(), text_reload_exec(), and WM_operator_confirm().
Referenced by text_operatortypes().
void TEXT_OT_replace | ( | wmOperatorType * | ot | ) |
Definition at line 3706 of file text_ops.c.
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 3780 of file text_ops.c.
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 3902 of file text_ops.c.
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 816 of file text_ops.c.
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 666 of file text_ops.c.
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 737 of file text_ops.c.
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 2793 of file text_ops.c.
References 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(), 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 2899 of file text_ops.c.
References wmOperatorType::cancel, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, ot, wmOperatorType::poll, RNA_def_int(), 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 1506 of file text_ops.c.
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 1536 of file text_ops.c.
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 1569 of file text_ops.c.
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 3305 of file text_ops.c.
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 3939 of file text_ops.c.
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 1194 of file text_ops.c.
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 530 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, text_unlink_exec(), text_unlink_poll(), and WM_operator_confirm().
Referenced by text_operatortypes().
|
static |
Definition at line 902 of file text_ops.c.
References buf_tabs_to_spaces(), C, CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), Text::flags, MEM_freeN, NA_EDITED, NC_TEXT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), text_drawcache_tag_update(), text_run_script(), text_update_cursor_moved(), text_update_edited(), txt_insert_buf(), TXT_TABSIZE, TXT_TABSTOSPACES, WM_clipboard_text_get(), and WM_event_add_notifier().
Referenced by TEXT_OT_paste().
BLI_INLINE int text_pixel_x_to_column | ( | SpaceText * | st, |
const int | x | ||
) |
Definition at line 156 of file text_ops.c.
References usdtokens::st(), and x.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 837 of file text_ops.c.
References BPY_pyconstraint_update(), C, bPose::chanbase, CONSTRAINT_TYPE_PYTHON, bPoseChannel::constraints, Object::constraints, CTX_data_edit_text(), CTX_data_main(), data, bConstraint::data, DEG_id_tag_update(), ListBase::first, Object::id, ID_RECALC_GEOMETRY, bPoseChannel::next, bConstraint::next, ID::next, OB_ARMATURE, Main::objects, OPERATOR_FINISHED, Object::pose, bConstraint::type, Object::type, and update().
Referenced by TEXT_OT_refresh_pyconstraints().
Definition at line 215 of file text_ops.c.
References BKE_id_is_editable(), C, CTX_data_edit_text(), CTX_data_main(), CTX_wm_region(), CTX_wm_space_text(), Text::id, ARegion::regiontype, RGN_TYPE_WINDOW, and usdtokens::st().
Referenced by TEXT_OT_cursor_set(), TEXT_OT_line_number(), and TEXT_OT_selection_set().
Definition at line 2822 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), ARegion::regiontype, RGN_TYPE_WINDOW, and usdtokens::st().
Referenced by TEXT_OT_scroll_bar().
|
static |
Definition at line 434 of file text_ops.c.
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, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, usdtokens::st(), text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), TXT_ISDIRTY, txt_move_to(), txt_screen_clamp(), and WM_event_add_notifier().
Referenced by TEXT_OT_reload(), and text_resolve_conflict_exec().
|
static |
Definition at line 3655 of file text_ops.c.
References BLI_findindex(), C, CTX_wm_space_text(), Text::curc, Text::curl, ED_text_undo_push_init(), TextLine::format, Text::lines, MEM_freeN, NA_EDITED, NC_TEXT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, usdtokens::st(), ST_MATCH_CASE, text_drawcache_tag_update(), 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 3697 of file text_ops.c.
References C, wmOperator::ptr, blender::nodes::node_fn_replace_string_cc::replace_all(), RNA_boolean_get(), text_find_and_replace(), TEXT_REPLACE, and text_replace_all().
Referenced by TEXT_OT_replace().
|
static |
Definition at line 3767 of file text_ops.c.
References BLI_strncpy(), C, CTX_data_edit_text(), CTX_wm_space_text(), MEM_freeN, NULL, OPERATOR_FINISHED, usdtokens::st(), ST_MAX_FIND_STR, and txt_sel_to_buf().
Referenced by TEXT_OT_replace_set_selected().
|
static |
Definition at line 3821 of file text_ops.c.
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 3841 of file text_ops.c.
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().
Definition at line 3810 of file text_ops.c.
References C, CTX_data_edit_text(), Text::filepath, Text::flags, NULL, text_edit_poll(), and TXT_ISMEM.
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 765 of file text_ops.c.
References BPY_run_text(), C, CTX_data_edit_text(), Text::curc, Text::curl, NA_EDITED, NC_TEXT, NC_WINDOW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, text_update_cursor_moved(), void, 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 803 of file text_ops.c.
References BKE_report(), C, OPERATOR_CANCELLED, wmOperator::reports, RPT_ERROR, text_run_script(), and void.
Referenced by TEXT_OT_run_script().
|
static |
Definition at line 685 of file text_ops.c.
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(), str, 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 711 of file text_ops.c.
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(), str, text_save_as_exec(), TXT_ISMEM, and WM_event_add_fileselect().
Referenced by TEXT_OT_save_as().
|
static |
Definition at line 641 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_data_main(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::reports, 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 654 of file text_ops.c.
References C, CTX_data_edit_text(), Text::filepath, Text::flags, NULL, 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 2610 of file text_ops.c.
References C, copy_v2_v2_int(), CTX_wm_area(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), TextScroll::is_first, TextScroll::is_scrollbar, MOUSEPAN, TextScroll::mval_delta, TextScroll::mval_prev, TextScroll::ofs_delta, TextScroll::ofs_delta_px, TextScroll::ofs_init, TextScroll::ofs_max, TextScroll::size_px, usdtokens::st(), TextScroll::state, sub_v2_v2v2_int(), text_update_character_width(), and wmEvent::type.
Referenced by text_scroll_bar_invoke(), text_scroll_invoke(), and text_scroll_modal().
|
static |
Definition at line 2840 of file text_ops.c.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), C, CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, 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(), SCROLLHANDLE_BAR, SCROLLHANDLE_INVALID_OUTSIDE, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN_OUTSIDE, usdtokens::st(), 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 2748 of file text_ops.c.
References C, and scroll_exit().
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
|
static |
Definition at line 2592 of file text_ops.c.
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(), usdtokens::st(), and txt_screen_skip().
Referenced by TEXT_OT_scroll(), text_scroll_bar_invoke(), and text_scroll_invoke().
|
static |
Definition at line 2753 of file text_ops.c.
References C, copy_v2_v2_int(), CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, TextScroll::is_first, TextScroll::is_scrollbar, MEM_callocN, MOUSEPAN, TextScroll::mval_delta, TextScroll::mval_prev, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::prev_xy, wmOperator::ptr, RNA_struct_property_is_set(), scroll_exit(), SCROLLHANDLE_BAR, usdtokens::st(), ST_SCROLL_SELECT, text_scroll_apply(), text_scroll_exec(), text_scroll_state_init(), text_update_character_width(), wmEvent::type, WM_event_add_modal_handler(), wmEvent::xy, and TextScroll::zone.
Referenced by TEXT_OT_scroll().
|
static |
Definition at line 2716 of file text_ops.c.
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, scroll_exit(), SCROLLHANDLE_BAR, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN_OUTSIDE, usdtokens::st(), text_scroll_apply(), txt_screen_skip(), wmEvent::type, wmEvent::val, and TextScroll::zone.
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
Definition at line 2585 of file text_ops.c.
References C, CTX_data_edit_text(), and NULL.
Referenced by TEXT_OT_scroll().
|
static |
Definition at line 2572 of file text_ops.c.
References max_ii(), TextScroll::ofs_init, TextScroll::ofs_max, TextScroll::size_px, usdtokens::st(), TextScroll::state, text_get_total_lines(), and TXT_LINE_HEIGHT.
Referenced by text_scroll_bar_invoke(), and text_scroll_invoke().
|
static |
Definition at line 1494 of file text_ops.c.
References C, CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_update_cursor_moved(), txt_sel_all(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_all().
|
static |
Definition at line 1524 of file text_ops.c.
References C, CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_update_cursor_moved(), txt_sel_line(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_line().
|
static |
Definition at line 1554 of file text_ops.c.
References C, CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_update_cursor_moved(), txt_jump_left(), txt_jump_right(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_word().
|
static |
Definition at line 3300 of file text_ops.c.
References C, and text_cursor_set_exit().
Referenced by TEXT_OT_selection_set().
|
static |
Definition at line 3258 of file text_ops.c.
References C, CTX_wm_space_text(), wmOperator::customdata, MEM_callocN, wmEvent::mval, SetSelection::mval_prev, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, SetSelection::selc, SetSelection::sell, usdtokens::st(), text_cursor_set_apply(), txt_get_span(), and WM_event_add_modal_handler().
Referenced by TEXT_OT_selection_set().
|
static |
Definition at line 3283 of file text_ops.c.
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().
Definition at line 198 of file text_ops.c.
References BKE_id_is_editable(), C, CTX_data_edit_text(), CTX_data_main(), CTX_wm_space_text(), Text::id, and usdtokens::st().
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 |
Definition at line 3929 of file text_ops.c.
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 2494 of file text_ops.c.
References C, CTX_wm_space_text(), NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, usdtokens::st(), and WM_event_add_notifier().
Referenced by TEXT_OT_overwrite_toggle().
|
static |
Definition at line 1175 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_space_text(), ED_text_undo_push_init(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_drawcache_tag_update(), 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 504 of file text_ops.c.
References BKE_id_delete(), C, CTX_data_edit_text(), CTX_data_main(), CTX_wm_space_text(), Text::id, NA_REMOVED, NC_TEXT, ID::next, NULL, OPERATOR_FINISHED, ID::prev, usdtokens::st(), text_drawcache_tag_update(), text_update_cursor_moved(), and WM_event_add_notifier().
Referenced by TEXT_OT_unlink().
Definition at line 498 of file text_ops.c.
References C, CTX_data_edit_text(), and NULL.
Referenced by TEXT_OT_unlink().
Definition at line 253 of file text_ops.c.
References ListBase::first, Text::lines, TextLine::next, 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().
Definition at line 243 of file text_ops.c.
References TextLine::format, and MEM_SAFE_FREE.
Referenced by text_autocomplete_invoke(), text_autocomplete_modal(), text_delete_exec(), text_insert_exec(), text_line_break_exec(), and text_update_edited().
Definition at line 1009 of file text_ops.c.
References MEM_freeN, NULL, txt_has_sel(), txt_sel_to_buf(), and WM_clipboard_text_set().
Referenced by text_copy_exec(), and text_cut_exec().
Definition at line 2523 of file text_ops.c.
References usdtokens::st(), and text_get_total_lines().
Referenced by text_reload_exec(), and txt_screen_skip().
Definition at line 2539 of file text_ops.c.
References usdtokens::st(), and txt_screen_clamp().
Referenced by text_scroll_exec(), and text_scroll_modal().
Definition at line 1836 of file text_ops.c.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_offset_from_column(), BLI_str_utf8_size_safe(), Text::curc, Text::curl, ELEM, max, MIN2, Text::selc, Text::sell, usdtokens::st(), text_update_character_width(), txt_pop_sel(), and wrap_width().
Referenced by text_move_cursor().
Definition at line 2045 of file text_ops.c.
References col, Text::curc, Text::curl, TextLine::next, Text::selc, Text::sell, usdtokens::st(), text_get_char_pos(), text_get_cursor_rel(), text_get_visible_lines(), text_update_character_width(), txt_pop_sel(), and wrap_offset_in_line().
Referenced by text_move_cursor().
Definition at line 1920 of file text_ops.c.
References BLI_str_find_prev_char_utf8(), BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), Text::curc, Text::curl, ELEM, max, MIN2, Text::selc, Text::sell, usdtokens::st(), text_update_character_width(), txt_pop_sel(), and wrap_width().
Referenced by text_move_cursor().
Definition at line 2004 of file text_ops.c.
References col, Text::curc, Text::curl, TextLine::prev, Text::selc, Text::sell, usdtokens::st(), text_get_char_pos(), text_get_cursor_rel(), text_get_visible_lines(), text_update_character_width(), txt_pop_sel(), and wrap_offset_in_line().
Referenced by text_move_cursor().
|
static |
Definition at line 587 of file text_ops.c.
References BKE_main_blendfile_path(), BKE_reportf(), BLI_exists(), BLI_file_is_writable(), BLI_fopen(), BLI_path_abs(), BLI_stat(), BLI_strncpy(), FILE_MAX, Text::filepath, ListBase::first, Text::flags, TextLine::line, Text::lines, Text::mtime, TextLine::next, NULL, RPT_ERROR, RPT_INFO, RPT_WARNING, usdtokens::st(), TIP_, and TXT_ISDIRTY.
Referenced by text_save_as_exec(), and text_save_exec().
|
static |
|
static |
Definition at line 1637 of file text_ops.c.
Referenced by TEXT_OT_move(), and TEXT_OT_move_select().
|
static |
Definition at line 3802 of file text_ops.c.
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 1340 of file text_ops.c.
Referenced by TEXT_OT_convert_whitespace().