|
Blender
V2.93
|
#include <errno.h>#include <string.h>#include "MEM_guardedalloc.h"#include "DNA_text_types.h"#include "BLI_blenlib.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 3539 of file text_ops.c.
| #define TEXT_REPLACE 1 |
Definition at line 3540 of file text_ops.c.
| typedef struct SetSelection SetSelection |
| typedef struct TextScroll TextScroll |
| anonymous enum |
| Enumerator | |
|---|---|
| TO_SPACES | |
| TO_TABS | |
Definition at line 1333 of file text_ops.c.
| anonymous enum |
| Enumerator | |
|---|---|
| RESOLVE_IGNORE | |
| RESOLVE_RELOAD | |
| RESOLVE_SAVE | |
| RESOLVE_MAKE_INTERNAL | |
Definition at line 3782 of file text_ops.c.
| enum eScrollZone |
| Enumerator | |
|---|---|
| SCROLLHANDLE_INVALID_OUTSIDE | |
| SCROLLHANDLE_BAR | |
| SCROLLHANDLE_MIN_OUTSIDE | |
| SCROLLHANDLE_MAX_OUTSIDE | |
Definition at line 2530 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. |
Definition at line 92 of file text_ops.c.
References MEM_mallocN, and test_line_start().
Referenced by text_paste_exec().
|
static |
Definition at line 2084 of file text_ops.c.
References Text::curc, Text::curl, cursor_skip_find_line(), TextLine::len, TextLine::next, TextLine::prev, Text::selc, Text::sell, text_get_cursor_rel(), txt_pop_sel(), and SpaceText::wordwrap.
Referenced by text_move_cursor().
|
static |
Definition at line 1741 of file text_ops.c.
References TextLine::next, TextLine::prev, text_get_char_pos(), text_get_visible_lines(), and wrap_offset_in_line().
Referenced by cursor_skip().
|
static |
Definition at line 2938 of file text_ops.c.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), col, str, and SpaceText::tabnumber.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 2922 of file text_ops.c.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), str, and SpaceText::tabnumber.
Referenced by text_cursor_set_to_pos().
Definition at line 2961 of file text_ops.c.
References ListBase::first, TextLine::line, Text::lines, next, NULL, SpaceText::text, text_get_visible_lines(), top, SpaceText::top, and y.
Referenced by text_cursor_set_to_pos_wrapped().
|
static |
Definition at line 1581 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 2684 of file text_ops.c.
References C, CTX_wm_area(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), SpaceText::flags, MEM_freeN, SpaceText::runtime, SpaceText_Runtime::scroll_ofs_px, TextScroll::size_px, ST_SCROLL_SELECT, TextScroll::state, and SpaceText::top.
Referenced by text_scroll_cancel(), text_scroll_invoke(), 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 77 of file text_ops.c.
References Freestyle::c, and ELEM.
Referenced by buf_tabs_to_spaces().
|
static |
Definition at line 1266 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 1340 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(), STREQ, SpaceText::tabnumber, 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 1019 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 3188 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, 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 3314 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(), SpaceText::text, 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 3227 of file text_ops.c.
References buffer, C, CTX_wm_space_text(), wmOperator::customdata, MEM_freeN, NC_TEXT, ND_CURSOR, NULL, SpaceText::text, 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 3329 of file text_ops.c.
References C, CTX_wm_space_text(), wmEvent::mval, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_set(), SpaceText::runtime, SpaceText_Runtime::scroll_region_handle, text_cursor_set_exec(), and rcti::xmin.
Referenced by TEXT_OT_cursor_set().
|
static |
Definition at line 3108 of file text_ops.c.
References Text::curc, Text::curl, ListBase::first, flatten_column_to_offset(), flatten_width(), SpaceText::left, Text::lines, TextLine::next, TextLine::prev, Text::selc, Text::sell, SpaceText::text, text_cursor_set_to_pos_wrapped(), text_pixel_x_to_column(), text_update_character_width(), 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 2983 of file text_ops.c.
References BLI_assert, BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), Text::curc, Text::curl, ELEM, ListBase::first, get_line_pos_wrapped(), ListBase::last, len, TextLine::len, TextLine::line, Text::lines, max, MIN2, Text::selc, Text::sell, SpaceText::tabnumber, SpaceText::text, wrap_width(), x, and y.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 3167 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 3177 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 1046 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().
|
static |
Definition at line 162 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 2368 of file text_ops.c.
References 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, SpaceText::live_edit, NA_EDITED, NC_TEXT, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), Text::selc, Text::sell, 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_order_cursors(), TXT_TABSTOSPACES, type, and WM_event_add_notifier().
Referenced by TEXT_OT_delete().
|
static |
Definition at line 964 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().
|
static |
Definition at line 171 of file text_ops.c.
References C, CTX_data_edit_text(), and ID_IS_LINKED.
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 3542 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(), SpaceText::findstr, ListBase::first, SpaceText::flags, TextLine::format, Text::id, MEM_freeN, NA_EDITED, NC_TEXT, ND_CURSOR, ID::next, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, SpaceText::replacestr, wmOperator::reports, RPT_WARNING, ST_FIND_ALL, ST_FIND_WRAP, ST_MATCH_CASE, STREQ, SpaceText::text, 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 3613 of file text_ops.c.
References C, TEXT_FIND, and text_find_and_replace().
Referenced by TEXT_OT_find().
|
static |
Definition at line 3713 of file text_ops.c.
References BLI_strncpy(), C, CTX_data_edit_text(), CTX_wm_space_text(), SpaceText::findstr, MEM_freeN, NULL, OPERATOR_FINISHED, 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 1648 of file text_ops.c.
References BLI_str_utf8_char_width_safe(), BLI_str_utf8_size_safe(), ELEM, TextLine::len, TextLine::line, max, MIN2, SpaceText::tabnumber, and wrap_width().
Referenced by cursor_skip(), txt_wrap_move_down(), and txt_wrap_move_up().
|
static |
Definition at line 1124 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 1089 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 3427 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, SpaceText::overwrite, wmOperator::ptr, RNA_string_get_alloc(), 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 3469 of file text_ops.c.
References wmEvent::ascii, BLI_str_utf8_from_unicode(), BLI_str_utf8_size_safe(), BLI_UTF8_MAX, C, wmEvent::ctrl, CTX_wm_space_text(), len, NULL, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmEvent::oskey, wmOperator::ptr, ret, RNA_string_length(), RNA_string_set(), str, text_insert_exec(), text_run_script(), and wmEvent::utf8_buf.
Referenced by TEXT_OT_insert().
|
static |
Definition at line 2308 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 2330 of file text_ops.c.
References C, and WM_operator_props_dialog_popup().
Referenced by TEXT_OT_jump().
|
static |
Definition at line 1209 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, SpaceText::tabnumber, 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 3366 of file text_ops.c.
References wmEvent::ascii, C, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), SpaceText_Runtime::cwidth_px, NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, PIL_check_seconds_timer(), SpaceText::runtime, SpaceText::showlinenrs, text_update_character_width(), text_update_cursor_moved(), time, TXT_BODY_LPAD, txt_move_toline(), TXT_NUMCOL_WIDTH, ARegion::winy, and WM_event_add_notifier().
Referenced by TEXT_OT_line_number().
|
static |
Definition at line 544 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().
|
static |
Definition at line 2126 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, SpaceText::runtime, select(), SpaceText::text, 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, SpaceText_Runtime::viewlines, WM_event_add_notifier(), and SpaceText::wordwrap.
Referenced by text_move_exec(), and text_move_select_exec().
|
static |
Definition at line 2247 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 2275 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 260 of file text_ops.c.
References BKE_text_add(), C, CTX_data_main(), CTX_wm_space_text(), Text::id, SpaceText::left, NA_ADDED, NC_TEXT, NULL, OPERATOR_FINISHED, ptr, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), SpaceText::runtime, SpaceText_Runtime::scroll_ofs_px, SpaceText::text, text_drawcache_tag_update(), SpaceText::top, UI_context_active_but_prop_get_templateID(), and WM_event_add_notifier().
Referenced by TEXT_OT_new().
|
static |
Definition at line 157 of file text_ops.c.
Referenced by TEXT_OT_new(), and TEXT_OT_open().
|
static |
Definition at line 321 of file text_ops.c.
References wmOperator::customdata, and MEM_freeN.
Referenced by TEXT_OT_open().
|
static |
Definition at line 326 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, SpaceText::left, 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(), SpaceText::runtime, SpaceText_Runtime::scroll_ofs_px, str, SpaceText::text, text_drawcache_tag_update(), text_open_init(), SpaceText::top, and WM_event_add_notifier().
Referenced by text_open_invoke(), and TEXT_OT_open().
|
static |
Definition at line 313 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 375 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 1301 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 1459 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 1028 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 3343 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 1068 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 2447 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 982 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 3618 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 3730 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 1148 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 1103 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 3509 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 2335 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 1245 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 3409 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 558 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 2254 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 1601 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 2282 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 292 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 392 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 2489 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 936 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 878 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 471 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 3687 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 3761 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 3883 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 810 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 658 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 729 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 2780 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 2887 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 1500 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 1530 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 1563 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 3294 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 3920 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 1188 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 522 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 896 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 145 of file text_ops.c.
References SpaceText_Runtime::cwidth_px, SpaceText::runtime, and x.
Referenced by text_cursor_set_to_pos().
|
static |
Definition at line 831 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().
|
static |
Definition at line 204 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), ID_IS_LINKED, 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 2810 of file text_ops.c.
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 426 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, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), SpaceText::top, 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 3636 of file text_ops.c.
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, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, SpaceText::replacestr, ST_MATCH_CASE, SpaceText::text, 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 3678 of file text_ops.c.
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 3748 of file text_ops.c.
References BLI_strncpy(), C, CTX_data_edit_text(), CTX_wm_space_text(), MEM_freeN, NULL, OPERATOR_FINISHED, SpaceText::replacestr, ST_MAX_FIND_STR, and txt_sel_to_buf().
Referenced by TEXT_OT_replace_set_selected().
|
static |
Definition at line 3802 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 3822 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().
|
static |
Definition at line 3791 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 757 of file text_ops.c.
References BKE_report(), BPY_run_text(), C, CTX_data_edit_text(), Text::curc, Text::curl, NA_EDITED, NC_TEXT, NC_WINDOW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, RPT_ERROR, 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 797 of file text_ops.c.
References BKE_report(), C, OPERATOR_CANCELLED, wmOperator::reports, RPT_ERROR, and text_run_script().
Referenced by TEXT_OT_run_script().
|
static |
Definition at line 677 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 703 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 633 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 646 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 2594 of file text_ops.c.
References C, CTX_wm_area(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), TextScroll::is_first, TextScroll::is_scrollbar, SpaceText::left, MOUSEPAN, TextScroll::mval_delta, TextScroll::mval_prev, TextScroll::ofs_delta, TextScroll::ofs_delta_px, TextScroll::ofs_init, TextScroll::ofs_max, SpaceText::runtime, SpaceText_Runtime::scroll_ofs_px, SpaceText_Runtime::scroll_px_per_line, TextScroll::size_px, TextScroll::state, text_update_character_width(), SpaceText::top, wmEvent::type, and SpaceText::wordwrap.
Referenced by text_scroll_bar_invoke(), text_scroll_invoke(), and text_scroll_modal().
|
static |
Definition at line 2828 of file text_ops.c.
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, SpaceText_Runtime::scroll_region_handle, 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::xmax, rcti::xmin, rcti::ymax, rcti::ymin, and TextScroll::zone.
Referenced by TEXT_OT_scroll_bar().
|
static |
Definition at line 2734 of file text_ops.c.
References C, and scroll_exit().
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
|
static |
Definition at line 2576 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(), and txt_screen_skip().
Referenced by TEXT_OT_scroll(), text_scroll_bar_invoke(), and text_scroll_invoke().
|
static |
Definition at line 2739 of file text_ops.c.
References C, CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, SpaceText_Runtime::cwidth_px, SpaceText::flags, TextScroll::is_first, TextScroll::is_scrollbar, SpaceText_Runtime::lheight_px, MEM_callocN, MOUSEPAN, TextScroll::mval_delta, TextScroll::mval_prev, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::prevy, wmOperator::ptr, RNA_struct_property_is_set(), SpaceText::runtime, scroll_exit(), SCROLLHANDLE_BAR, 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::y, and TextScroll::zone.
Referenced by TEXT_OT_scroll().
|
static |
Definition at line 2702 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, SpaceText::runtime, scroll_exit(), SCROLLHANDLE_BAR, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN_OUTSIDE, text_scroll_apply(), txt_screen_skip(), wmEvent::type, wmEvent::val, SpaceText_Runtime::viewlines, and TextScroll::zone.
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
|
static |
Definition at line 2569 of file text_ops.c.
References C, CTX_data_edit_text(), and NULL.
Referenced by TEXT_OT_scroll().
|
static |
Definition at line 2556 of file text_ops.c.
References SpaceText_Runtime::cwidth_px, SpaceText::left, max_ii(), TextScroll::ofs_init, TextScroll::ofs_max, SpaceText::runtime, TextScroll::size_px, TextScroll::state, text_get_total_lines(), SpaceText::top, TXT_LINE_HEIGHT, and SpaceText_Runtime::viewlines.
Referenced by text_scroll_bar_invoke(), and text_scroll_invoke().
|
static |
Definition at line 1488 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 1518 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 1548 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 3289 of file text_ops.c.
References C, and text_cursor_set_exit().
Referenced by TEXT_OT_selection_set().
|
static |
Definition at line 3247 of file text_ops.c.
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, SpaceText_Runtime::scroll_region_handle, SetSelection::selc, Text::selc, SetSelection::sell, Text::sell, SpaceText::text, text_cursor_set_apply(), txt_get_span(), WM_event_add_modal_handler(), and rcti::xmin.
Referenced by TEXT_OT_selection_set().
|
static |
Definition at line 3272 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().
| bool text_space_edit_poll | ( | bContext * | C | ) |
Definition at line 187 of file text_ops.c.
References C, CTX_data_edit_text(), CTX_wm_space_text(), and ID_IS_LINKED.
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 3910 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 2478 of file text_ops.c.
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 1169 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 496 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, SpaceText::text, text_drawcache_tag_update(), text_update_cursor_moved(), and WM_event_add_notifier().
Referenced by TEXT_OT_unlink().
|
static |
Definition at line 490 of file text_ops.c.
References C, CTX_data_edit_text(), and NULL.
Referenced by TEXT_OT_unlink().
| void text_update_edited | ( | Text * | text | ) |
Definition at line 245 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().
| void text_update_line_edited | ( | TextLine * | line | ) |
Definition at line 232 of file text_ops.c.
References TextLine::format, MEM_freeN, and NULL.
Referenced by text_autocomplete_invoke(), text_autocomplete_modal(), text_delete_exec(), text_insert_exec(), text_line_break_exec(), and text_update_edited().
|
static |
Definition at line 1003 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 2507 of file text_ops.c.
References SpaceText::runtime, text_get_total_lines(), SpaceText::top, and SpaceText_Runtime::viewlines.
Referenced by text_reload_exec(), and txt_screen_skip().
Definition at line 2523 of file text_ops.c.
References SpaceText::top, and txt_screen_clamp().
Referenced by text_scroll_exec(), and text_scroll_modal().
Definition at line 1830 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, SpaceText::tabnumber, SpaceText::text, text_update_character_width(), txt_pop_sel(), and wrap_width().
Referenced by text_move_cursor().
Definition at line 2039 of file text_ops.c.
References col, Text::curc, Text::curl, TextLine::next, Text::selc, Text::sell, SpaceText::text, 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 1914 of file text_ops.c.
References BLI_str_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, SpaceText::tabnumber, SpaceText::text, text_update_character_width(), txt_pop_sel(), and wrap_width().
Referenced by text_move_cursor().
Definition at line 1998 of file text_ops.c.
References col, Text::curc, Text::curl, TextLine::prev, Text::selc, Text::sell, SpaceText::text, 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 579 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, TIP_, and TXT_ISDIRTY.
Referenced by text_save_as_exec(), and text_save_exec().
|
static |
|
static |
Definition at line 1631 of file text_ops.c.
Referenced by TEXT_OT_move(), and TEXT_OT_move_select().
|
static |
Definition at line 3783 of file text_ops.c.
Referenced by TEXT_OT_resolve_conflict().
|
static |
Definition at line 1334 of file text_ops.c.
Referenced by TEXT_OT_convert_whitespace().