summaryrefslogtreecommitdiff
path: root/doc/classes/CodeEdit.xml
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2021-03-13 14:09:49 +0000
committerPaulb23 <p_batty@hotmail.co.uk>2021-06-01 17:07:01 +0100
commit5c618dd03dd4fe1ada234e91a08bcf12eb8f7aa7 (patch)
treeb3ad6de556128dede27bc654cb1a9e6fc48fdafb /doc/classes/CodeEdit.xml
parentc5f237eaf8e46e55699a3e95956daec65f5aa963 (diff)
Move code folding into CodeEdit and hide line hiding API
Diffstat (limited to 'doc/classes/CodeEdit.xml')
-rw-r--r--doc/classes/CodeEdit.xml70
1 files changed, 70 insertions, 0 deletions
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index 4076198df6..fcd36447c5 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -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,22 @@
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="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>
@@ -221,6 +246,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>
@@ -292,6 +324,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 +417,30 @@
<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="update_code_completion_options">
<return type="void">
</return>
@@ -411,6 +476,9 @@
<member name="draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false">
</member>
<member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" />
+ <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">
@@ -500,6 +568,8 @@
</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 )">