summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/text_edit.h')
-rw-r--r--scene/gui/text_edit.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 0d0f4f6dba..fdaa928598 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -189,6 +189,7 @@ private:
int get_max_width() const;
void set_width(float p_width);
+ float get_width() const;
int get_line_wrap_amount(int p_line) const;
Vector<Vector2i> get_line_wrap_ranges(int p_line) const;
@@ -249,6 +250,19 @@ private:
String ime_text = "";
Point2 ime_selection;
+ // Placeholder
+ float placeholder_alpha = 0.6;
+
+ String placeholder_text = "";
+ Array placeholder_bidi_override;
+ Ref<TextParagraph> placeholder_data_buf;
+ int placeholder_line_height = -1;
+ int placeholder_max_width = -1;
+
+ Vector<String> placeholder_wraped_rows;
+
+ void _update_placeholder();
+
/* Initialise to opposite first, so we get past the early-out in set_editable. */
bool editable = false;
@@ -667,6 +681,12 @@ public:
String get_text() const;
int get_line_count() const;
+ void set_placeholder(const String &p_text);
+ String get_placeholder() const;
+
+ void set_placeholder_alpha(float p_alpha);
+ float get_placeholder_alpha() const;
+
void set_line(int p_line, const String &p_new_text);
String get_line(int p_line) const;