-
Notifications
You must be signed in to change notification settings - Fork 0
class_textedit
reduz edited this page Feb 23, 2014
·
10 revisions
Inherits: Control\n\n### Brief Description
Multiline text editing control.
- void set_text" ( String text )
- void insert_text_at_cursor" ( String text )
- int get_line_count" ( ) const
- String get_text" ( )
- String get_line" ( int arg0 ) const
- void cursor_set_column" ( int column )
- void cursor_set_line" ( int line )
- int cursor_get_column" ( ) const
- int cursor_get_line" ( ) const
- void set_readonly" ( bool enable )
- void set_wrap" ( bool enable )
- void set_max_chars" ( int amount )
- void cut" ( )
- void copy" ( )
- void paste" ( )
- void select_all" ( )
- void select" ( int from_line, int from_column, int to_line, int to_column )
- bool is_selection_active" ( ) const
- int get_selection_from_line" ( ) const
- int get_selection_from_column" ( ) const
- int get_selection_to_line" ( ) const
- int get_selection_to_column" ( ) const
- String get_selection_text" ( ) const
- IntArray search" ( String flags, int from_line, int from_column, int to_line ) const
- void undo" ( )
- void redo" ( )
- void clear_undo_history" ( )
- void set_syntax_coloring" ( bool enable )
- bool is_syntax_coloring_enabled" ( ) const
- void add_keyword_color" ( String keyword, Color color )
- void add_color_region" ( String begin_key, String end_key, Color color, bool line_only=false )
- void set_symbol_color" ( Color color )
- void set_custom_bg_color" ( Color color )
- void clear_colors" ( )
- text_changed ( )
- cursor_changed ( )
- request_completion ( String keyword, int line )
- SEARCH_MATCH_CASE = 1 - Match case when searching.
- SEARCH_WHOLE_WORDS = 2 - Match whole words when searching.
- SEARCH_BACKWARDS = 4 - Search from end to begining.
TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo.
== set_text ==
- void set_text" ( String text ) \ Set the entire text. == insert_text_at_cursor ==
- void insert_text_at_cursor" ( String text ) \ Insert a given text at the cursor position. == get_line_count ==
- int get_line_count" ( ) const \ Return the amount of total lines in the text. == get_text ==
- String get_text" ( ) \ Return the whole text. == get_line ==
- String get_line" ( int arg0 ) const \ Return the text of a specific line. == cursor_set_column ==
- void cursor_set_column" ( int column ) \ Set the current column of the text editor. == cursor_set_line ==
- void cursor_set_line" ( int line ) \ Set the current line of the text editor. == cursor_get_column ==
- int cursor_get_column" ( ) const \ Return the column the editing cursor is at. == cursor_get_line ==
- int cursor_get_line" ( ) const \ Return the line the editing cursor is at. == set_readonly ==
- void set_readonly" ( bool enable ) \ Set the text editor as read-only. Text can be displayed but not edited. == set_wrap ==
- void set_wrap" ( bool enable ) \ Enable text wrapping when it goes beyond he edge of what is visible. == set_max_chars ==
- void set_max_chars" ( int amount ) \ Set the maximum amount of characters editable. == cut ==
- void cut" ( ) \ Cut the current selection. == copy ==
- void copy" ( ) \ Copy the current selection. == paste ==
- void paste" ( ) \ Paste the current selection. == select_all ==
- void select_all" ( ) \ Select all the text. == select ==
- void select" ( int from_line, int from_column, int to_line, int to_column ) \ Perform selection, from line/column to line/column. == is_selection_active ==
- bool is_selection_active" ( ) const \ Return true if the selection is active. == get_selection_from_line ==
- int get_selection_from_line" ( ) const \ Return the selection begin line. == get_selection_from_column ==
- int get_selection_from_column" ( ) const \ Return the selection begin column. == get_selection_to_line ==
- int get_selection_to_line" ( ) const \ Return the selection end line. == get_selection_to_column ==
- int get_selection_to_column" ( ) const \ Return the selection end column. == get_selection_text ==
- String get_selection_text" ( ) const \ Return the text inside the selection. == search ==
- IntArray search" ( String flags, int from_line, int from_column, int to_line ) const \ Perform a search inside the text. Search flags can be specified in the SEARCH_* enum. == undo ==
- void undo" ( ) \ Perform undo operation. == redo ==
- void redo" ( ) \ Perform redo operation. == clear_undo_history ==
- void clear_undo_history" ( ) \ Clear the undo history. == set_syntax_coloring ==
- void set_syntax_coloring" ( bool enable ) \ Set to enable the syntax coloring. == is_syntax_coloring_enabled ==
- bool is_syntax_coloring_enabled" ( ) const \ Return true if the syntax coloring is enabled. == add_keyword_color ==
- void add_keyword_color" ( String keyword, Color color ) \ Add a keyword and it's color. == add_color_region ==
- void add_color_region" ( String begin_key, String end_key, Color color, bool line_only=false ) \ Add color region (given the delimiters) and it's colors. == set_symbol_color ==
- void set_symbol_color" ( Color color ) \ Set the color for symbols. == set_custom_bg_color ==
- void set_custom_bg_color" ( Color color ) \ Set a custom background color. A background color with alpha==0 disables this. == clear_colors ==
- void clear_colors" ( ) \ Clear all the syntax coloring information.