summaryrefslogtreecommitdiff
path: root/scene/gui/line_edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/line_edit.h')
-rw-r--r--scene/gui/line_edit.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index e364a79c83..221dd9eb2e 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -97,6 +97,7 @@ private:
float full_width = 0.0;
bool selecting_enabled = true;
+ bool deselect_on_focus_loss_enabled = true;
bool context_menu_enabled = true;
PopupMenu *menu = nullptr;
@@ -126,7 +127,13 @@ private:
bool virtual_keyboard_enabled = true;
+ bool middle_mouse_paste_enabled = true;
+
+ bool drag_action = false;
+ bool drag_caret_force_displayed = false;
+
Ref<Texture2D> right_icon;
+ bool flat = false;
struct Selection {
int begin = 0;
@@ -136,7 +143,6 @@ private:
bool creating = false;
bool double_click = false;
bool drag_attempt = false;
- uint64_t last_dblclk = 0;
} selection;
struct TextOperation {
@@ -153,6 +159,9 @@ private:
bool pressing_inside = false;
} clear_button_status;
+ uint64_t last_dblclk = 0;
+ Vector2 last_dblclk_pos;
+
bool caret_blink_enabled = false;
bool caret_force_displayed = false;
bool draw_caret = true;
@@ -164,7 +173,7 @@ private:
void _clear_redo();
void _create_undo_state();
- int _get_menu_action_accelerator(const String &p_action);
+ Key _get_menu_action_accelerator(const String &p_action);
void _shape();
void _fit_to_width();
@@ -185,7 +194,6 @@ private:
void _toggle_draw_caret();
void clear_internal();
- void changed_internal();
void _editor_settings_changed();
@@ -229,6 +237,9 @@ public:
void select_all();
void selection_delete();
void deselect();
+ bool has_selection() const;
+ int get_selection_from_column() const;
+ int get_selection_to_column() const;
void delete_char();
void delete_text(int p_from_column, int p_to_column);
@@ -313,12 +324,21 @@ public:
void set_virtual_keyboard_enabled(bool p_enable);
bool is_virtual_keyboard_enabled() const;
+ void set_middle_mouse_paste_enabled(bool p_enabled);
+ bool is_middle_mouse_paste_enabled() const;
+
void set_selecting_enabled(bool p_enabled);
bool is_selecting_enabled() const;
+ void set_deselect_on_focus_loss_enabled(const bool p_enabled);
+ bool is_deselect_on_focus_loss_enabled() const;
+
void set_right_icon(const Ref<Texture2D> &p_icon);
Ref<Texture2D> get_right_icon();
+ void set_flat(bool p_enabled);
+ bool is_flat() const;
+
virtual bool is_text_field() const override;
void show_virtual_keyboard();