Blender  V2.59
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   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 Textadd_empty_text (const char *name)
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, 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 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   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
#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
#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
#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
#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().


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 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)
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 
)
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,
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)
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)
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 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)
void txt_do_undo ( struct Text text)
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]
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,
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 149 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 
)

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 
)
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)
void txt_pop_sel ( struct Text text)
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)
int txt_replace_char ( struct Text text,
char  add 
)
void txt_sel_all ( struct Text text)
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)
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)
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)
void unlink_text ( struct Main bmain,
struct Text text 
)
void write_text ( struct Text text,
const char *  str 
)