-
Notifications
You must be signed in to change notification settings - Fork 0
class_textedit
####Inherits: Control ####Category: Core
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
- String get_word_under_cursor ( ) 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 ( )
- 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.
- void set_text ( String text )
Set the entire text.
- void insert_text_at_cursor ( String text )
Insert a given text at the cursor position.
- int get_line_count ( ) const
Return the amount of total lines in the text.
- String get_text ( )
Return the whole text.
Return the text of a specific line.
- void cursor_set_column ( int column )
Set the current column of the text editor.
- void cursor_set_line ( int line )
Set the current line of the text editor.
- int cursor_get_column ( ) const
Return the column the editing cursor is at.
- int cursor_get_line ( ) const
Return the line the editing cursor is at.
- void set_readonly ( bool enable )
Set the text editor as read-only. Text can be displayed but not edited.
- void set_wrap ( bool enable )
Enable text wrapping when it goes beyond he edge of what is visible.
- void set_max_chars ( int amount )
Set the maximum amount of characters editable.
- void cut ( )
Cut the current selection.
- void copy ( )
Copy the current selection.
- void paste ( )
Paste the current selection.
- void select_all ( )
Select all the text.
Perform selection, from line/column to line/column.
- bool is_selection_active ( ) const
Return true if the selection is active.
- int get_selection_from_line ( ) const
Return the selection begin line.
- int get_selection_from_column ( ) const
Return the selection begin column.
- int get_selection_to_line ( ) const
Return the selection end line.
- int get_selection_to_column ( ) const
Return the selection end column.
- String get_selection_text ( ) const
Return the text inside the selection.
Perform a search inside the text. Search flags can be specified in the SEARCH_* enum.
- void undo ( )
Perform undo operation.
- void redo ( )
Perform redo operation.
- void clear_undo_history ( )
Clear the undo history.
- void set_syntax_coloring ( bool enable )
Set to enable the syntax coloring.
- bool is_syntax_coloring_enabled ( ) const
Return true if the syntax coloring is enabled.
Add a keyword and it's color.
Add color region (given the delimiters) and it's colors.
- void set_symbol_color ( Color color )
Set the color for symbols.
- void set_custom_bg_color ( Color color )
Set a custom background color. A background color with alpha==0 disables this.
- void clear_colors ( )
Clear all the syntax coloring information.