diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-06-16 20:11:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 20:11:39 +0200 |
commit | 341cb8da311698d685b390524d0f20795f1774d7 (patch) | |
tree | 7e565ed6fe2a0691a33b0d18b2cdf1103aab53ec /scene/gui/code_edit.h | |
parent | 48fe9c97948f44125e68f3b8f67eaaf032c763bd (diff) | |
parent | 5c618dd03dd4fe1ada234e91a08bcf12eb8f7aa7 (diff) | |
download | redot-engine-341cb8da311698d685b390524d0f20795f1774d7.tar.gz |
Merge pull request #49238 from Paulb23/code_edit_code_folding
Move code folding into CodeEdit and hide line hiding API
Diffstat (limited to 'scene/gui/code_edit.h')
-rw-r--r-- | scene/gui/code_edit.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h index 6305eacf83..52b3f52a03 100644 --- a/scene/gui/code_edit.h +++ b/scene/gui/code_edit.h @@ -98,6 +98,9 @@ private: void _gutter_clicked(int p_line, int p_gutter); void _update_gutter_indexes(); + /* Line Folding */ + bool line_folding_enabled = true; + /* Delimiters */ enum DelimiterType { TYPE_STRING, @@ -241,6 +244,21 @@ public: void set_draw_fold_gutter(bool p_draw); bool is_drawing_fold_gutter() const; + /* Line Folding */ + void set_line_folding_enabled(bool p_enabled); + bool is_line_folding_enabled() const; + + bool can_fold_line(int p_line) const; + + void fold_line(int p_line); + void unfold_line(int p_line); + void fold_all_lines(); + void unfold_all_lines(); + void toggle_foldable_line(int p_line); + + bool is_line_folded(int p_line) const; + TypedArray<int> get_folded_lines() const; + /* Delimiters */ void add_string_delimiter(const String &p_start_key, const String &p_end_key, bool p_line_only = false); void remove_string_delimiter(const String &p_start_key); |