Blender V2.61 - r43446
|
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 010 |
#define | UNDO_CTO 011 |
#define | UNDO_STO 012 |
#define | UNDO_INSERT_1 013 |
#define | UNDO_INSERT_2 014 |
#define | UNDO_INSERT_3 015 |
#define | UNDO_INSERT_4 016 |
#define | UNDO_BS_1 017 |
#define | UNDO_BS_2 020 |
#define | UNDO_BS_3 021 |
#define | UNDO_BS_4 022 |
#define | UNDO_DEL_1 023 |
#define | UNDO_DEL_2 024 |
#define | UNDO_DEL_3 025 |
#define | UNDO_DEL_4 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 | txt_extended_ascii_as_utf8 (char **str) |
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, const char *findstr, int wrap, int match_case) |
int | txt_has_sel (struct Text *text) |
int | txt_get_span (struct TextLine *from, struct TextLine *to) |
int | txt_utf8_offset_to_index (char *str, int offset) |
int | txt_utf8_index_to_offset (char *str, int index) |
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, unsigned int add) |
int | txt_add_raw_char (struct Text *text, unsigned int add) |
int | txt_replace_char (struct Text *text, unsigned int 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 178 of file BKE_text.h.
Referenced by do_textmarkers(), rna_def_text_marker(), text_find_and_replace(), txt_backspace_char(), and txt_delete_char().
#define TMARK_TEMP 0x01 |
Definition at line 177 of file BKE_text.h.
Referenced by do_textmarkers(), rna_def_text_marker(), txt_backspace_char(), and txt_delete_char().
#define UNDO_BS_1 017 |
Definition at line 151 of file BKE_text.h.
Referenced by txt_backspace_char(), txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_BS_2 020 |
Definition at line 152 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_BS_3 021 |
Definition at line 153 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_BS_4 022 |
Definition at line 154 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_CDOWN 004 |
Definition at line 127 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 124 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 173 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 125 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_right(), and txt_print_undo().
#define UNDO_CTO 011 |
Definition at line 138 of file BKE_text.h.
Referenced by cursor_skip(), text_cursor_set_exec(), txt_do_redo(), txt_do_undo(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_eof(), txt_move_eol(), txt_move_to(), txt_print_undo(), txt_wrap_move_bol(), txt_wrap_move_down(), txt_wrap_move_eol(), and txt_wrap_move_up().
#define UNDO_CUP 003 |
Definition at line 126 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 165 of file BKE_text.h.
Referenced by txt_delete_sel(), txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_DEL_1 023 |
Definition at line 156 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_DEL_2 024 |
Definition at line 157 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_DEL_3 025 |
Definition at line 158 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_DEL_4 026 |
Definition at line 159 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_IBLOCK 030 |
Definition at line 166 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 171 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_indent(), and txt_print_undo().
#define UNDO_INSERT_1 013 |
Definition at line 146 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_INSERT_2 014 |
Definition at line 147 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_INSERT_3 015 |
Definition at line 148 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_INSERT_4 016 |
Definition at line 149 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), and txt_print_undo().
#define UNDO_SDOWN 010 |
Definition at line 133 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 130 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 131 of file BKE_text.h.
Referenced by txt_do_redo(), txt_do_undo(), txt_move_right(), and txt_print_undo().
#define UNDO_STO 012 |
Definition at line 139 of file BKE_text.h.
Referenced by cursor_skip(), text_cursor_set_exit(), txt_do_redo(), txt_do_undo(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_eof(), txt_move_eol(), txt_move_to(), txt_pop_first(), txt_pop_last(), txt_print_undo(), txt_wrap_move_bol(), txt_wrap_move_down(), txt_wrap_move_eol(), and txt_wrap_move_up().
#define UNDO_SUP 007 |
Definition at line 132 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 169 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 174 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 172 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 179 of file text.c.
References alloc_libblock(), BLI_addhead(), Text::curc, Text::curl, ListBase::first, UserDef::flag, Text::flags, TextLine::format, G, Text::id, ID_TXT, init_undo_text(), ListBase::last, TextLine::len, TextLine::line, Text::lines, 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, U, ID::us, and USER_TXT_TABSTOSPACES_DISABLE.
Referenced by reports_to_text_exec(), and text_new_exec().
struct Text* add_text | ( | const char * | file, |
const char * | relpath | ||
) | [read] |
Definition at line 372 of file text.c.
References alloc_libblock(), BLI_addtail(), BLI_path_abs(), BLI_path_basename(), BLI_strncpy(), cleanup_textline(), Text::curc, Text::curl, FILE_MAX, ListBase::first, UserDef::flag, Text::flags, TextLine::format, G, i, Text::id, ID_TXT, init_undo_text(), L, ListBase::last, TextLine::len, len(), TextLine::line, Text::lines, Text::markers, MEM_freeN(), MEM_mallocN(), Text::mtime, Text::name, Text::nlines, NULL, Text::selc, Text::sell, str, strlen(), Main::text, TXT_TABSTOSPACES, U, ID::us, and USER_TXT_TABSTOSPACES_DISABLE.
Referenced by main(), and text_open_exec().
void clear_text | ( | struct Text * | text | ) |
Definition at line 592 of file text.c.
References txt_delete_sel(), txt_get_undostate(), txt_make_dirty(), txt_sel_all(), and txt_set_undostate().
Definition at line 472 of file text.c.
References BLI_addtail(), copy_libblock(), Text::curc, Text::curl, ListBase::first, Text::flags, TextLine::format, Text::id, 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, strlen(), KDL::tan(), and TXT_ISDIRTY.
Referenced by id_copy().
void free_text | ( | struct Text * | text | ) |
Definition at line 159 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 277 of file text.c.
References BLI_addtail(), BLI_freelistN(), BLI_path_abs(), BLI_strncpy(), cleanup_textline(), Text::curc, Text::curl, FILE_MAX, ListBase::first, TextLine::format, G, i, init_undo_text(), L, ListBase::last, TextLine::len, len(), TextLine::line, Text::lines, MEM_freeN(), MEM_mallocN(), Text::mtime, Text::name, TextLine::next, Text::nlines, NULL, Text::selc, Text::sell, str, Text::undo_buf, and Text::undo_pos.
Referenced by text_reload_exec().
int setcurr_tab_spaces | ( | struct Text * | text, |
int | space | ||
) |
Definition at line 2961 of file text.c.
References Text::curc, Text::curl, Text::flags, i, TextLine::line, NULL, rna_array::test, and TXT_TABSTOSPACES.
Referenced by text_line_break_exec().
int text_check_bracket | ( | char | ch | ) |
Definition at line 3171 of file text.c.
Referenced by draw_brackets().
int text_check_delim | ( | char | ch | ) |
Definition at line 3186 of file text.c.
Referenced by console_move_exec(), and txt_format_line().
int text_check_digit | ( | char | ch | ) |
Definition at line 3198 of file text.c.
Referenced by txt_format_line().
int text_check_identifier | ( | char | ch | ) |
Definition at line 3205 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 3216 of file text.c.
Referenced by console_move_exec(), and do_texttools().
int txt_add_char | ( | struct Text * | text, |
unsigned int | add | ||
) |
Definition at line 2677 of file text.c.
References Text::flags, txt_add_char_intern(), and TXT_TABSTOSPACES.
Referenced by do_textmarkers(), do_texttools(), text_indent_exec(), text_insert_exec(), text_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 3025 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 text_find_and_replace().
int txt_add_raw_char | ( | struct Text * | text, |
unsigned int | add | ||
) |
Definition at line 2682 of file text.c.
References txt_add_char_intern().
Referenced by txt_insert_buf().
void txt_backspace_char | ( | struct Text * | text | ) |
Definition at line 2544 of file text.c.
References BLI_freelinkN(), BLI_str_prev_char_utf8(), BLI_str_utf8_as_unicode_and_size(), Text::curc, Text::curl, TextMarker::end, TextMarker::flags, TextMarker::group, TextLine::len, TextLine::line, TextMarker::lineno, Text::markers, TextMarker::next, TextLine::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_1, and undoing.
Referenced by do_textmarkers(), text_delete_exec(), txt_do_redo(), and txt_do_undo().
void txt_backspace_word | ( | struct Text * | text | ) |
Definition at line 2603 of file text.c.
References txt_delete_sel(), and txt_jump_left().
Referenced by text_delete_exec().
void txt_clean_text | ( | struct Text * | text | ) |
Definition at line 665 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 3076 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 3102 of file text.c.
References BLI_freelinkN(), ListBase::first, TextMarker::flags, TextMarker::group, Text::markers, TextMarker::next, and next.
Referenced by do_textmarkers(), text_clear_all_markers_exec(), text_find_and_replace(), txt_backspace_char(), and txt_delete_char().
void txt_comment | ( | struct Text * | text | ) |
Definition at line 2860 of file text.c.
References add(), Text::curc, Text::curl, ListBase::first, TextLine::len, 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 text_comment_exec(), txt_do_redo(), and txt_do_undo().
void txt_delete_char | ( | struct Text * | text | ) |
Definition at line 2485 of file text.c.
References BLI_freelinkN(), BLI_str_utf8_as_unicode_and_size(), Text::curc, Text::curl, TextMarker::end, TextMarker::flags, TextMarker::group, TextLine::len, TextLine::line, TextMarker::lineno, Text::markers, TextMarker::next, TextLine::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_1, and undoing.
Referenced by do_textmarkers(), text_delete_exec(), and txt_do_redo().
void txt_delete_selected | ( | struct Text * | text | ) |
Definition at line 2687 of file text.c.
References txt_delete_sel(), and txt_make_dirty().
Referenced by text_cut_exec().
void txt_delete_word | ( | struct Text * | text | ) |
Definition at line 2538 of file text.c.
References txt_delete_sel(), and txt_jump_right().
Referenced by text_delete_exec().
void txt_do_redo | ( | struct Text * | text | ) |
Definition at line 2175 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_redo_read_uint16(), txt_redo_read_uint32(), txt_redo_read_unicode(), txt_uncomment(), txt_unindent(), UNDO_BS_1, UNDO_BS_2, UNDO_BS_3, UNDO_BS_4, Text::undo_buf, UNDO_CDOWN, UNDO_CLEFT, UNDO_COMMENT, UNDO_CRIGHT, UNDO_CTO, UNDO_CUP, UNDO_DBLOCK, UNDO_DEL_1, UNDO_DEL_2, UNDO_DEL_3, UNDO_DEL_4, UNDO_IBLOCK, UNDO_INDENT, UNDO_INSERT_1, UNDO_INSERT_2, UNDO_INSERT_3, UNDO_INSERT_4, 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 1952 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_undo_read_uint16(), txt_undo_read_uint32(), txt_undo_read_unicode(), txt_unindent(), txt_utf8_len(), UNDO_BS_1, UNDO_BS_2, UNDO_BS_3, UNDO_BS_4, Text::undo_buf, UNDO_CDOWN, UNDO_CLEFT, UNDO_COMMENT, UNDO_CRIGHT, UNDO_CTO, UNDO_CUP, UNDO_DBLOCK, UNDO_DEL_1, UNDO_DEL_2, UNDO_DEL_3, UNDO_DEL_4, UNDO_IBLOCK, UNDO_INDENT, UNDO_INSERT_1, UNDO_INSERT_2, UNDO_INSERT_3, UNDO_INSERT_4, 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 | ) |
int txt_extended_ascii_as_utf8 | ( | char ** | str | ) |
Definition at line 222 of file text.c.
References BLI_str_utf8_from_unicode(), BLI_utf8_invalid_byte(), i, length(), MEM_freeN(), MEM_mallocN(), and strlen().
Referenced by cleanup_textline(), do_versions(), and txt_insert_buf().
struct TextMarker* txt_find_marker | ( | struct Text * | text, |
struct TextLine * | line, | ||
int | curs, | ||
int | group, | ||
int | flags | ||
) | [read] |
Definition at line 3121 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(), text_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 3053 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, |
const char * | findstr, | ||
int | wrap, | ||
int | match_case | ||
) |
Definition at line 1354 of file text.c.
References BLI_strcasestr(), Text::curl, ListBase::first, TextLine::line, Text::lines, TextLine::next, NULL, Text::selc, Text::sell, strlen(), txt_get_span(), txt_move_to(), and txt_order_cursors().
Referenced by text_find_and_replace().
Definition at line 696 of file text.c.
References TextLine::next, and TextLine::prev.
Referenced by cursor_skip(), do_textmarkers(), draw_brackets(), draw_cursor(), draw_markers(), text_cursor_set_exec(), text_cursor_set_exit(), text_cursor_set_to_pos(), text_get_span_wrap(), text_jump_exec(), text_next_marker_exec(), text_previous_marker_exec(), text_scroll_to_cursor(), text_set_selection_invoke(), 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_eof(), txt_move_eol(), txt_move_to(), txt_order_cursors(), txt_pop_first(), txt_pop_last(), txt_sel_to_buf(), txt_split_curline(), txt_uncomment(), txt_unindent(), txt_wrap_move_bol(), txt_wrap_move_down(), txt_wrap_move_eol(), and txt_wrap_move_up().
int txt_get_undostate | ( | void | ) |
Definition at line 147 of file text.c.
References undoing.
Referenced by clear_text(), and write_text().
int txt_has_sel | ( | struct Text * | text | ) |
Definition at line 1199 of file text.c.
References Text::curc, Text::curl, Text::selc, and Text::sell.
Referenced by text_comment_exec(), text_cursor_set_exit(), text_find_and_replace(), text_indent_exec(), text_uncomment_exec(), text_unindent_exec(), txt_backspace_char(), txt_copy_selected(), txt_delete_char(), txt_delete_sel(), and txt_replace_char().
void txt_indent | ( | struct Text * | text | ) |
Definition at line 2739 of file text.c.
References add(), Text::curc, Text::curl, ListBase::first, Text::flags, TextLine::len, 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 text_indent_exec(), txt_do_redo(), and txt_do_undo().
void txt_insert_buf | ( | struct Text * | text, |
const char * | in_buffer | ||
) |
Definition at line 1479 of file text.c.
References add(), BLI_insertlinkbefore(), BLI_str_utf8_as_unicode_step(), BLI_strdupn(), Text::curl, ListBase::first, i, len(), Text::lines, MEM_freeN(), strlen(), txt_add_raw_char(), txt_delete_sel(), txt_extended_ascii_as_utf8(), txt_get_span(), txt_new_linen(), txt_shift_markers(), txt_split_curline(), txt_undo_add_block(), UNDO_IBLOCK, and undoing.
Referenced by confirm_suggestion(), text_find_and_replace(), text_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 955 of file text.c.
References BLI_str_prev_char_utf8(), BLI_str_utf8_as_unicode(), 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 text_move_cursor(), text_select_word_exec(), and txt_backspace_word().
void txt_jump_right | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 989 of file text.c.
References BLI_str_utf8_as_unicode(), 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 text_move_cursor(), text_select_word_exec(), and txt_delete_word().
void txt_move_bof | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 1057 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 text_move_cursor().
void txt_move_bol | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 1023 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 text_move_cursor(), and txt_move_up().
void txt_move_down | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 834 of file text.c.
References TextLine::len, TextLine::next, txt_curs_cur(), txt_curs_sel(), txt_move_eol(), txt_pop_last(), txt_pop_sel(), txt_undo_add_op(), txt_utf8_index_to_offset(), txt_utf8_len(), txt_utf8_offset_to_index(), UNDO_CDOWN, UNDO_SDOWN, and undoing.
Referenced by text_move_cursor(), txt_do_redo(), txt_do_undo(), and txt_move_right().
void txt_move_eof | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 1075 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 text_move_cursor(), and write_text().
void txt_move_eol | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 1040 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 text_move_cursor(), and txt_move_down().
void txt_move_left | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 860 of file text.c.
References BLI_str_prev_char_utf8(), Text::flags, i, txt_curs_cur(), txt_curs_sel(), txt_move_up(), txt_pop_first(), txt_pop_sel(), TXT_TABSIZE, TXT_TABSTOSPACES, txt_undo_add_op(), UNDO_CLEFT, UNDO_SLEFT, and undoing.
Referenced by confirm_suggestion(), text_move_cursor(), txt_do_redo(), txt_do_undo(), and txt_jump_left().
void txt_move_right | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 910 of file text.c.
References BLI_str_utf8_size(), Text::flags, i, txt_curs_cur(), txt_curs_sel(), txt_move_down(), txt_pop_last(), txt_pop_sel(), TXT_TABSIZE, TXT_TABSTOSPACES, txt_undo_add_op(), UNDO_CRIGHT, UNDO_SRIGHT, and undoing.
Referenced by confirm_suggestion(), text_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 1099 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(), python_script_error_jump_text(), text_next_marker_exec(), text_previous_marker_exec(), txt_find_string(), and txt_move_toline().
void txt_move_toline | ( | struct Text * | text, |
unsigned int | line, | ||
short | sel | ||
) |
Definition at line 1093 of file text.c.
References txt_move_to().
Referenced by text_find_and_replace(), text_jump_exec(), text_line_number_invoke(), txt_do_redo(), and txt_do_undo().
void txt_move_up | ( | struct Text * | text, |
short | sel | ||
) |
Definition at line 808 of file text.c.
References TextLine::len, TextLine::prev, txt_curs_cur(), txt_curs_sel(), txt_move_bol(), txt_pop_first(), txt_pop_sel(), txt_undo_add_op(), txt_utf8_index_to_offset(), txt_utf8_len(), txt_utf8_offset_to_index(), UNDO_CUP, UNDO_SUP, and undoing.
Referenced by text_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 3154 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 1187 of file text.c.
References Text::curc, Text::curl, Text::selc, Text::sell, txt_curs_swap(), and txt_get_span().
Referenced by text_comment_exec(), text_indent_exec(), text_uncomment_exec(), text_unindent_exec(), txt_delete_sel(), and txt_find_string().
void txt_pop_sel | ( | struct Text * | text | ) |
Definition at line 1181 of file text.c.
References Text::curc, Text::curl, Text::selc, and Text::sell.
Referenced by cursor_skip(), text_cursor_set_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(), txt_wrap_move_bol(), txt_wrap_move_down(), txt_wrap_move_eol(), and txt_wrap_move_up().
struct TextMarker* txt_prev_marker | ( | struct Text * | text, |
struct TextMarker * | marker | ||
) | [read] |
Definition at line 3140 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 1575 of file text.c.
References BLI_str_utf8_from_unicode(), BLI_UTF8_MAX, dump_buffer(), i, UNDO_BS_1, UNDO_BS_2, UNDO_BS_3, UNDO_BS_4, Text::undo_buf, UNDO_CDOWN, UNDO_CLEFT, UNDO_COMMENT, UNDO_CRIGHT, UNDO_CTO, UNDO_CUP, UNDO_DBLOCK, UNDO_DEL_1, UNDO_DEL_2, UNDO_DEL_3, UNDO_DEL_4, UNDO_IBLOCK, UNDO_INDENT, UNDO_INSERT_1, UNDO_INSERT_2, UNDO_INSERT_3, UNDO_INSERT_4, 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, |
unsigned int | add | ||
) |
Definition at line 2693 of file text.c.
References BLI_freelinkN(), BLI_str_utf8_as_unicode_and_size(), BLI_str_utf8_from_unicode(), BLI_UTF8_MAX, Text::curc, Text::curl, i, TextLine::len, TextLine::line, Text::markers, MEM_freeN(), MEM_mallocN(), txt_add_char(), txt_clean_text(), txt_find_marker(), txt_has_sel(), txt_make_dirty(), txt_pop_sel(), txt_undo_add_charop(), UNDO_DEL_1, UNDO_INSERT_1, and undoing.
Referenced by do_textmarkers(), do_texttools(), and text_insert_exec().
void txt_sel_all | ( | struct Text * | text | ) |
Definition at line 1266 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 text_select_all_exec().
void txt_sel_line | ( | struct Text * | text | ) |
Definition at line 1277 of file text.c.
References Text::curc, Text::curl, TextLine::len, Text::selc, and Text::sell.
Referenced by text_select_line_exec().
char* txt_sel_to_buf | ( | struct Text * | text | ) |
Definition at line 1392 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 text_cursor_set_exit(), text_find_and_replace(), text_find_set_selected_exec(), text_replace_set_selected_exec(), and txt_delete_sel().
void txt_set_undostate | ( | int | u | ) |
Definition at line 142 of file text.c.
References undoing.
Referenced by clear_text(), and write_text().
void txt_split_curline | ( | struct Text * | text | ) |
Definition at line 2359 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_1, and undoing.
Referenced by text_line_break_exec(), txt_add_char_intern(), and txt_insert_buf().
char* txt_to_buf | ( | struct Text * | text | ) |
Definition at line 1291 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 2912 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 text_uncomment_exec(), txt_do_redo(), and txt_do_undo().
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 1806 of file text.c.
References max_undo_test(), txt_undo_store_uint16(), txt_undo_store_uint32(), Text::undo_buf, and Text::undo_pos.
Referenced by cursor_skip(), text_cursor_set_exec(), text_cursor_set_exit(), txt_comment(), txt_indent(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_eof(), txt_move_eol(), txt_move_to(), txt_pop_first(), txt_pop_last(), txt_uncomment(), txt_unindent(), txt_wrap_move_bol(), txt_wrap_move_down(), txt_wrap_move_eol(), and txt_wrap_move_up().
void txt_unindent | ( | struct Text * | text | ) |
Definition at line 2802 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 text_unindent_exec(), txt_do_redo(), and txt_do_undo().
int txt_utf8_index_to_offset | ( | char * | str, |
int | index | ||
) |
Definition at line 785 of file text.c.
References BLI_str_utf8_size().
Referenced by txt_move_down(), txt_move_up(), and txt_wrap_move_bol().
int txt_utf8_offset_to_index | ( | char * | str, |
int | offset | ||
) |
Definition at line 775 of file text.c.
References BLI_str_utf8_size().
Referenced by draw_brackets(), txt_move_down(), txt_move_up(), wrap_offset(), and wrap_offset_in_line().
Definition at line 520 of file text.c.
References bScreen::areabase, bPose::chanbase, CONSTRAINT_TYPE_PYTHON, Object::constraints, bPoseChannel::constraints, CONT_PYTHON, Object::controllers, DAG_id_tag_update(), bConstraint::data, data, bController::data, ListBase::first, Text::id, bScreen::id, Object::id, SpaceLink::next, ScrArea::next, bConstraint::next, bPoseChannel::next, bController::next, ID::next, NULL, OB_ARMATURE, OB_RECALC_DATA, Main::object, Object::pose, Main::screen, SPACE_TEXT, ScrArea::spacedata, SpaceLink::spacetype, SpaceText::text, bPythonConstraint::text, bPythonCont::text, SpaceText::top, bConstraint::type, Object::type, bController::type, update(), and ID::us.
Referenced by id_unlink(), and text_unlink_exec().
void write_text | ( | struct Text * | text, |
const char * | str | ||
) |
Definition at line 605 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().