|
Blender
V2.59
|
Go to the source code of this file.
Defines | |
| #define | UNDO_CLEFT 001 |
| #define | UNDO_CRIGHT 002 |
| #define | UNDO_CUP 003 |
| #define | UNDO_CDOWN 004 |
| #define | UNDO_SLEFT 005 |
| #define | UNDO_SRIGHT 006 |
| #define | UNDO_SUP 007 |
| #define | UNDO_SDOWN 021 |
| #define | UNDO_CTO 022 |
| #define | UNDO_STO 023 |
| #define | UNDO_INSERT 024 |
| #define | UNDO_BS 025 |
| #define | UNDO_DEL 026 |
| #define | UNDO_DBLOCK 027 |
| #define | UNDO_IBLOCK 030 |
| #define | UNDO_SWAP 031 |
| #define | UNDO_INDENT 032 |
| #define | UNDO_UNINDENT 033 |
| #define | UNDO_COMMENT 034 |
| #define | UNDO_UNCOMMENT 035 |
| #define | TMARK_TEMP 0x01 |
| #define | TMARK_EDITALL 0x02 |
Functions | |
| void | free_text (struct Text *text) |
| void | txt_set_undostate (int u) |
| int | txt_get_undostate (void) |
| struct Text * | add_empty_text (const char *name) |
| int | reopen_text (struct Text *text) |
| struct Text * | add_text (const char *file, const char *relpath) |
| struct Text * | copy_text (struct Text *ta) |
| void | unlink_text (struct Main *bmain, struct Text *text) |
| void | clear_text (struct Text *text) |
| void | write_text (struct Text *text, const char *str) |
| char * | txt_to_buf (struct Text *text) |
| void | txt_clean_text (struct Text *text) |
| void | txt_order_cursors (struct Text *text) |
| int | txt_find_string (struct Text *text, char *findstr, int wrap, int match_case) |
| int | txt_has_sel (struct Text *text) |
| int | txt_get_span (struct TextLine *from, struct TextLine *to) |
| void | txt_move_up (struct Text *text, short sel) |
| void | txt_move_down (struct Text *text, short sel) |
| void | txt_move_left (struct Text *text, short sel) |
| void | txt_move_right (struct Text *text, short sel) |
| void | txt_jump_left (struct Text *text, short sel) |
| void | txt_jump_right (struct Text *text, short sel) |
| void | txt_move_bof (struct Text *text, short sel) |
| void | txt_move_eof (struct Text *text, short sel) |
| void | txt_move_bol (struct Text *text, short sel) |
| void | txt_move_eol (struct Text *text, short sel) |
| void | txt_move_toline (struct Text *text, unsigned int line, short sel) |
| void | txt_move_to (struct Text *text, unsigned int line, unsigned int ch, short sel) |
| void | txt_pop_sel (struct Text *text) |
| void | txt_delete_char (struct Text *text) |
| void | txt_delete_word (struct Text *text) |
| void | txt_delete_selected (struct Text *text) |
| void | txt_sel_all (struct Text *text) |
| void | txt_sel_line (struct Text *text) |
| char * | txt_sel_to_buf (struct Text *text) |
| void | txt_insert_buf (struct Text *text, const char *in_buffer) |
| void | txt_print_undo (struct Text *text) |
| void | txt_undo_add_toop (struct Text *text, int op, unsigned int froml, unsigned short fromc, unsigned int tol, unsigned short toc) |
| void | txt_do_undo (struct Text *text) |
| void | txt_do_redo (struct Text *text) |
| void | txt_split_curline (struct Text *text) |
| void | txt_backspace_char (struct Text *text) |
| void | txt_backspace_word (struct Text *text) |
| int | txt_add_char (struct Text *text, char add) |
| int | txt_add_raw_char (struct Text *text, char add) |
| int | txt_replace_char (struct Text *text, char add) |
| void | txt_export_to_object (struct Text *text) |
| void | txt_export_to_objects (struct Text *text) |
| void | txt_unindent (struct Text *text) |
| void | txt_comment (struct Text *text) |
| void | txt_indent (struct Text *text) |
| void | txt_uncomment (struct Text *text) |
| int | setcurr_tab_spaces (struct Text *text, int space) |
| void | txt_add_marker (struct Text *text, struct TextLine *line, int start, int end, const unsigned char color[4], int group, int flags) |
| short | txt_clear_marker_region (struct Text *text, struct TextLine *line, int start, int end, int group, int flags) |
| short | txt_clear_markers (struct Text *text, int group, int flags) |
| struct TextMarker * | txt_find_marker (struct Text *text, struct TextLine *line, int curs, int group, int flags) |
| struct TextMarker * | txt_find_marker_region (struct Text *text, struct TextLine *line, int start, int end, int group, int flags) |
| struct TextMarker * | txt_prev_marker (struct Text *text, struct TextMarker *marker) |
| struct TextMarker * | txt_next_marker (struct Text *text, struct TextMarker *marker) |
| struct TextMarker * | txt_prev_marker_color (struct Text *text, struct TextMarker *marker) |
| struct TextMarker * | txt_next_marker_color (struct Text *text, struct TextMarker *marker) |
| int | text_check_bracket (char ch) |
| int | text_check_delim (char ch) |
| int | text_check_digit (char ch) |
| int | text_check_identifier (char ch) |
| int | text_check_whitespace (char ch) |
Definition in file BKE_text.h.
| #define TMARK_EDITALL 0x02 |
Definition at line 163 of file BKE_text.h.
Referenced by do_textmarkers(), find_and_replace(), rna_def_text_marker(), txt_backspace_char(), and txt_delete_char().
| #define TMARK_TEMP 0x01 |
Definition at line 162 of file BKE_text.h.
Referenced by do_textmarkers(), rna_def_text_marker(), txt_backspace_char(), and txt_delete_char().
| #define UNDO_BS 025 |
Definition at line 143 of file BKE_text.h.
Referenced by txt_backspace_char(), txt_do_redo(), txt_do_undo(), and txt_print_undo().
| #define UNDO_CDOWN 004 |
Definition at line 126 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_down(), and txt_print_undo().
| #define UNDO_CLEFT 001 |
Definition at line 123 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_left(), and txt_print_undo().
| #define UNDO_COMMENT 034 |
Definition at line 158 of file BKE_text.h.
Referenced by txt_comment(), txt_do_redo(), txt_do_undo(), and txt_print_undo().
| #define UNDO_CRIGHT 002 |
Definition at line 124 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_right(), and txt_print_undo().
| #define UNDO_CTO 022 |
Definition at line 137 of file BKE_text.h.
Referenced by cursor_skip(), set_cursor_exec(), txt_do_redo(), txt_do_undo(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_down(), txt_move_eof(), txt_move_eol(), txt_move_to(), txt_move_up(), txt_print_undo(), wrap_move_bol(), wrap_move_down(), wrap_move_eol(), and wrap_move_up().
| #define UNDO_CUP 003 |
Definition at line 125 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_up(), and txt_print_undo().
| #define UNDO_DBLOCK 027 |
Definition at line 150 of file BKE_text.h.
Referenced by txt_delete_sel(), txt_do_redo(), txt_do_undo(), and txt_print_undo().
| #define UNDO_DEL 026 |
Definition at line 144 of file BKE_text.h.
Referenced by txt_delete_char(), txt_do_redo(), txt_do_undo(), txt_print_undo(), and txt_replace_char().
| #define UNDO_IBLOCK 030 |
Definition at line 151 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_insert_buf(), and txt_print_undo().
| #define UNDO_INDENT 032 |
Definition at line 156 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_indent(), and txt_print_undo().
| #define UNDO_INSERT 024 |
Definition at line 142 of file BKE_text.h.
Referenced by txt_add_char_intern(), txt_do_redo(), txt_do_undo(), txt_print_undo(), txt_replace_char(), and txt_split_curline().
| #define UNDO_SDOWN 021 |
Definition at line 132 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_down(), and txt_print_undo().
| #define UNDO_SLEFT 005 |
Definition at line 129 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_left(), and txt_print_undo().
| #define UNDO_SRIGHT 006 |
Definition at line 130 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_right(), and txt_print_undo().
| #define UNDO_STO 023 |
Definition at line 138 of file BKE_text.h.
Referenced by cursor_skip(), set_cursor_exit(), txt_do_redo(), txt_do_undo(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_down(), txt_move_eof(), txt_move_eol(), txt_move_to(), txt_move_up(), txt_pop_first(), txt_pop_last(), txt_print_undo(), wrap_move_bol(), wrap_move_down(), wrap_move_eol(), and wrap_move_up().
| #define UNDO_SUP 007 |
Definition at line 131 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_up(), and txt_print_undo().
| #define UNDO_SWAP 031 |
Definition at line 154 of file BKE_text.h.
Referenced by txt_curs_swap(), txt_do_redo(), txt_do_undo(), and txt_print_undo().
| #define UNDO_UNCOMMENT 035 |
Definition at line 159 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_print_undo(), and txt_uncomment().
| #define UNDO_UNINDENT 033 |
Definition at line 157 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_print_undo(), and txt_unindent().
| struct Text* add_empty_text | ( | const char * | name | ) | [read] |
Definition at line 181 of file text.c.
References alloc_libblock(), BLI_addhead(), Text::curc, Text::curl, ListBase::first, Text::flags, TextLine::format, G, Text::id, ID_TXT, init_undo_text(), ListBase::last, TextLine::len, TextLine::line, Text::lines, Global::main, Text::markers, MEM_mallocN(), Text::name, TextLine::next, Text::nlines, NULL, TextLine::prev, Text::selc, Text::sell, Main::text, TXT_ISDIRTY, TXT_ISMEM, TXT_TABSTOSPACES, ID::us, and USER_TXT_TABSTOSPACES_DISABLE.
Referenced by new_exec(), and reports_to_text_exec().
| struct Text* add_text | ( | const char * | file, |
| const char * | relpath | ||
| ) | [read] |
Definition at line 333 of file text.c.
References alloc_libblock(), BLI_addtail(), BLI_path_abs(), BLI_path_basename(), BLI_strncpy(), cleanup_textline(), Text::curc, Text::curl, FILE_MAXDIR, FILE_MAXFILE, ListBase::first, Text::flags, TextLine::format, G, i, Text::id, ID_TXT, init_undo_text(), L, ListBase::last, TextLine::len, TextLine::line, Text::lines, Global::main, Text::markers, MEM_freeN(), MEM_mallocN(), Text::mtime, Text::name, Text::nlines, NULL, Text::selc, Text::sell, str, Main::text, TXT_TABSTOSPACES, ID::us, and USER_TXT_TABSTOSPACES_DISABLE.
Referenced by main(), and open_exec().
| void clear_text | ( | struct Text * | text | ) |
Definition at line 559 of file text.c.
References txt_delete_sel(), txt_get_undostate(), txt_make_dirty(), txt_sel_all(), and txt_set_undostate().
Definition at line 433 of file text.c.
References BLI_addtail(), copy_libblock(), Text::curc, Text::curl, ListBase::first, Text::flags, TextLine::format, init_undo_text(), ListBase::last, TextLine::len, TextLine::line, Text::lines, Text::markers, MEM_mallocN(), Text::name, TextLine::next, Text::nlines, NULL, Text::selc, Text::sell, KDL::tan(), and TXT_ISDIRTY.
Referenced by id_copy().
| void free_text | ( | struct Text * | text | ) |
Definition at line 161 of file text.c.
References BLI_freelistN(), BPY_text_free_code(), Text::compiled, ListBase::first, TextLine::format, TextLine::line, Text::lines, Text::markers, MEM_freeN(), Text::name, TextLine::next, and Text::undo_buf.
Referenced by free_libblock().
| int reopen_text | ( | struct Text * | text | ) |
Definition at line 238 of file text.c.
References BLI_addtail(), BLI_freelistN(), BLI_path_abs(), BLI_strncpy(), cleanup_textline(), Text::curc, Text::curl, FILE_MAXDIR, FILE_MAXFILE, ListBase::first, TextLine::format, G, i, init_undo_text(), L, ListBase::last, TextLine::len, TextLine::line, Text::lines, Global::main, MEM_freeN(), MEM_mallocN(), Text::mtime, Main::name, Text::name, TextLine::next, Text::nlines, NULL, Text::selc, Text::sell, str, Text::undo_buf, and Text::undo_pos.
Referenced by reload_exec().
| int setcurr_tab_spaces | ( | struct Text * | text, |
| int | space | ||
| ) |
Definition at line 2731 of file text.c.
References Text::curc, Text::curl, Text::flags, i, TextLine::line, NULL, rna_array::test, and TXT_TABSTOSPACES.
Referenced by line_break_exec().
| int text_check_bracket | ( | char | ch | ) |
Definition at line 2934 of file text.c.
Referenced by draw_brackets().
| int text_check_delim | ( | char | ch | ) |
Definition at line 2949 of file text.c.
Referenced by move_exec(), and txt_format_line().
| int text_check_digit | ( | char | ch | ) |
Definition at line 2961 of file text.c.
Referenced by txt_format_line().
| int text_check_identifier | ( | char | ch | ) |
Definition at line 2968 of file text.c.
Referenced by confirm_suggestion(), find_bool(), find_builtinfunc(), find_decorator(), find_specialvar(), and get_suggest_prefix().
| int text_check_whitespace | ( | char | ch | ) |
Definition at line 2979 of file text.c.
Referenced by do_texttools(), and move_exec().
| int txt_add_char | ( | struct Text * | text, |
| char | add | ||
| ) |
Definition at line 2461 of file text.c.
References Text::flags, txt_add_char_intern(), and TXT_TABSTOSPACES.
Referenced by do_textmarkers(), do_texttools(), indent_exec(), insert_exec(), line_break_exec(), txt_do_redo(), txt_do_undo(), and txt_replace_char().
| void txt_add_marker | ( | struct Text * | text, |
| struct TextLine * | line, | ||
| int | start, | ||
| int | end, | ||
| const unsigned char | color[4], | ||
| int | group, | ||
| int | flags | ||
| ) |
Definition at line 2795 of file text.c.
References BLI_addhead(), BLI_insertlinkafter(), TextMarker::color, TextMarker::end, ListBase::first, TextMarker::flags, TextMarker::group, ListBase::last, TextMarker::lineno, Text::lines, Text::markers, MAX2, MEM_mallocN(), MIN2, TextMarker::prev, TextMarker::start, and txt_get_span().
Referenced by find_and_replace().
| int txt_add_raw_char | ( | struct Text * | text, |
| char | add | ||
| ) |
Definition at line 2466 of file text.c.
References txt_add_char_intern().
Referenced by txt_insert_buf().
| void txt_backspace_char | ( | struct Text * | text | ) |
Definition at line 2328 of file text.c.
References BLI_freelinkN(), Text::curc, Text::curl, TextMarker::end, TextMarker::flags, TextMarker::group, i, TextLine::len, TextLine::line, TextMarker::lineno, Text::markers, TextLine::next, TextMarker::next, TextLine::prev, TextMarker::start, TMARK_EDITALL, TMARK_TEMP, txt_clean_text(), txt_clear_markers(), txt_combine_lines(), txt_delete_sel(), txt_find_marker_region(), txt_has_sel(), txt_make_dirty(), txt_pop_sel(), txt_undo_add_charop(), UNDO_BS, and undoing.
Referenced by delete_exec(), do_textmarkers(), txt_do_redo(), and txt_do_undo().
| void txt_backspace_word | ( | struct Text * | text | ) |
Definition at line 2387 of file text.c.
References txt_delete_sel(), and txt_jump_left().
Referenced by delete_exec().
| void txt_clean_text | ( | struct Text * | text | ) |
Definition at line 632 of file text.c.
References Text::curc, Text::curl, ListBase::first, ListBase::last, Text::lines, TextLine::next, NULL, TextLine::prev, Text::selc, Text::sell, and txt_new_line().
Referenced by draw_text_main(), txt_add_char_intern(), txt_backspace_char(), txt_combine_lines(), txt_comment(), txt_delete_char(), txt_delete_line(), txt_indent(), txt_replace_char(), txt_split_curline(), txt_uncomment(), and txt_unindent().
| short txt_clear_marker_region | ( | struct Text * | text, |
| struct TextLine * | line, | ||
| int | start, | ||
| int | end, | ||
| int | group, | ||
| int | flags | ||
| ) |
Definition at line 2844 of file text.c.
References BLI_freelinkN(), TextMarker::end, ListBase::first, TextMarker::flags, TextMarker::group, TextMarker::lineno, Text::lines, Text::markers, TextMarker::next, next, TextMarker::start, and txt_get_span().
Referenced by txt_delete_sel().
| short txt_clear_markers | ( | struct Text * | text, |
| int | group, | ||
| int | flags | ||
| ) |
Definition at line 2869 of file text.c.
References BLI_freelinkN(), ListBase::first, TextMarker::flags, TextMarker::group, Text::markers, TextMarker::next, and next.
Referenced by clear_all_markers_exec(), do_textmarkers(), find_and_replace(), txt_backspace_char(), and txt_delete_char().
| void txt_comment | ( | struct Text * | text | ) |
Definition at line 2630 of file text.c.
References add(), Text::curc, Text::curl, ListBase::first, TextLine::len, TextLine::line, Text::lines, make_new_line(), MEM_mallocN(), TextLine::next, TextLine::prev, Text::selc, Text::sell, TRUE, txt_clean_text(), txt_get_span(), txt_make_dirty(), txt_undo_add_toop(), UNDO_COMMENT, and undoing.
Referenced by comment_exec(), txt_do_redo(), and txt_do_undo().
| void txt_delete_char | ( | struct Text * | text | ) |
Definition at line 2268 of file text.c.
References BLI_freelinkN(), Text::curc, Text::curl, TextMarker::end, TextMarker::flags, TextMarker::group, i, TextLine::len, TextLine::line, TextMarker::lineno, Text::markers, TextLine::next, TextMarker::next, TextMarker::start, TMARK_EDITALL, TMARK_TEMP, txt_clean_text(), txt_clear_markers(), txt_combine_lines(), txt_delete_sel(), txt_find_marker_region(), txt_has_sel(), txt_make_dirty(), txt_pop_sel(), txt_undo_add_charop(), UNDO_DEL, and undoing.
Referenced by delete_exec(), do_textmarkers(), and txt_do_redo().
| void txt_delete_selected | ( | struct Text * | text | ) |
Definition at line 2471 of file text.c.
References txt_delete_sel(), and txt_make_dirty().
Referenced by cut_exec().
| void txt_delete_word | ( | struct Text * | text | ) |
Definition at line 2322 of file text.c.
References txt_delete_sel(), and txt_jump_right().
Referenced by delete_exec().
| void txt_do_redo | ( | struct Text * | text | ) |
Definition at line 1936 of file text.c.
References Text::curc, Text::curl, ListBase::first, i, Text::lines, MEM_freeN(), MEM_mallocN(), TextLine::next, Text::selc, Text::sell, txt_add_char(), txt_backspace_char(), txt_comment(), txt_curs_swap(), txt_delete_char(), txt_delete_sel(), txt_do_redo(), txt_indent(), txt_insert_buf(), txt_move_down(), txt_move_left(), txt_move_right(), txt_move_toline(), txt_move_up(), txt_pop_sel(), txt_uncomment(), txt_unindent(), UNDO_BS, Text::undo_buf, UNDO_CDOWN, UNDO_CLEFT, UNDO_COMMENT, UNDO_CRIGHT, UNDO_CTO, UNDO_CUP, UNDO_DBLOCK, UNDO_DEL, UNDO_IBLOCK, UNDO_INDENT, UNDO_INSERT, Text::undo_pos, UNDO_SDOWN, UNDO_SLEFT, UNDO_SRIGHT, UNDO_STO, UNDO_SUP, UNDO_SWAP, UNDO_UNCOMMENT, UNDO_UNINDENT, and undoing.
Referenced by ED_text_undo_step(), txt_do_redo(), and txt_do_undo().
| void txt_do_undo | ( | struct Text * | text | ) |
Definition at line 1704 of file text.c.
References Text::curc, Text::curl, ListBase::first, i, Text::lines, MEM_freeN(), MEM_mallocN(), TextLine::next, Text::selc, Text::sell, txt_add_char(), txt_backspace_char(), txt_comment(), txt_curs_first(), txt_curs_swap(), txt_delete_sel(), txt_do_redo(), txt_do_undo(), txt_get_span(), txt_indent(), txt_insert_buf(), txt_move_down(), txt_move_left(), txt_move_right(), txt_move_toline(), txt_move_up(), txt_pop_sel(), txt_uncomment(), txt_unindent(), UNDO_BS, Text::undo_buf, UNDO_CDOWN, UNDO_CLEFT, UNDO_COMMENT, UNDO_CRIGHT, UNDO_CTO, UNDO_CUP, UNDO_DBLOCK, UNDO_DEL, UNDO_IBLOCK, UNDO_INDENT, UNDO_INSERT, Text::undo_pos, UNDO_SDOWN, UNDO_SLEFT, UNDO_SRIGHT, UNDO_STO, UNDO_SUP, UNDO_SWAP, UNDO_UNCOMMENT, UNDO_UNINDENT, and undoing.
Referenced by ED_text_undo_step(), and txt_do_undo().
| void txt_export_to_object | ( | struct Text * | text | ) |
| void txt_export_to_objects | ( | struct Text * | text | ) |
| struct TextMarker* txt_find_marker | ( | struct Text * | text, |
| struct TextLine * | line, | ||
| int | curs, | ||
| int | group, | ||
| int | flags | ||
| ) | [read] |
Definition at line 2887 of file text.c.
References ListBase::first, TextMarker::flags, TextMarker::group, TextMarker::lineno, Text::lines, Text::markers, TextMarker::next, NULL, TextMarker::start, and txt_get_span().
Referenced by do_textmarkers(), find_and_replace(), and txt_replace_char().
| struct TextMarker* txt_find_marker_region | ( | struct Text * | text, |
| struct TextLine * | line, | ||
| int | start, | ||
| int | end, | ||
| int | group, | ||
| int | flags | ||
| ) | [read] |
Definition at line 2822 of file text.c.
References TextMarker::end, ListBase::first, TextMarker::flags, TextMarker::group, TextMarker::lineno, Text::lines, Text::markers, TextMarker::next, next, NULL, TextMarker::start, and txt_get_span().
Referenced by txt_add_char_intern(), txt_backspace_char(), txt_combine_lines(), txt_delete_char(), and txt_delete_sel().
| int txt_find_string | ( | struct Text * | text, |
| char * | findstr, | ||
| int | wrap, | ||
| int | match_case | ||
| ) |
Definition at line 1241 of file text.c.
References BLI_strcasestr(), Text::curl, ListBase::first, TextLine::line, Text::lines, TextLine::next, NULL, Text::selc, Text::sell, txt_get_span(), txt_move_to(), and txt_order_cursors().
Referenced by find_and_replace().
Definition at line 663 of file text.c.
References TextLine::next, and TextLine::prev.
Referenced by cursor_skip(), do_textmarkers(), draw_brackets(), draw_cursor(), draw_markers(), jump_exec(), next_marker_exec(), previous_marker_exec(), set_cursor_exec(), set_cursor_exit(), set_cursor_to_pos(), set_selection_invoke(), text_get_span_wrap(), text_update_cursor_moved(), txt_add_marker(), txt_clear_marker_region(), txt_combine_lines(), txt_comment(), txt_copy_selected(), txt_curs_first(), txt_delete_line(), txt_delete_sel(), txt_do_undo(), txt_find_marker(), txt_find_marker_region(), txt_find_string(), txt_indent(), txt_insert_buf(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_down(), txt_move_eof(), txt_move_eol(), txt_move_to(), txt_move_up(), txt_order_cursors(), txt_pop_first(), txt_pop_last(), txt_sel_to_buf(), txt_split_curline(), txt_uncomment(), txt_unindent(), wrap_move_bol(), wrap_move_down(), wrap_move_eol(), and wrap_move_up().
| int txt_get_undostate | ( | void | ) |
Definition at line 149 of file text.c.
References undoing.
Referenced by clear_text(), and write_text().
| int txt_has_sel | ( | struct Text * | text | ) |
Definition at line 1086 of file text.c.
References Text::curc, Text::curl, Text::selc, and Text::sell.
Referenced by comment_exec(), find_and_replace(), indent_exec(), set_cursor_exit(), txt_backspace_char(), txt_copy_selected(), txt_delete_char(), txt_delete_sel(), txt_replace_char(), uncomment_exec(), and unindent_exec().
| void txt_indent | ( | struct Text * | text | ) |
Definition at line 2509 of file text.c.
References add(), Text::curc, Text::curl, ListBase::first, Text::flags, TextLine::len, TextLine::line, Text::lines, make_new_line(), MEM_mallocN(), TextLine::next, TextLine::prev, Text::selc, Text::sell, tab_to_spaces, TRUE, txt_clean_text(), txt_get_span(), txt_make_dirty(), TXT_TABSIZE, TXT_TABSTOSPACES, txt_undo_add_toop(), UNDO_INDENT, and undoing.
Referenced by indent_exec(), txt_do_redo(), and txt_do_undo().
| void txt_insert_buf | ( | struct Text * | text, |
| const char * | in_buffer | ||
| ) |
Definition at line 1366 of file text.c.
References add(), BLI_insertlinkbefore(), Text::curl, ListBase::first, i, Text::lines, txt_add_raw_char(), txt_delete_sel(), txt_get_span(), txt_new_linen(), txt_shift_markers(), txt_split_curline(), txt_undo_add_block(), UNDO_IBLOCK, and undoing.
Referenced by confirm_suggestion(), find_and_replace(), paste_exec(), txt_convert_tab_to_spaces(), txt_do_redo(), txt_do_undo(), and write_text().
| void txt_jump_left | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 849 of file text.c.
References ListBase::first, i, Text::lines, txt_char_type(), txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_move_left(), txt_pop_first(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and undoing.
Referenced by move_cursor(), select_word_exec(), and txt_backspace_word().
| void txt_jump_right | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 880 of file text.c.
References ListBase::first, i, Text::lines, txt_char_type(), txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_move_right(), txt_pop_last(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and undoing.
Referenced by move_cursor(), select_word_exec(), and txt_delete_word().
| void txt_move_bof | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 945 of file text.c.
References ListBase::first, Text::lines, txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and undoing.
Referenced by move_cursor().
| void txt_move_bol | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 911 of file text.c.
References ListBase::first, Text::lines, txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and undoing.
Referenced by move_cursor(), and txt_move_up().
| void txt_move_down | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 774 of file text.c.
References ListBase::first, TextLine::len, Text::lines, TextLine::next, txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_move_eol(), txt_pop_last(), txt_pop_sel(), txt_undo_add_op(), txt_undo_add_toop(), UNDO_CDOWN, UNDO_CTO, UNDO_SDOWN, UNDO_STO, and undoing.
Referenced by move_cursor(), txt_do_redo(), txt_do_undo(), and txt_move_right().
| void txt_move_eof | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 963 of file text.c.
References ListBase::first, ListBase::last, Text::lines, txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and undoing.
Referenced by move_cursor(), and write_text().
| void txt_move_eol | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 928 of file text.c.
References ListBase::first, Text::lines, txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and undoing.
Referenced by move_cursor(), and txt_move_down().
| void txt_move_left | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 799 of file text.c.
References txt_curs_cur(), txt_curs_sel(), txt_move_up(), txt_pop_first(), txt_pop_sel(), txt_undo_add_op(), UNDO_CLEFT, UNDO_SLEFT, and undoing.
Referenced by confirm_suggestion(), move_cursor(), txt_do_redo(), txt_do_undo(), and txt_jump_left().
| void txt_move_right | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 824 of file text.c.
References txt_curs_cur(), txt_curs_sel(), txt_move_down(), txt_pop_last(), txt_pop_sel(), txt_undo_add_op(), UNDO_CRIGHT, UNDO_SRIGHT, and undoing.
Referenced by confirm_suggestion(), move_cursor(), txt_do_redo(), txt_do_undo(), and txt_jump_right().
| void txt_move_to | ( | struct Text * | text, |
| unsigned int | line, | ||
| unsigned int | ch, | ||
| short | sel | ||
| ) |
Definition at line 986 of file text.c.
References ListBase::first, i, Text::lines, TextLine::next, txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and undoing.
Referenced by do_textmarkers(), next_marker_exec(), previous_marker_exec(), python_script_error_jump_text(), txt_find_string(), and txt_move_toline().
| void txt_move_toline | ( | struct Text * | text, |
| unsigned int | line, | ||
| short | sel | ||
| ) |
Definition at line 981 of file text.c.
References txt_move_to().
Referenced by find_and_replace(), jump_exec(), line_number_invoke(), txt_do_redo(), and txt_do_undo().
| void txt_move_up | ( | struct Text * | text, |
| short | sel | ||
| ) |
Definition at line 748 of file text.c.
References ListBase::first, TextLine::len, Text::lines, TextLine::prev, txt_curs_cur(), txt_curs_sel(), txt_get_span(), txt_move_bol(), txt_pop_first(), txt_pop_sel(), txt_undo_add_op(), txt_undo_add_toop(), UNDO_CTO, UNDO_CUP, UNDO_STO, UNDO_SUP, and undoing.
Referenced by move_cursor(), txt_do_redo(), txt_do_undo(), and txt_move_left().
| struct TextMarker* txt_next_marker | ( | struct Text * | text, |
| struct TextMarker * | marker | ||
| ) | [read] |
Definition at line 2918 of file text.c.
References ListBase::first, TextMarker::group, Text::markers, TextMarker::next, and NULL.
Referenced by do_textmarkers().
| struct TextMarker* txt_next_marker_color | ( | struct Text * | text, |
| struct TextMarker * | marker | ||
| ) | [read] |
| void txt_order_cursors | ( | struct Text * | text | ) |
Definition at line 1074 of file text.c.
References Text::curc, Text::curl, Text::selc, Text::sell, txt_curs_swap(), and txt_get_span().
Referenced by comment_exec(), indent_exec(), txt_delete_sel(), txt_find_string(), uncomment_exec(), and unindent_exec().
| void txt_pop_sel | ( | struct Text * | text | ) |
Definition at line 1068 of file text.c.
References Text::curc, Text::curl, Text::selc, and Text::sell.
Referenced by cursor_skip(), set_cursor_to_pos(), txt_add_char_intern(), txt_backspace_char(), txt_delete_char(), txt_do_redo(), txt_do_undo(), txt_move_bof(), txt_move_bol(), txt_move_down(), txt_move_eof(), txt_move_eol(), txt_move_left(), txt_move_right(), txt_move_to(), txt_move_up(), txt_pop_first(), txt_pop_last(), txt_replace_char(), txt_split_curline(), wrap_move_bol(), wrap_move_down(), wrap_move_eol(), and wrap_move_up().
| struct TextMarker* txt_prev_marker | ( | struct Text * | text, |
| struct TextMarker * | marker | ||
| ) | [read] |
Definition at line 2905 of file text.c.
References TextMarker::group, ListBase::last, Text::markers, NULL, and TextMarker::prev.
| struct TextMarker* txt_prev_marker_color | ( | struct Text * | text, |
| struct TextMarker * | marker | ||
| ) | [read] |
| void txt_print_undo | ( | struct Text * | text | ) |
Definition at line 1461 of file text.c.
References dump_buffer(), i, UNDO_BS, Text::undo_buf, UNDO_CDOWN, UNDO_CLEFT, UNDO_COMMENT, UNDO_CRIGHT, UNDO_CTO, UNDO_CUP, UNDO_DBLOCK, UNDO_DEL, UNDO_IBLOCK, UNDO_INDENT, UNDO_INSERT, Text::undo_pos, UNDO_SDOWN, UNDO_SLEFT, UNDO_SRIGHT, UNDO_STO, UNDO_SUP, UNDO_SWAP, UNDO_UNCOMMENT, and UNDO_UNINDENT.
| int txt_replace_char | ( | struct Text * | text, |
| char | add | ||
| ) |
Definition at line 2477 of file text.c.
References Text::curc, Text::curl, TextMarker::end, i, TextLine::len, TextLine::line, txt_add_char(), txt_clean_text(), txt_find_marker(), txt_has_sel(), txt_make_dirty(), txt_pop_sel(), txt_undo_add_charop(), UNDO_DEL, UNDO_INSERT, and undoing.
Referenced by do_textmarkers(), do_texttools(), and insert_exec().
| void txt_sel_all | ( | struct Text * | text | ) |
Definition at line 1153 of file text.c.
References Text::curc, Text::curl, ListBase::first, ListBase::last, TextLine::len, Text::lines, Text::selc, and Text::sell.
Referenced by clear_text(), and select_all_exec().
| void txt_sel_line | ( | struct Text * | text | ) |
Definition at line 1164 of file text.c.
References Text::curc, Text::curl, TextLine::len, Text::selc, and Text::sell.
Referenced by select_line_exec().
| char* txt_sel_to_buf | ( | struct Text * | text | ) |
Definition at line 1279 of file text.c.
References BLI_strncpy(), Text::curc, Text::curl, TextLine::len, length(), TextLine::line, MEM_mallocN(), TextLine::next, NULL, Text::selc, Text::sell, and txt_get_span().
Referenced by find_and_replace(), find_set_selected_exec(), replace_set_selected_exec(), set_cursor_exit(), and txt_delete_sel().
| void txt_set_undostate | ( | int | u | ) |
Definition at line 144 of file text.c.
References undoing.
Referenced by clear_text(), and write_text().
| void txt_split_curline | ( | struct Text * | text | ) |
Definition at line 2141 of file text.c.
References BLI_insertlinkbefore(), Text::curc, Text::curl, TextMarker::end, ListBase::first, TextLine::format, left, TextLine::len, TextLine::line, TextMarker::lineno, Text::lines, Text::markers, MEM_freeN(), MEM_mallocN(), TextMarker::next, NULL, TextMarker::start, txt_clean_text(), txt_delete_sel(), txt_get_span(), txt_make_dirty(), txt_pop_sel(), txt_undo_add_charop(), UNDO_INSERT, and undoing.
Referenced by line_break_exec(), txt_add_char_intern(), and txt_insert_buf().
| char* txt_to_buf | ( | struct Text * | text | ) |
Definition at line 1178 of file text.c.
References BLI_strncpy(), Text::curl, ListBase::first, ListBase::last, TextLine::len, length(), TextLine::line, Text::lines, MEM_mallocN(), TextLine::next, NULL, and Text::sell.
Referenced by BL_ConvertActuators(), BL_ConvertControllers(), bpy_text_import(), bpy_text_reimport(), KX_Dome::KX_Dome(), and python_script_exec().
| void txt_uncomment | ( | struct Text * | text | ) |
Definition at line 2682 of file text.c.
References Text::curc, Text::curl, ListBase::first, i, TextLine::len, TextLine::line, Text::lines, TextLine::next, TextLine::prev, Text::selc, Text::sell, TRUE, txt_clean_text(), txt_get_span(), txt_make_dirty(), txt_undo_add_toop(), UNDO_UNCOMMENT, and undoing.
Referenced by txt_do_redo(), txt_do_undo(), and uncomment_exec().
| void txt_undo_add_toop | ( | struct Text * | text, |
| int | op, | ||
| unsigned int | froml, | ||
| unsigned short | fromc, | ||
| unsigned int | tol, | ||
| unsigned short | toc | ||
| ) |
Definition at line 1646 of file text.c.
References max_undo_test(), Text::undo_buf, and Text::undo_pos.
Referenced by cursor_skip(), set_cursor_exec(), set_cursor_exit(), txt_comment(), txt_indent(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_down(), txt_move_eof(), txt_move_eol(), txt_move_to(), txt_move_up(), txt_pop_first(), txt_pop_last(), txt_uncomment(), txt_unindent(), wrap_move_bol(), wrap_move_down(), wrap_move_eol(), and wrap_move_up().
| void txt_unindent | ( | struct Text * | text | ) |
Definition at line 2572 of file text.c.
References BLI_strncasecmp(), Text::curc, Text::curl, ListBase::first, Text::flags, i, TextLine::len, TextLine::line, Text::lines, TextLine::next, TextLine::prev, Text::selc, Text::sell, tab_to_spaces, TRUE, txt_clean_text(), txt_get_span(), txt_make_dirty(), TXT_TABSIZE, TXT_TABSTOSPACES, txt_undo_add_toop(), UNDO_UNINDENT, and undoing.
Referenced by txt_do_redo(), txt_do_undo(), and unindent_exec().
Definition at line 481 of file text.c.
References bScreen::areabase, bPose::chanbase, CONSTRAINT_TYPE_PYTHON, bPoseChannel::constraints, Object::constraints, CONT_PYTHON, Object::controllers, DAG_id_tag_update(), bConstraint::data, bController::data, RenderData::dometext, ListBase::first, bScreen::id, Text::id, Object::id, Scene::id, bController::next, bConstraint::next, SpaceLink::next, ID::next, ScrArea::next, bPoseChannel::next, NULL, OB_ARMATURE, OB_RECALC_DATA, Main::object, Object::pose, Scene::r, Main::scene, Main::screen, SPACE_TEXT, ScrArea::spacedata, SpaceLink::spacetype, bPythonCont::text, bPythonConstraint::text, SpaceText::text, SpaceText::top, bController::type, bConstraint::type, Object::type, and ID::us.
Referenced by id_unlink(), and unlink_exec().
| void write_text | ( | struct Text * | text, |
| const char * | str | ||
| ) |
Definition at line 572 of file text.c.
References txt_get_undostate(), txt_insert_buf(), txt_make_dirty(), txt_move_eof(), and txt_set_undostate().
Referenced by reports_to_text_exec().