CodeHighlighter¶
Inherits: SyntaxHighlighter < Resource < RefCounted < Object
A syntax highlighter intended for code.
Description¶
By adjusting various properties of this resource, you can change the colors of strings, comments, numbers, and other text patterns inside a TextEdit control.
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
void |
add_color_region ( String start_key, String end_key, Color color, bool line_only=false ) |
void |
add_keyword_color ( String keyword, Color color ) |
void |
add_member_keyword_color ( String member_keyword, Color color ) |
void |
|
void |
|
void |
|
get_keyword_color ( String keyword ) const |
|
get_member_keyword_color ( String member_keyword ) const |
|
has_color_region ( String start_key ) const |
|
has_keyword_color ( String keyword ) const |
|
has_member_keyword_color ( String member_keyword ) const |
|
void |
remove_color_region ( String start_key ) |
void |
remove_keyword_color ( String keyword ) |
void |
remove_member_keyword_color ( String member_keyword ) |
Property Descriptions¶
Dictionary color_regions = {}
void set_color_regions ( Dictionary value )
Dictionary get_color_regions ( )
Sets the color regions. All existing regions will be removed. The Dictionary key is the region start and end key, separated by a space. The value is the region color.
Color function_color = Color(0, 0, 0, 1)
Sets color for functions. A function is a non-keyword string followed by a '('.
Dictionary keyword_colors = {}
void set_keyword_colors ( Dictionary value )
Dictionary get_keyword_colors ( )
Sets the keyword colors. All existing keywords will be removed. The Dictionary key is the keyword. The value is the keyword color.
Dictionary member_keyword_colors = {}
void set_member_keyword_colors ( Dictionary value )
Dictionary get_member_keyword_colors ( )
Sets the member keyword colors. All existing member keyword will be removed. The Dictionary key is the member keyword. The value is the member keyword color.
Color member_variable_color = Color(0, 0, 0, 1)
void set_member_variable_color ( Color value )