diff options
Diffstat (limited to 'scene/gui/line_edit.h')
-rw-r--r-- | scene/gui/line_edit.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index d31a5cb8d8..5fceedbf26 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -39,7 +39,6 @@ class LineEdit : public Control { public: enum Align { - ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, @@ -80,7 +79,7 @@ private: PopupMenu *menu; int cursor_pos; - int window_pos; + int scroll_offset; int max_length; // 0 for no maximum. int cached_width; @@ -90,6 +89,8 @@ private: bool shortcut_keys_enabled; + bool virtual_keyboard_enabled = true; + Ref<Texture2D> right_icon; struct Selection { @@ -104,7 +105,7 @@ private: struct TextOperation { int cursor_pos; - int window_pos; + int scroll_offset; int cached_width; String text; }; @@ -134,6 +135,7 @@ private: void update_placeholder_width(); bool caret_blink_enabled; + bool caret_force_displayed; bool draw_caret; bool window_has_focus; @@ -141,7 +143,8 @@ private: void shift_selection_check_post(bool); void selection_fill_at_cursor(); - void set_window_pos(int p_pos); + void set_scroll_offset(int p_pos); + int get_scroll_offset() const; void set_cursor_at_pixel_pos(int p_x); int get_cursor_pixel_pos(); @@ -164,11 +167,11 @@ public: void set_align(Align p_align); Align get_align() const; - virtual Variant get_drag_data(const Point2 &p_point); - virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const; - virtual void drop_data(const Point2 &p_point, const Variant &p_data); + virtual Variant get_drag_data(const Point2 &p_point) override; + virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const override; + virtual void drop_data(const Point2 &p_point, const Variant &p_data) override; - virtual CursorShape get_cursor_shape(const Point2 &p_pos) const; + virtual CursorShape get_cursor_shape(const Point2 &p_pos) const override; void menu_option(int p_option); void set_context_menu_enabled(bool p_enable); @@ -201,6 +204,9 @@ public: float cursor_get_blink_speed() const; void cursor_set_blink_speed(const float p_speed); + bool cursor_get_force_displayed() const; + void cursor_set_force_displayed(const bool p_enabled); + void copy_text(); void cut_text(); void paste_text(); @@ -216,7 +222,7 @@ public: void set_secret_character(const String &p_string); String get_secret_character() const; - virtual Size2 get_minimum_size() const; + virtual Size2 get_minimum_size() const override; void set_expand_to_text_length(bool p_enabled); bool get_expand_to_text_length() const; @@ -227,13 +233,16 @@ public: void set_shortcut_keys_enabled(bool p_enabled); bool is_shortcut_keys_enabled() const; + void set_virtual_keyboard_enabled(bool p_enable); + bool is_virtual_keyboard_enabled() const; + void set_selecting_enabled(bool p_enabled); bool is_selecting_enabled() const; void set_right_icon(const Ref<Texture2D> &p_icon); Ref<Texture2D> get_right_icon(); - virtual bool is_text_field() const; + virtual bool is_text_field() const override; LineEdit(); ~LineEdit(); }; |