2020-07-15 06:43:21 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "CodeHighlighter" inherits= "SyntaxHighlighter" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2020-07-15 06:43:21 +00:00
<brief_description >
2023-04-30 14:26:09 +00:00
A syntax highlighter intended for code.
2020-07-15 06:43:21 +00:00
</brief_description>
<description >
2023-04-30 14:26:09 +00:00
By adjusting various properties of this resource, you can change the colors of strings, comments, numbers, and other text patterns inside a [TextEdit] control.
2020-07-15 06:43:21 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "add_color_region" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
<param index= "1" name= "end_key" type= "String" />
<param index= "2" name= "color" type= "Color" />
<param index= "3" name= "line_only" type= "bool" default= "false" />
2020-07-15 06:43:21 +00:00
<description >
2024-02-29 23:59:28 +00:00
Adds a color region (such as for comments or strings) from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters.
If [param line_only] is [code]true[/code] or [param end_key] is an empty [String], the region does not carry over to the next line.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "add_keyword_color" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "keyword" type= "String" />
<param index= "1" name= "color" type= "Color" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Sets the color for a keyword.
The keyword cannot contain any symbols except '_'.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "add_member_keyword_color" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "member_keyword" type= "String" />
<param index= "1" name= "color" type= "Color" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Sets the color for a member keyword.
The member keyword cannot contain any symbols except '_'.
It will not be highlighted if preceded by a '.'.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "clear_color_regions" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Removes all color regions.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "clear_keyword_colors" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Removes all keywords.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "clear_member_keyword_colors" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Removes all member keywords.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "get_keyword_color" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Color" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "keyword" type= "String" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Returns the color for a keyword.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "get_member_keyword_color" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Color" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "member_keyword" type= "String" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Returns the color for a member keyword.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "has_color_region" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
2020-07-15 06:43:21 +00:00
<description >
2022-01-02 17:32:49 +00:00
Returns [code]true[/code] if the start key exists, else [code]false[/code].
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "has_keyword_color" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "keyword" type= "String" />
2020-07-15 06:43:21 +00:00
<description >
2022-01-02 17:32:49 +00:00
Returns [code]true[/code] if the keyword exists, else [code]false[/code].
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "has_member_keyword_color" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "member_keyword" type= "String" />
2020-07-15 06:43:21 +00:00
<description >
2022-01-02 17:32:49 +00:00
Returns [code]true[/code] if the member keyword exists, else [code]false[/code].
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "remove_color_region" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "start_key" type= "String" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Removes the color region that uses that start key.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "remove_keyword_color" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "keyword" type= "String" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Removes the keyword.
2020-07-15 06:43:21 +00:00
</description>
</method>
<method name= "remove_member_keyword_color" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "member_keyword" type= "String" />
2020-07-15 06:43:21 +00:00
<description >
2020-10-11 16:07:33 +00:00
Removes the member keyword.
2020-07-15 06:43:21 +00:00
</description>
</method>
</methods>
<members >
<member name= "color_regions" type= "Dictionary" setter= "set_color_regions" getter= "get_color_regions" default= "{}" >
2020-10-11 16:07:33 +00:00
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.
2020-07-15 06:43:21 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "function_color" type= "Color" setter= "set_function_color" getter= "get_function_color" default= "Color(0, 0, 0, 1)" >
2020-10-11 16:07:33 +00:00
Sets color for functions. A function is a non-keyword string followed by a '('.
2020-07-15 06:43:21 +00:00
</member>
<member name= "keyword_colors" type= "Dictionary" setter= "set_keyword_colors" getter= "get_keyword_colors" default= "{}" >
2020-10-11 16:07:33 +00:00
Sets the keyword colors. All existing keywords will be removed. The [Dictionary] key is the keyword. The value is the keyword color.
2020-07-15 06:43:21 +00:00
</member>
<member name= "member_keyword_colors" type= "Dictionary" setter= "set_member_keyword_colors" getter= "get_member_keyword_colors" default= "{}" >
2020-10-11 16:07:33 +00:00
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.
2020-07-15 06:43:21 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "member_variable_color" type= "Color" setter= "set_member_variable_color" getter= "get_member_variable_color" default= "Color(0, 0, 0, 1)" >
2020-10-11 16:07:33 +00:00
Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'.
2020-07-15 06:43:21 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "number_color" type= "Color" setter= "set_number_color" getter= "get_number_color" default= "Color(0, 0, 0, 1)" >
2020-10-11 16:07:33 +00:00
Sets the color for numbers.
2020-07-15 06:43:21 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "symbol_color" type= "Color" setter= "set_symbol_color" getter= "get_symbol_color" default= "Color(0, 0, 0, 1)" >
2020-10-11 16:07:33 +00:00
Sets the color for symbols.
2020-07-15 06:43:21 +00:00
</member>
</members>
</class>