|
Blender V5.0
|
Go to the source code of this file.
Enumerations | |
| enum | { TXT_MOVE_LINE_UP = -1 , TXT_MOVE_LINE_DOWN = 1 } |
Functions | |
| void | BKE_text_free_lines (struct Text *text) |
| struct Text * | BKE_text_add (struct Main *bmain, const char *name) |
| int | txt_extended_ascii_as_utf8 (char **str) |
| bool | BKE_text_reload (struct Text *text) |
| struct Text * | BKE_text_load_ex (struct Main *bmain, const char *filepath, const char *relbase, bool is_internal) ATTR_NONNULL(1 |
| struct Text struct Text * | BKE_text_load (struct Main *bmain, const char *filepath, const char *relbase) ATTR_NONNULL(1 |
| struct Text struct Text void | BKE_text_clear (struct Text *text) ATTR_NONNULL(1) |
| void | BKE_text_write (struct Text *text, const char *str, int str_len) ATTR_NONNULL(1 |
| void int | BKE_text_file_modified_check (const struct Text *text) |
| void | BKE_text_file_modified_ignore (struct Text *text) |
| char * | txt_to_buf (struct Text *text, size_t *r_buf_strlen) ATTR_NONNULL(1 |
| void | txt_clean_text (struct Text *text) |
| void | txt_order_cursors (struct Text *text, bool reverse) |
| bool | txt_find_string (struct Text *text, const char *findstr, int wrap, int match_case) |
| bool | txt_has_sel (const struct Text *text) |
| int | txt_get_span (const struct TextLine *from, const struct TextLine *to) |
| void | txt_move_up (struct Text *text, bool sel) |
| void | txt_move_down (struct Text *text, bool sel) |
| void | txt_move_left (struct Text *text, bool sel) |
| void | txt_move_right (struct Text *text, bool sel) |
| void | txt_jump_left (struct Text *text, bool sel, bool use_init_step) |
| void | txt_jump_right (struct Text *text, bool sel, bool use_init_step) |
| void | txt_move_bof (struct Text *text, bool sel) |
| void | txt_move_eof (struct Text *text, bool sel) |
| void | txt_move_bol (struct Text *text, bool sel) |
| void | txt_move_eol (struct Text *text, bool sel) |
| void | txt_move_toline (struct Text *text, unsigned int line, bool sel) |
| void | txt_move_to (struct Text *text, unsigned int line, unsigned int ch, bool 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_clear (struct Text *text) |
| void | txt_sel_line (struct Text *text) |
| void | txt_sel_set (struct Text *text, int startl, int startc, int endl, int endc) |
| char * | txt_sel_to_buf (const struct Text *text, size_t *r_buf_strlen) |
| void | txt_insert_buf (struct Text *text, const char *in_buffer, int in_buffer_len) ATTR_NONNULL(1 |
| void void | txt_split_curline (struct Text *text) |
| void | txt_backspace_char (struct Text *text) |
| void | txt_backspace_word (struct Text *text) |
| bool | txt_add_char (struct Text *text, unsigned int add) |
| bool | txt_add_raw_char (struct Text *text, unsigned int add) |
| bool | txt_replace_char (struct Text *text, unsigned int add) |
| bool | txt_unindent (struct Text *text) |
| void | txt_indent (struct Text *text) |
| void | txt_comment (struct Text *text, const char *prefix) |
| bool | txt_uncomment (struct Text *text, const char *prefix) |
| void | txt_move_lines (struct Text *text, int direction) |
| void | txt_duplicate_line (struct Text *text) |
| int | txt_setcurr_tab_spaces (struct Text *text, int space) |
| bool | txt_cursor_is_line_start (const struct Text *text) |
| bool | txt_cursor_is_line_end (const struct Text *text) |
| int | txt_calc_tab_left (const struct TextLine *tl, int ch) |
| int | txt_calc_tab_right (const struct TextLine *tl, int ch) |
| int | text_check_bracket (char ch) |
| bool | text_check_delim (char ch) |
| bool | text_check_digit (char ch) |
| bool | text_check_identifier (char ch) |
| bool | text_check_identifier_nodigit (char ch) |
| bool | text_check_whitespace (char ch) |
| int | text_find_identifier_start (const char *str, int i) |
| char * | txt_to_buf_for_undo (struct Text *text, size_t *r_buf_len) ATTR_NONNULL(1 |
| void | txt_from_buf_for_undo (struct Text *text, const char *buf, size_t buf_len) ATTR_NONNULL(1 |
Character Classification | |
Defined in bpy_interface.cc (not ideal). | |
| int | text_check_identifier_unicode (unsigned int ch) |
| int | text_check_identifier_nodigit_unicode (unsigned int ch) |
Variables | |
| char ATTR_WARN_UNUSED_RESULT | ATTR_RETURNS_NONNULL |
| anonymous enum |
| Enumerator | |
|---|---|
| TXT_MOVE_LINE_UP | |
| TXT_MOVE_LINE_DOWN | |
Definition at line 141 of file BKE_text.h.
Definition at line 281 of file text.cc.
References BKE_id_new(), Text::id, id_fake_user_set(), id_us_min(), and name.
Referenced by text_new_exec().
Definition at line 511 of file text.cc.
References txt_delete_sel(), txt_make_dirty(), and txt_sel_all().
| void int BKE_text_file_modified_check | ( | const struct Text * | text | ) |
Referenced by text_resolve_conflict_invoke().
| void BKE_text_file_modified_ignore | ( | struct Text * | text | ) |
Definition at line 559 of file text.cc.
References BLI_exists(), BLI_path_abs(), BLI_stat(), FILE_MAX, Text::filepath, Text::id, ID_BLEND_PATH_FROM_GLOBAL, Text::mtime, result, and STRNCPY().
Referenced by text_resolve_conflict_exec().
| void BKE_text_free_lines | ( | struct Text * | text | ) |
Definition at line 264 of file text.cc.
References BLI_listbase_clear(), Text::curl, ListBase::first, Text::lines, MEM_freeN(), and Text::sell.
Referenced by BKE_text_reload(), and text_free_data().
| struct Text struct Text * BKE_text_load | ( | struct Main * | bmain, |
| const char * | filepath, | ||
| const char * | relbase ) |
Load a text file.
Referenced by Freestyle::PythonInterpreter::interpretFile(), and text_jump_to_file_at_point_internal().
| struct Text * BKE_text_load_ex | ( | struct Main * | bmain, |
| const char * | filepath, | ||
| const char * | relbase, | ||
| bool | is_internal ) |
Load a text file.
| is_internal | If true, this text data-block only exists in memory, not as a file on disk. |
Referenced by text_open_exec().
| bool BKE_text_reload | ( | struct Text * | text | ) |
Definition at line 415 of file text.cc.
References BKE_text_free_lines(), BLI_file_read_text_as_mem(), BLI_path_abs(), BLI_stat(), FILE_MAX, Text::filepath, Text::id, ID_BLEND_PATH_FROM_GLOBAL, MEM_freeN(), Text::mtime, STRNCPY(), text_from_buf(), and txt_make_dirty().
Referenced by text_blend_read_data(), and text_reload_exec().
| int text_check_bracket | ( | char | ch | ) |
Utility functions, could be moved somewhere more generic but are python/text related.
Definition at line 2273 of file text.cc.
Referenced by draw_brackets(), and txt_calc_tab_right().
| bool text_check_delim | ( | char | ch | ) |
Definition at line 2290 of file text.cc.
Referenced by txt_calc_tab_right(), txtfmt_glsl_format_line(), txtfmt_osl_format_line(), txtfmt_pov_format_line(), txtfmt_pov_ini_format_line(), and txtfmt_py_format_line().
| bool text_check_digit | ( | char | ch | ) |
Definition at line 2306 of file text.cc.
Referenced by txt_calc_tab_right(), txtfmt_glsl_format_line(), txtfmt_osl_format_line(), txtfmt_pov_format_line(), txtfmt_pov_ini_format_line(), txtfmt_py_find_numeral_inner(), and txtfmt_py_literal_numeral().
| bool text_check_identifier | ( | char | ch | ) |
Definition at line 2317 of file text.cc.
Referenced by text_check_identifier_unicode(), text_check_identifier_unicode(), text_find_identifier_start(), txt_calc_tab_right(), txtfmt_glsl_find_builtinfunc(), txtfmt_glsl_find_preprocessor(), txtfmt_glsl_find_reserved(), txtfmt_glsl_find_specialvar(), txtfmt_ini_find_bool(), txtfmt_ini_find_keyword(), txtfmt_ini_find_reserved(), txtfmt_osl_find_builtinfunc(), txtfmt_osl_find_preprocessor(), txtfmt_osl_find_reserved(), txtfmt_osl_find_specialvar(), txtfmt_pov_find_bool(), txtfmt_pov_find_keyword(), txtfmt_pov_find_reserved_builtins(), txtfmt_pov_find_reserved_keywords(), txtfmt_pov_find_specialvar(), txtfmt_py_find_bool(), txtfmt_py_find_builtinfunc(), txtfmt_py_find_decorator(), and txtfmt_py_find_specialvar().
| bool text_check_identifier_nodigit | ( | char | ch | ) |
Definition at line 2340 of file text.cc.
Referenced by text_check_identifier_nodigit_unicode(), text_check_identifier_nodigit_unicode(), and txt_calc_tab_right().
|
extern |
Definition at line 2366 of file text.cc.
References text_check_identifier_nodigit(), and text_check_identifier_nodigit().
Referenced by text_autocomplete_build(), and txt_calc_tab_right().
|
extern |
Definition at line 2361 of file text.cc.
References text_check_identifier(), and text_check_identifier().
Referenced by text_autocomplete_build(), and txt_calc_tab_right().
| bool text_check_whitespace | ( | char | ch | ) |
Definition at line 2372 of file text.cc.
References ELEM.
Referenced by text_autocomplete_modal(), txt_calc_tab_right(), txtfmt_glsl_find_preprocessor(), txtfmt_osl_find_preprocessor(), and txtfmt_py_find_decorator().
| int text_find_identifier_start | ( | const char * | str, |
| int | i ) |
Definition at line 2380 of file text.cc.
References i, str, text_check_identifier(), and UNLIKELY.
Referenced by confirm_suggestion(), draw_suggestion_list(), get_suggest_prefix(), text_autocomplete_build(), and txt_calc_tab_right().
Definition at line 1918 of file text.cc.
References add(), Text::flags, txt_add_char_intern(), and TXT_TABSTOSPACES.
Referenced by text_indent_exec(), text_insert_exec(), text_insert_invoke(), text_line_break_exec(), txt_insert_buf(), and txt_replace_char().
Definition at line 1923 of file text.cc.
References add(), and txt_add_char_intern().
Referenced by txt_insert_buf(), and txt_insert_buf().
| void txt_backspace_char | ( | struct Text * | text | ) |
Definition at line 1811 of file text.cc.
References BLI_str_cursor_step_prev_utf8(), Text::curc, Text::curl, TextLine::len, TextLine::line, TextLine::next, pos, TextLine::prev, txt_clean_text(), txt_combine_lines(), txt_delete_sel(), txt_has_sel(), txt_make_dirty(), and txt_pop_sel().
Referenced by text_delete_exec(), and txt_insert_buf().
| void txt_backspace_word | ( | struct Text * | text | ) |
Definition at line 1853 of file text.cc.
References txt_delete_sel(), txt_jump_left(), and txt_make_dirty().
Referenced by text_delete_exec(), and txt_insert_buf().
| int txt_calc_tab_left | ( | const struct TextLine * | tl, |
| int | ch ) |
References txt_calc_tab_left().
Referenced by text_delete_exec(), and txt_calc_tab_left().
| int txt_calc_tab_right | ( | const struct TextLine * | tl, |
| int | ch ) |
References i, str, text_check_bracket(), text_check_delim(), text_check_digit(), text_check_identifier(), text_check_identifier_nodigit(), text_check_identifier_nodigit_unicode(), text_check_identifier_unicode(), text_check_whitespace(), text_find_identifier_start(), and txt_calc_tab_right().
Referenced by text_delete_exec(), and txt_calc_tab_right().
| void txt_clean_text | ( | struct Text * | text | ) |
Definition at line 634 of file text.cc.
References Text::curc, Text::curl, ListBase::first, ListBase::last, Text::lines, TextLine::next, Text::selc, Text::sell, top, and txt_new_line().
Referenced by draw_text_main(), txt_add_char_intern(), txt_backspace_char(), txt_combine_lines(), txt_delete_char(), txt_delete_line(), txt_duplicate_line(), txt_move_lines(), txt_replace_char(), txt_select_prefix(), txt_select_unprefix(), and txt_split_curline().
| void txt_comment | ( | struct Text * | text, |
| const char * | prefix ) |
Definition at line 2138 of file text.cc.
References Text::curl, ELEM, Text::sell, txt_has_sel(), and txt_select_prefix().
Referenced by text_comment_exec(), and txt_insert_buf().
| bool txt_cursor_is_line_end | ( | const struct Text * | text | ) |
References txt_cursor_is_line_end().
Referenced by text_delete_exec(), text_move_cursor(), and txt_cursor_is_line_end().
| bool txt_cursor_is_line_start | ( | const struct Text * | text | ) |
References txt_cursor_is_line_start().
Referenced by text_delete_exec(), text_move_cursor(), and txt_cursor_is_line_start().
| void txt_delete_char | ( | struct Text * | text | ) |
Definition at line 1766 of file text.cc.
References BLI_str_cursor_step_next_utf8(), Text::curc, Text::curl, TextLine::len, TextLine::line, TextLine::next, pos, txt_clean_text(), txt_combine_lines(), txt_delete_sel(), txt_has_sel(), txt_make_dirty(), and txt_pop_sel().
Referenced by text_delete_exec(), and txt_get_span().
| void txt_delete_selected | ( | struct Text * | text | ) |
Definition at line 1928 of file text.cc.
References txt_delete_sel(), and txt_make_dirty().
Referenced by text_cut_exec(), and txt_get_span().
| void txt_delete_word | ( | struct Text * | text | ) |
Definition at line 1804 of file text.cc.
References txt_delete_sel(), txt_jump_right(), and txt_make_dirty().
Referenced by text_delete_exec(), and txt_get_span().
| void txt_duplicate_line | ( | struct Text * | text | ) |
Definition at line 1749 of file text.cc.
References BLI_insertlinkafter(), Text::curl, TextLine::line, Text::lines, Text::sell, txt_clean_text(), txt_make_dirty(), and txt_new_line().
Referenced by text_duplicate_line_exec(), and txt_insert_buf().
| int txt_extended_ascii_as_utf8 | ( | char ** | str | ) |
Use to a valid UTF8 sequences. this function replaces extended ASCII characters.
Definition at line 294 of file text.cc.
References BLI_str_utf8_from_unicode(), BLI_str_utf8_invalid_byte(), i, length(), MEM_freeN(), MEM_malloc_arrayN(), and str.
Referenced by blo_do_versions_260(), cleanup_textline(), and txt_insert_buf().
| bool txt_find_string | ( | struct Text * | text, |
| const char * | findstr, | ||
| int | wrap, | ||
| int | match_case ) |
Definition at line 1595 of file text.cc.
References BLI_strcasestr(), Text::curl, ListBase::first, TextLine::line, Text::lines, TextLine::next, Text::selc, Text::sell, txt_get_span(), txt_move_to(), txt_order_cursors(), and wrap().
Referenced by text_find_and_replace(), and text_replace_all().
| void txt_from_buf_for_undo | ( | struct Text * | text, |
| const char * | buf, | ||
| size_t | buf_len ) |
Decode a buffer from txt_to_buf_for_undo.
References ATTR_NONNULL, and txt_from_buf_for_undo().
Referenced by text_state_decode(), and txt_from_buf_for_undo().
References txt_delete_char(), txt_delete_selected(), txt_delete_word(), txt_get_span(), 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_to(), txt_move_toline(), txt_move_up(), txt_pop_sel(), txt_sel_all(), txt_sel_clear(), txt_sel_line(), and txt_sel_set().
Referenced by draw_brackets(), draw_suggestion_list(), draw_text_decoration(), ED_space_text_scroll_to_cursor(), space_text_get_span_wrap(), text_cursor_set_to_pos(), text_jump_exec(), text_selection_set_invoke(), text_span_is_blank(), text_state_encode(), and txt_get_span().
| bool txt_has_sel | ( | const struct Text * | text | ) |
References txt_has_sel().
Referenced by bpy_rna_region_as_string(), text_comment_exec(), text_delete_exec(), text_find_and_replace(), text_indent_exec(), text_indent_or_autocomplete_exec(), text_insert_invoke(), text_move_cursor(), text_replace_all(), text_select_update_primary_clipboard(), text_state_encode(), txt_copy_clipboard(), txt_has_sel(), and txt_replace_char().
| void txt_indent | ( | struct Text * | text | ) |
Definition at line 2157 of file text.cc.
References Text::curl, ELEM, Text::flags, Text::sell, tab_to_spaces, txt_select_prefix(), and TXT_TABSTOSPACES.
Referenced by text_indent_exec(), and txt_insert_buf().
| void txt_insert_buf | ( | struct Text * | text, |
| const char * | in_buffer, | ||
| int | in_buffer_len ) |
| in_buffer | UTF8 encoded text, invalid UTF8 byte-sequences are handled gracefully. |
References add(), ATTR_NONNULL, txt_add_char(), txt_add_raw_char(), txt_backspace_char(), txt_backspace_word(), txt_comment(), txt_duplicate_line(), txt_indent(), txt_insert_buf(), txt_move_lines(), txt_replace_char(), txt_setcurr_tab_spaces(), txt_split_curline(), txt_uncomment(), and txt_unindent().
Referenced by bpy_rna_region_from_string(), confirm_suggestion(), text_find_and_replace(), text_paste_exec(), text_replace_all(), and txt_insert_buf().
| void txt_jump_left | ( | struct Text * | text, |
| bool | sel, | ||
| bool | use_init_step ) |
Definition at line 957 of file text.cc.
References BLI_str_cursor_step_utf8(), linep, STRCUR_DIR_PREV, STRCUR_JUMP_DELIM, txt_curs_cur(), txt_curs_sel(), txt_pop_first(), and txt_pop_sel().
Referenced by text_move_cursor(), txt_backspace_word(), and txt_get_span().
| void txt_jump_right | ( | struct Text * | text, |
| bool | sel, | ||
| bool | use_init_step ) |
Definition at line 981 of file text.cc.
References BLI_str_cursor_step_utf8(), linep, STRCUR_DIR_NEXT, STRCUR_JUMP_DELIM, txt_curs_cur(), txt_curs_sel(), txt_pop_last(), and txt_pop_sel().
Referenced by text_move_cursor(), txt_delete_word(), and txt_get_span().
| void txt_move_bof | ( | struct Text * | text, |
| bool | sel ) |
Definition at line 1049 of file text.cc.
References ListBase::first, linep, Text::lines, txt_curs_cur(), txt_curs_sel(), and txt_pop_sel().
Referenced by text_move_cursor(), and txt_get_span().
| void txt_move_bol | ( | struct Text * | text, |
| bool | sel ) |
Definition at line 1005 of file text.cc.
References linep, txt_curs_cur(), txt_curs_sel(), and txt_pop_sel().
Referenced by text_move_cursor(), txt_get_span(), and txt_move_up().
| void txt_move_down | ( | struct Text * | text, |
| bool | sel ) |
Definition at line 797 of file text.cc.
References BLI_str_utf8_offset_from_column_with_tabs(), BLI_str_utf8_offset_to_column_with_tabs(), linep, txt_curs_cur(), txt_curs_sel(), txt_move_eol(), txt_pop_last(), txt_pop_sel(), and TXT_TABSIZE.
Referenced by text_move_cursor(), txt_get_span(), and txt_move_right().
| void txt_move_eof | ( | struct Text * | text, |
| bool | sel ) |
Definition at line 1072 of file text.cc.
References ListBase::last, TextLine::len, linep, Text::lines, txt_curs_cur(), txt_curs_sel(), and txt_pop_sel().
Referenced by BKE_text_write(), text_move_cursor(), and txt_get_span().
| void txt_move_eol | ( | struct Text * | text, |
| bool | sel ) |
Definition at line 1027 of file text.cc.
References linep, txt_curs_cur(), txt_curs_sel(), and txt_pop_sel().
Referenced by text_move_cursor(), txt_get_span(), and txt_move_down().
| void txt_move_left | ( | struct Text * | text, |
| bool | sel ) |
Definition at line 870 of file text.cc.
References BLI_str_cursor_step_prev_utf8(), Text::flags, linep, txt_calc_tab_left(), txt_curs_cur(), txt_curs_sel(), txt_move_up(), txt_pop_first(), txt_pop_sel(), and TXT_TABSTOSPACES.
Referenced by text_autocomplete_modal(), text_insert_invoke(), text_move_cursor(), and txt_get_span().
| void txt_move_lines | ( | struct Text * | text, |
| int | direction ) |
Definition at line 2179 of file text.cc.
References BLI_assert, BLI_insertlinkafter(), BLI_insertlinkbefore(), BLI_remlink(), Text::curl, ELEM, Text::lines, TextLine::next, TextLine::prev, Text::sell, txt_clean_text(), txt_make_dirty(), TXT_MOVE_LINE_DOWN, TXT_MOVE_LINE_UP, and txt_order_cursors().
Referenced by move_lines_exec(), and txt_insert_buf().
| void txt_move_right | ( | struct Text * | text, |
| bool | sel ) |
Definition at line 913 of file text.cc.
References BLI_str_cursor_step_next_utf8(), Text::flags, linep, txt_calc_tab_right(), txt_curs_cur(), txt_curs_sel(), txt_move_down(), txt_pop_last(), txt_pop_sel(), and TXT_TABSTOSPACES.
Referenced by text_autocomplete_modal(), text_delete_exec(), text_move_cursor(), and txt_get_span().
Moves to a certain byte in a line, not a certain UTF8-character.
Definition at line 1100 of file text.cc.
References ListBase::first, i, linep, Text::lines, txt_curs_cur(), txt_curs_sel(), and txt_pop_sel().
Referenced by python_script_error_jump_text(), text_jump_to_file_at_point_internal(), text_reload_exec(), text_replace_all(), text_state_decode(), txt_find_string(), txt_get_span(), and txt_move_toline().
Definition at line 1095 of file text.cc.
References txt_move_to().
Referenced by text_find_and_replace(), text_jump_exec(), text_line_number_invoke(), text_replace_all(), and txt_get_span().
| void txt_move_up | ( | struct Text * | text, |
| bool | sel ) |
Definition at line 765 of file text.cc.
References BLI_str_utf8_offset_from_column_with_tabs(), BLI_str_utf8_offset_to_column_with_tabs(), linep, txt_curs_cur(), txt_curs_sel(), txt_move_bol(), txt_pop_first(), txt_pop_sel(), and TXT_TABSIZE.
Referenced by text_move_cursor(), txt_get_span(), and txt_move_left().
| void txt_order_cursors | ( | struct Text * | text, |
| bool | reverse ) |
Definition at line 1183 of file text.cc.
References Text::curc, Text::curl, Text::selc, Text::sell, txt_curs_swap(), and txt_get_span().
Referenced by text_comment_exec(), text_delete_exec(), text_indent_exec(), text_insert_invoke(), text_move_cursor(), text_unindent_exec(), txt_delete_sel(), txt_find_string(), and txt_move_lines().
| void txt_pop_sel | ( | struct Text * | text | ) |
Definition at line 1177 of file text.cc.
References Text::curc, Text::curl, Text::selc, and Text::sell.
Referenced by space_text_cursor_skip(), text_cursor_set_to_pos(), text_insert_invoke(), text_move_cursor(), txt_add_char_intern(), txt_backspace_char(), txt_delete_char(), txt_get_span(), 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_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().
Definition at line 1934 of file text.cc.
References add(), BLI_str_utf8_as_unicode_step_safe(), BLI_str_utf8_from_unicode(), BLI_UTF8_MAX, Text::curc, Text::curl, TextLine::len, TextLine::line, MEM_freeN(), MEM_malloc_arrayN(), txt_add_char(), txt_clean_text(), txt_has_sel(), txt_make_dirty(), txt_pop_sel(), and UNUSED_VARS.
Referenced by text_insert_exec(), and txt_insert_buf().
| void txt_sel_all | ( | struct Text * | text | ) |
Definition at line 1255 of file text.cc.
References Text::curc, Text::curl, ListBase::first, ListBase::last, TextLine::len, Text::lines, Text::selc, and Text::sell.
Referenced by BKE_text_clear(), text_select_all_exec(), and txt_get_span().
| void txt_sel_clear | ( | struct Text * | text | ) |
Reverse of txt_pop_sel Clears the selection and ensures the cursor is located at the selection (where the cursor is visually while editing).
Definition at line 1264 of file text.cc.
References Text::curc, Text::curl, Text::selc, and Text::sell.
Referenced by text_move_cursor(), and txt_get_span().
| void txt_sel_line | ( | struct Text * | text | ) |
Definition at line 1272 of file text.cc.
References Text::curc, Text::curl, TextLine::len, Text::selc, and Text::sell.
Referenced by text_select_line_exec(), and txt_get_span().
| void txt_sel_set | ( | struct Text * | text, |
| int | startl, | ||
| int | startc, | ||
| int | endl, | ||
| int | endc ) |
Definition at line 1283 of file text.cc.
References BLI_findlink(), BLI_listbase_count(), BLI_str_utf8_offset_from_index(), BLI_strlen_utf8(), CLAMP_MIN, Text::curc, Text::curl, ListBase::last, TextLine::len, TextLine::line, Text::lines, Text::selc, and Text::sell.
Referenced by bpy_rna_region_as_string(), bpy_rna_region_from_string(), and txt_get_span().
| char * txt_sel_to_buf | ( | const struct Text * | text, |
| size_t * | r_buf_strlen ) |
| int txt_setcurr_tab_spaces | ( | struct Text * | text, |
| int | space ) |
Definition at line 2210 of file text.cc.
References Text::curc, Text::curl, ELEM, Text::flags, i, TextLine::line, and TXT_TABSTOSPACES.
Referenced by text_line_break_exec(), and txt_insert_buf().
| void void txt_split_curline | ( | struct Text * | text | ) |
Definition at line 1653 of file text.cc.
References BLI_insertlinkbefore(), Text::curc, Text::curl, TextLine::format, left, TextLine::len, TextLine::line, Text::lines, MEM_freeN(), MEM_malloc_arrayN(), txt_clean_text(), txt_delete_sel(), txt_line_malloc(), txt_make_dirty(), and txt_pop_sel().
Referenced by text_line_break_exec(), txt_add_char_intern(), txt_insert_buf(), and txt_insert_buf().
| char * txt_to_buf | ( | struct Text * | text, |
| size_t * | r_buf_strlen ) |
Referenced by python_script_exec().
| char * txt_to_buf_for_undo | ( | struct Text * | text, |
| size_t * | r_buf_len ) |
Create a buffer, the only requirement is txt_from_buf_for_undo can decode it.
References ATTR_RETURNS_NONNULL, and ATTR_WARN_UNUSED_RESULT.
Referenced by text_state_encode().
| bool txt_uncomment | ( | struct Text * | text, |
| const char * | prefix ) |
Definition at line 2148 of file text.cc.
References Text::curl, ELEM, Text::sell, and txt_select_unprefix().
Referenced by text_comment_exec(), and txt_insert_buf().
| bool txt_unindent | ( | struct Text * | text | ) |
Definition at line 2168 of file text.cc.
References Text::curl, ELEM, Text::flags, Text::sell, tab_to_spaces, txt_select_unprefix(), and TXT_TABSTOSPACES.
Referenced by text_unindent_exec(), and txt_insert_buf().
| char ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL |
Definition at line 60 of file BKE_text.h.