diff options
Diffstat (limited to 'doc/classes/CodeEdit.xml')
-rw-r--r-- | doc/classes/CodeEdit.xml | 168 |
1 files changed, 139 insertions, 29 deletions
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 4076198df6..30fd47cdb6 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -45,7 +45,7 @@ </argument> <argument index="2" name="insert_text" type="String"> </argument> - <argument index="3" name="text_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <argument index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)"> </argument> <argument index="4" name="icon" type="Resource" default="null"> </argument> @@ -86,6 +86,15 @@ 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="can_fold_line" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. + </description> + </method> <method name="cancel_code_completion"> <return type="void"> </return> @@ -134,6 +143,36 @@ Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged. </description> </method> + <method name="do_indent"> + <return type="void"> + </return> + <description> + Perform an indent as if the user activated the "ui_text_indent" action. + </description> + </method> + <method name="do_unindent"> + <return type="void"> + </return> + <description> + Perform an unindent as if the user activated the "ui_text_unindent" action. + </description> + </method> + <method name="fold_all_lines"> + <return type="void"> + </return> + <description> + Folds all lines that are possible to be folded (see [method can_fold_line]). + </description> + </method> + <method name="fold_line"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Folds the given line, if possible (see [method can_fold_line]). + </description> + </method> <method name="get_bookmarked_lines" qualifiers="const"> <return type="Array"> </return> @@ -184,7 +223,7 @@ Gets the end key for a string or comment region index. </description> </method> - <method name="get_delimiter_end_postion" qualifiers="const"> + <method name="get_delimiter_end_position" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="line" type="int"> @@ -204,7 +243,7 @@ Gets the start key for a string or comment region index. </description> </method> - <method name="get_delimiter_start_postion" qualifiers="const"> + <method name="get_delimiter_start_position" qualifiers="const"> <return type="Vector2"> </return> <argument index="0" name="line" type="int"> @@ -221,6 +260,13 @@ <description> </description> </method> + <method name="get_folded_lines" qualifiers="const"> + <return type="int[]"> + </return> + <description> + Return all lines that are current folded. + </description> + </method> <method name="get_text_for_code_completion" qualifiers="const"> <return type="String"> </return> @@ -246,6 +292,13 @@ Returns [code]true[/code] if string [code]start_key[/code] exists. </description> </method> + <method name="indent_lines"> + <return type="void"> + </return> + <description> + Indents selected lines, or in the case of no selection the caret line by one. + </description> + </method> <method name="is_in_comment" qualifiers="const"> <return type="int"> </return> @@ -292,6 +345,15 @@ <description> </description> </method> + <method name="is_line_folded" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Returns whether the line at the specified index is folded or not. + </description> + </method> <method name="remove_comment_delimiter"> <return type="void"> </return> @@ -376,6 +438,37 @@ <description> </description> </method> + <method name="toggle_foldable_line"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Toggle the folding of the code block at the given line. + </description> + </method> + <method name="unfold_all_lines"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="unfold_line"> + <return type="void"> + </return> + <argument index="0" name="line" type="int"> + </argument> + <description> + Unfolds all lines that were previously folded. + </description> + </method> + <method name="unindent_lines"> + <return type="void"> + </return> + <description> + Unindents selected lines, or in the case of no selection the caret line by one. + </description> + </method> <method name="update_code_completion_options"> <return type="void"> </return> @@ -391,13 +484,13 @@ <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false"> Sets whether code completion is allowed. </member> - <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[ ]"> + <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[]"> Sets prefixes that will trigger code completion. </member> - <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[ ]"> + <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[]"> Sets the comment delimiters. All existing comment delimiters will be removed. </member> - <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="[ ]"> + <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="[]"> Sets the string delimiters. All existing string delimiters will be removed. </member> <member name="draw_bookmarks" type="bool" setter="set_draw_bookmarks_gutter" getter="is_drawing_bookmarks_gutter" default="false"> @@ -410,8 +503,23 @@ </member> <member name="draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false"> </member> + <member name="indent_automatic" type="bool" setter="set_auto_indent_enabled" getter="is_auto_indent_enabled" default="false"> + Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. + </member> + <member name="indent_automatic_prefixes" type="String[]" setter="set_auto_indent_prefixes" getter="get_auto_indent_prefixes" default="["(", ":", "[", "{"]"> + Prefixes to trigger an automatic indent. + </member> + <member name="indent_size" type="int" setter="set_indent_size" getter="get_indent_size" default="4"> + Size of tabs, if [code]indent_use_spaces[/code] is enabled the amount of spaces to use. + </member> + <member name="indent_use_spaces" type="bool" setter="set_indent_using_spaces" getter="is_indent_using_spaces" default="false"> + Use spaces instead of tabs for indentation. + </member> <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" /> - <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[ ]" /> + <member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="true"> + Sets whether line folding is allowed. + </member> + <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[]" /> <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" override="true" enum="Control.TextDirection" default="1" /> <member name="zero_pad_line_numbers" type="bool" setter="set_line_numbers_zero_padded" getter="is_line_numbers_zero_padded" default="false"> </member> @@ -452,69 +560,71 @@ </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)"> </theme_item> <theme_item name="bookmark" type="Texture2D"> </theme_item> - <theme_item name="bookmark_color" type="Color" default="Color( 0.5, 0.64, 1, 0.8 )"> + <theme_item name="bookmark_color" type="Color" default="Color(0.5, 0.64, 1, 0.8)"> </theme_item> - <theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )"> + <theme_item name="brace_mismatch_color" type="Color" default="Color(1, 0.2, 0.2, 1)"> </theme_item> <theme_item name="breakpoint" type="Texture2D"> </theme_item> - <theme_item name="breakpoint_color" type="Color" default="Color( 0.9, 0.29, 0.3, 1 )"> + <theme_item name="breakpoint_color" type="Color" default="Color(0.9, 0.29, 0.3, 1)"> </theme_item> <theme_item name="can_fold" type="Texture2D"> </theme_item> - <theme_item name="caret_background_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)"> </theme_item> - <theme_item name="caret_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> </theme_item> - <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )"> + <theme_item name="code_folding_color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)"> </theme_item> <theme_item name="completion" type="StyleBox"> </theme_item> - <theme_item name="completion_background_color" type="Color" default="Color( 0.17, 0.16, 0.2, 1 )"> + <theme_item name="completion_background_color" type="Color" default="Color(0.17, 0.16, 0.2, 1)"> </theme_item> - <theme_item name="completion_existing_color" type="Color" default="Color( 0.87, 0.87, 0.87, 0.13 )"> + <theme_item name="completion_existing_color" type="Color" default="Color(0.87, 0.87, 0.87, 0.13)"> </theme_item> - <theme_item name="completion_font_color" type="Color" default="Color( 0.67, 0.67, 0.67, 1 )"> + <theme_item name="completion_font_color" type="Color" default="Color(0.67, 0.67, 0.67, 1)"> </theme_item> <theme_item name="completion_lines" type="int" default="7"> </theme_item> <theme_item name="completion_max_width" type="int" default="50"> </theme_item> - <theme_item name="completion_scroll_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="completion_scroll_color" type="Color" default="Color(1, 1, 1, 1)"> </theme_item> <theme_item name="completion_scroll_width" type="int" default="3"> </theme_item> - <theme_item name="completion_selected_color" type="Color" default="Color( 0.26, 0.26, 0.27, 1 )"> + <theme_item name="completion_selected_color" type="Color" default="Color(0.26, 0.26, 0.27, 1)"> </theme_item> - <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )"> + <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> </theme_item> <theme_item name="executing_line" type="Texture2D"> </theme_item> - <theme_item name="executing_line_color" type="Color" default="Color( 0.98, 0.89, 0.27, 1 )"> + <theme_item name="executing_line_color" type="Color" default="Color(0.98, 0.89, 0.27, 1)"> </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> <theme_item name="folded" type="Texture2D"> </theme_item> + <theme_item name="folded_eol_icon" type="Texture2D"> + </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [CodeEdit]. </theme_item> - <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> </theme_item> <theme_item name="font_size" type="int"> Font size of the [CodeEdit]'s text. </theme_item> - <theme_item name="line_number_color" type="Color" default="Color( 0.67, 0.67, 0.67, 0.4 )"> + <theme_item name="line_number_color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)"> </theme_item> <theme_item name="line_spacing" type="int" default="4"> </theme_item> @@ -525,15 +635,15 @@ </theme_item> <theme_item name="read_only" type="StyleBox"> </theme_item> - <theme_item name="safe_line_number_color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )"> + <theme_item name="safe_line_number_color" type="Color" default="Color(0.67, 0.78, 0.67, 0.6)"> </theme_item> - <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> + <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> </theme_item> <theme_item name="space" type="Texture2D"> </theme_item> <theme_item name="tab" type="Texture2D"> </theme_item> - <theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )"> + <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> </theme_item> </theme_items> </class> |