Blender V2.61 - r43446
Classes | Defines | Typedefs | Enumerations | Functions | Variables

text_intern.h File Reference

Go to the source code of this file.

Classes

struct  FlattenString

Defines

#define TXT_OFFSET   15
#define TXT_SCROLL_WIDTH   20
#define TXT_SCROLL_SPACE   2
#define TEXTXLOC   (st->cwidth * st->linenrs_tot)
#define SUGG_LIST_SIZE   7
#define SUGG_LIST_WIDTH   20
#define DOC_WIDTH   40
#define DOC_HEIGHT   10
#define TOOL_SUGG_LIST   0x01
#define TOOL_DOCUMENT   0x02
#define TMARK_GRP_CUSTOM   0x00010000
#define TMARK_GRP_FINDALL   0x00020000

Typedefs

typedef struct FlattenString FlattenString

Enumerations

enum  {
  LINE_BEGIN, LINE_END, FILE_TOP, FILE_BOTTOM,
  PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD,
  PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE
}
enum  { DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_NEXT_WORD, DEL_PREV_WORD }

Functions

void draw_text_main (struct SpaceText *st, struct ARegion *ar)
void text_update_line_edited (struct TextLine *line)
void text_update_edited (struct Text *text)
void text_update_character_width (struct SpaceText *st)
void text_scroll_to_cursor (struct SpaceText *st, struct ScrArea *sa)
void text_update_cursor_moved (struct bContext *C)
int flatten_string (struct SpaceText *st, FlattenString *fs, const char *in)
void flatten_string_free (FlattenString *fs)
int wrap_width (struct SpaceText *st, struct ARegion *ar)
void wrap_offset (struct SpaceText *st, struct ARegion *ar, struct TextLine *linein, int cursin, int *offl, int *offc)
void wrap_offset_in_line (struct SpaceText *st, struct ARegion *ar, struct TextLine *linep, int cursin, int *offl, int *offc)
int text_get_char_pos (struct SpaceText *st, const char *line, int cur)
void text_drawcache_tag_update (struct SpaceText *st, int full)
void text_free_caches (struct SpaceText *st)
int text_file_modified (struct Text *text)
int text_do_suggest_select (struct SpaceText *st, struct ARegion *ar)
void text_pop_suggest_list (void)
int text_get_visible_lines (struct SpaceText *st, struct ARegion *ar, const char *str)
int text_get_span_wrap (struct SpaceText *st, struct ARegion *ar, struct TextLine *from, struct TextLine *to)
int text_get_total_lines (struct SpaceText *st, struct ARegion *ar)
void TEXT_OT_new (struct wmOperatorType *ot)
void TEXT_OT_open (struct wmOperatorType *ot)
void TEXT_OT_reload (struct wmOperatorType *ot)
void TEXT_OT_unlink (struct wmOperatorType *ot)
void TEXT_OT_save (struct wmOperatorType *ot)
void TEXT_OT_save_as (struct wmOperatorType *ot)
void TEXT_OT_make_internal (struct wmOperatorType *ot)
void TEXT_OT_run_script (struct wmOperatorType *ot)
void TEXT_OT_refresh_pyconstraints (struct wmOperatorType *ot)
void TEXT_OT_paste (struct wmOperatorType *ot)
void TEXT_OT_copy (struct wmOperatorType *ot)
void TEXT_OT_cut (struct wmOperatorType *ot)
void TEXT_OT_convert_whitespace (struct wmOperatorType *ot)
void TEXT_OT_uncomment (struct wmOperatorType *ot)
void TEXT_OT_comment (struct wmOperatorType *ot)
void TEXT_OT_unindent (struct wmOperatorType *ot)
void TEXT_OT_indent (struct wmOperatorType *ot)
void TEXT_OT_line_break (struct wmOperatorType *ot)
void TEXT_OT_insert (struct wmOperatorType *ot)
void TEXT_OT_markers_clear (struct wmOperatorType *ot)
void TEXT_OT_next_marker (struct wmOperatorType *ot)
void TEXT_OT_previous_marker (struct wmOperatorType *ot)
void TEXT_OT_select_line (struct wmOperatorType *ot)
void TEXT_OT_select_all (struct wmOperatorType *ot)
void TEXT_OT_select_word (struct wmOperatorType *ot)
void TEXT_OT_jump (struct wmOperatorType *ot)
void TEXT_OT_move (struct wmOperatorType *ot)
void TEXT_OT_move_select (struct wmOperatorType *ot)
void TEXT_OT_delete (struct wmOperatorType *ot)
void TEXT_OT_overwrite_toggle (struct wmOperatorType *ot)
void TEXT_OT_scroll (struct wmOperatorType *ot)
void TEXT_OT_scroll_bar (struct wmOperatorType *ot)
void TEXT_OT_selection_set (struct wmOperatorType *ot)
void TEXT_OT_cursor_set (struct wmOperatorType *ot)
void TEXT_OT_line_number (struct wmOperatorType *ot)
void TEXT_OT_properties (struct wmOperatorType *ot)
void TEXT_OT_find (struct wmOperatorType *ot)
void TEXT_OT_find_set_selected (struct wmOperatorType *ot)
void TEXT_OT_replace (struct wmOperatorType *ot)
void TEXT_OT_replace_set_selected (struct wmOperatorType *ot)
void TEXT_OT_mark_all (struct wmOperatorType *ot)
void TEXT_OT_to_3d_object (struct wmOperatorType *ot)
void TEXT_OT_resolve_conflict (struct wmOperatorType *ot)

Variables

const char * text_context_dir []

Detailed Description

Definition in file text_intern.h.


Define Documentation

#define DOC_HEIGHT   10

Definition at line 66 of file text_intern.h.

Referenced by draw_documentation().

#define DOC_WIDTH   40

Definition at line 65 of file text_intern.h.

Referenced by draw_documentation().

#define SUGG_LIST_SIZE   7
#define SUGG_LIST_WIDTH   20

Definition at line 64 of file text_intern.h.

Referenced by draw_documentation(), draw_suggestion_list(), and text_do_suggest_select().

#define TEXTXLOC   (st->cwidth * st->linenrs_tot)
#define TMARK_GRP_CUSTOM   0x00010000

Definition at line 71 of file text_intern.h.

#define TMARK_GRP_FINDALL   0x00020000

Definition at line 72 of file text_intern.h.

Referenced by text_find_and_replace().

#define TOOL_DOCUMENT   0x02

Definition at line 69 of file text_intern.h.

Referenced by do_texttools().

#define TOOL_SUGG_LIST   0x01

Definition at line 68 of file text_intern.h.

Referenced by do_texttools().

#define TXT_OFFSET   15
#define TXT_SCROLL_SPACE   2

Definition at line 59 of file text_intern.h.

Referenced by text_scroll_bar_invoke().

#define TXT_SCROLL_WIDTH   20

Definition at line 58 of file text_intern.h.

Referenced by draw_text_main(), text_scroll_to_cursor(), and wrap_width().


Typedef Documentation

typedef struct FlattenString FlattenString

Enumeration Type Documentation

anonymous enum
Enumerator:
LINE_BEGIN 
LINE_END 
FILE_TOP 
FILE_BOTTOM 
PREV_CHAR 
NEXT_CHAR 
PREV_WORD 
NEXT_WORD 
PREV_LINE 
NEXT_LINE 
PREV_PAGE 
NEXT_PAGE 

Definition at line 104 of file text_intern.h.

anonymous enum
Enumerator:
DEL_NEXT_CHAR 
DEL_PREV_CHAR 
DEL_NEXT_WORD 
DEL_PREV_WORD 

Definition at line 106 of file text_intern.h.


Function Documentation

void draw_text_main ( struct SpaceText st,
struct ARegion ar 
)
int flatten_string ( struct SpaceText st,
FlattenString fs,
const char *  in 
)
void flatten_string_free ( FlattenString fs)
int text_do_suggest_select ( struct SpaceText st,
struct ARegion ar 
)
void text_drawcache_tag_update ( struct SpaceText st,
int  full 
)
int text_file_modified ( struct Text text)

Definition at line 3108 of file text_ops.c.

References BLI_exists(), BLI_path_abs(), BLI_strncpy(), FILE_MAX, G, Text::mtime, and Text::name.

Referenced by text_resolve_conflict_invoke().

void text_free_caches ( struct SpaceText st)

Definition at line 977 of file text_draw.c.

References SpaceText::drawcache, DrawCache::line_height, and MEM_freeN().

Referenced by text_free().

int text_get_char_pos ( struct SpaceText st,
const char *  line,
int  cur 
)
int text_get_span_wrap ( struct SpaceText st,
struct ARegion ar,
struct TextLine from,
struct TextLine to 
)
int text_get_total_lines ( struct SpaceText st,
struct ARegion ar 
)
int text_get_visible_lines ( struct SpaceText st,
struct ARegion ar,
const char *  str 
)
void TEXT_OT_comment ( struct wmOperatorType ot)
void TEXT_OT_convert_whitespace ( struct wmOperatorType ot)
void TEXT_OT_copy ( struct wmOperatorType ot)
void TEXT_OT_cursor_set ( struct wmOperatorType ot)
void TEXT_OT_cut ( struct wmOperatorType ot)
void TEXT_OT_delete ( struct wmOperatorType ot)
void TEXT_OT_find ( struct wmOperatorType ot)
void TEXT_OT_find_set_selected ( struct wmOperatorType ot)
void TEXT_OT_indent ( struct wmOperatorType ot)
void TEXT_OT_insert ( struct wmOperatorType ot)
void TEXT_OT_jump ( struct wmOperatorType ot)
void TEXT_OT_line_break ( struct wmOperatorType ot)
void TEXT_OT_line_number ( struct wmOperatorType ot)
void TEXT_OT_make_internal ( struct wmOperatorType ot)
void TEXT_OT_mark_all ( struct wmOperatorType ot)
void TEXT_OT_markers_clear ( struct wmOperatorType ot)
void TEXT_OT_move ( struct wmOperatorType ot)
void TEXT_OT_move_select ( struct wmOperatorType ot)
void TEXT_OT_new ( struct wmOperatorType ot)
void TEXT_OT_next_marker ( struct wmOperatorType ot)
void TEXT_OT_open ( struct wmOperatorType ot)
void TEXT_OT_overwrite_toggle ( struct wmOperatorType ot)
void TEXT_OT_paste ( struct wmOperatorType ot)
void TEXT_OT_previous_marker ( struct wmOperatorType ot)
void TEXT_OT_properties ( struct wmOperatorType ot)
void TEXT_OT_refresh_pyconstraints ( struct wmOperatorType ot)
void TEXT_OT_reload ( struct wmOperatorType ot)
void TEXT_OT_replace ( struct wmOperatorType ot)
void TEXT_OT_replace_set_selected ( struct wmOperatorType ot)
void TEXT_OT_resolve_conflict ( struct wmOperatorType ot)
void TEXT_OT_run_script ( struct wmOperatorType ot)
void TEXT_OT_save ( struct wmOperatorType ot)
void TEXT_OT_save_as ( struct wmOperatorType ot)
void TEXT_OT_scroll ( struct wmOperatorType ot)
void TEXT_OT_scroll_bar ( struct wmOperatorType ot)
void TEXT_OT_select_all ( struct wmOperatorType ot)
void TEXT_OT_select_line ( struct wmOperatorType ot)
void TEXT_OT_select_word ( struct wmOperatorType ot)
void TEXT_OT_selection_set ( struct wmOperatorType ot)
void TEXT_OT_to_3d_object ( struct wmOperatorType ot)
void TEXT_OT_uncomment ( struct wmOperatorType ot)
void TEXT_OT_unindent ( struct wmOperatorType ot)
void TEXT_OT_unlink ( struct wmOperatorType ot)
void text_pop_suggest_list ( void  )
void text_scroll_to_cursor ( struct SpaceText st,
struct ScrArea sa 
)
void text_update_character_width ( struct SpaceText st)
void text_update_cursor_moved ( struct bContext C)
void text_update_edited ( struct Text text)

Definition at line 146 of file text_ops.c.

References ListBase::first, Text::lines, TextLine::next, and text_update_line_edited().

void text_update_line_edited ( struct TextLine line)
void wrap_offset ( struct SpaceText st,
struct ARegion ar,
struct TextLine linein,
int  cursin,
int *  offl,
int *  offc 
)
void wrap_offset_in_line ( struct SpaceText st,
struct ARegion ar,
struct TextLine linep,
int  cursin,
int *  offl,
int *  offc 
)
int wrap_width ( struct SpaceText st,
struct ARegion ar 
)

Variable Documentation

const char* text_context_dir[]

Definition at line 385 of file space_text.c.