Blender V2.61 - r43446
Defines | Functions

BKE_text.h File Reference

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 Textadd_empty_text (const char *name)
int txt_extended_ascii_as_utf8 (char **str)
int reopen_text (struct Text *text)
struct Textadd_text (const char *file, const char *relpath)
struct Textcopy_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 TextMarkertxt_find_marker (struct Text *text, struct TextLine *line, int curs, int group, int flags)
struct TextMarkertxt_find_marker_region (struct Text *text, struct TextLine *line, int start, int end, int group, int flags)
struct TextMarkertxt_prev_marker (struct Text *text, struct TextMarker *marker)
struct TextMarkertxt_next_marker (struct Text *text, struct TextMarker *marker)
struct TextMarkertxt_prev_marker_color (struct Text *text, struct TextMarker *marker)
struct TextMarkertxt_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)

Detailed Description

Since:
March 2001
Author:
nzc

Definition in file BKE_text.h.


Define Documentation

#define TMARK_EDITALL   0x02
#define TMARK_TEMP   0x01
#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
#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
#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
#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
#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().


Function Documentation

struct Text* add_empty_text ( const char *  name) [read]
struct Text* add_text ( const char *  file,
const char *  relpath 
) [read]
void clear_text ( struct Text text)
struct Text* copy_text ( struct Text ta) [read]
void free_text ( struct Text text)
int reopen_text ( struct Text text)
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)
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 
)
void txt_add_marker ( struct Text text,
struct TextLine line,
int  start,
int  end,
const unsigned char  color[4],
int  group,
int  flags 
)
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)
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)
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 
)
void txt_comment ( struct Text text)
void txt_delete_char ( struct Text text)
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)
void txt_do_undo ( struct Text text)
void txt_export_to_object ( struct Text text)
void txt_export_to_objects ( struct Text text)
int txt_extended_ascii_as_utf8 ( char **  str)
struct TextMarker* txt_find_marker ( struct Text text,
struct TextLine line,
int  curs,
int  group,
int  flags 
) [read]
struct TextMarker* txt_find_marker_region ( struct Text text,
struct TextLine line,
int  start,
int  end,
int  group,
int  flags 
) [read]
int txt_find_string ( struct Text text,
const char *  findstr,
int  wrap,
int  match_case 
)
int txt_get_span ( struct TextLine from,
struct TextLine to 
)
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)
void txt_indent ( struct Text text)
void txt_insert_buf ( struct Text text,
const char *  in_buffer 
)
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_bol ( struct Text text,
short  sel 
)
void txt_move_down ( struct Text text,
short  sel 
)
void txt_move_eof ( struct Text text,
short  sel 
)
void txt_move_eol ( 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_move_to ( struct Text text,
unsigned int  line,
unsigned int  ch,
short  sel 
)
void txt_move_toline ( struct Text text,
unsigned int  line,
short  sel 
)
void txt_move_up ( struct Text text,
short  sel 
)
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)
void txt_pop_sel ( struct Text text)
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)
int txt_replace_char ( struct Text text,
unsigned int  add 
)
void txt_sel_all ( struct Text text)
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)
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)
char* txt_to_buf ( struct Text text)
void txt_uncomment ( 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_unindent ( struct Text text)
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().

void unlink_text ( struct Main bmain,
struct Text text 
)
void write_text ( struct Text text,
const char *  str 
)