mirror of
https://github.com/godotengine/godot.git
synced 2024-12-21 10:25:24 +08:00
142 lines
5.6 KiB
XML
142 lines
5.6 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="CodeHighlighter" inherits="SyntaxHighlighter" version="4.0">
|
|
<brief_description>
|
|
A syntax highlighter for code.
|
|
</brief_description>
|
|
<description>
|
|
A syntax highlighter for code.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="add_color_region">
|
|
<return type="void" />
|
|
<argument index="0" name="start_key" type="String" />
|
|
<argument index="1" name="end_key" type="String" />
|
|
<argument index="2" name="color" type="Color" />
|
|
<argument index="3" name="line_only" type="bool" default="false" />
|
|
<description>
|
|
Adds a color region such as comments or strings.
|
|
Both the start and end keys must be symbols. Only the start key has to be unique.
|
|
Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code].
|
|
</description>
|
|
</method>
|
|
<method name="add_keyword_color">
|
|
<return type="void" />
|
|
<argument index="0" name="keyword" type="String" />
|
|
<argument index="1" name="color" type="Color" />
|
|
<description>
|
|
Sets the color for a keyword.
|
|
The keyword cannot contain any symbols except '_'.
|
|
</description>
|
|
</method>
|
|
<method name="add_member_keyword_color">
|
|
<return type="void" />
|
|
<argument index="0" name="member_keyword" type="String" />
|
|
<argument index="1" name="color" type="Color" />
|
|
<description>
|
|
Sets the color for a member keyword.
|
|
The member keyword cannot contain any symbols except '_'.
|
|
It will not be highlighted if preceded by a '.'.
|
|
</description>
|
|
</method>
|
|
<method name="clear_color_regions">
|
|
<return type="void" />
|
|
<description>
|
|
Removes all color regions.
|
|
</description>
|
|
</method>
|
|
<method name="clear_keyword_colors">
|
|
<return type="void" />
|
|
<description>
|
|
Removes all keywords.
|
|
</description>
|
|
</method>
|
|
<method name="clear_member_keyword_colors">
|
|
<return type="void" />
|
|
<description>
|
|
Removes all member keywords.
|
|
</description>
|
|
</method>
|
|
<method name="get_keyword_color" qualifiers="const">
|
|
<return type="Color" />
|
|
<argument index="0" name="keyword" type="String" />
|
|
<description>
|
|
Returns the color for a keyword.
|
|
</description>
|
|
</method>
|
|
<method name="get_member_keyword_color" qualifiers="const">
|
|
<return type="Color" />
|
|
<argument index="0" name="member_keyword" type="String" />
|
|
<description>
|
|
Returns the color for a member keyword.
|
|
</description>
|
|
</method>
|
|
<method name="has_color_region" qualifiers="const">
|
|
<return type="bool" />
|
|
<argument index="0" name="start_key" type="String" />
|
|
<description>
|
|
Return [code]true[/code] if the start key exists, else [code]false[/code].
|
|
</description>
|
|
</method>
|
|
<method name="has_keyword_color" qualifiers="const">
|
|
<return type="bool" />
|
|
<argument index="0" name="keyword" type="String" />
|
|
<description>
|
|
Return [code]true[/code] if the keyword exists, else [code]false[/code].
|
|
</description>
|
|
</method>
|
|
<method name="has_member_keyword_color" qualifiers="const">
|
|
<return type="bool" />
|
|
<argument index="0" name="member_keyword" type="String" />
|
|
<description>
|
|
Return [code]true[/code] if the member keyword exists, else [code]false[/code].
|
|
</description>
|
|
</method>
|
|
<method name="remove_color_region">
|
|
<return type="void" />
|
|
<argument index="0" name="start_key" type="String" />
|
|
<description>
|
|
Removes the color region that uses that start key.
|
|
</description>
|
|
</method>
|
|
<method name="remove_keyword_color">
|
|
<return type="void" />
|
|
<argument index="0" name="keyword" type="String" />
|
|
<description>
|
|
Removes the keyword.
|
|
</description>
|
|
</method>
|
|
<method name="remove_member_keyword_color">
|
|
<return type="void" />
|
|
<argument index="0" name="member_keyword" type="String" />
|
|
<description>
|
|
Removes the member keyword.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="color_regions" type="Dictionary" setter="set_color_regions" getter="get_color_regions" default="{}">
|
|
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.
|
|
</member>
|
|
<member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color(0, 0, 0, 1)">
|
|
Sets color for functions. A function is a non-keyword string followed by a '('.
|
|
</member>
|
|
<member name="keyword_colors" type="Dictionary" setter="set_keyword_colors" getter="get_keyword_colors" default="{}">
|
|
Sets the keyword colors. All existing keywords will be removed. The [Dictionary] key is the keyword. The value is the keyword color.
|
|
</member>
|
|
<member name="member_keyword_colors" type="Dictionary" setter="set_member_keyword_colors" getter="get_member_keyword_colors" default="{}">
|
|
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.
|
|
</member>
|
|
<member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color(0, 0, 0, 1)">
|
|
Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'.
|
|
</member>
|
|
<member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color(0, 0, 0, 1)">
|
|
Sets the color for numbers.
|
|
</member>
|
|
<member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color(0, 0, 0, 1)">
|
|
Sets the color for symbols.
|
|
</member>
|
|
</members>
|
|
</class>
|