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.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index ea4f148e91..dbe6293240 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -31,6 +31,7 @@
#include "scene/gui/control.h"
#include "scene/gui/scroll_bar.h"
+#include "scene/gui/popup_menu.h"
#include "scene/main/timer.h"
@@ -290,6 +291,8 @@ class TextEdit : public Control {
DVector<int> _search_bind(const String &p_key,uint32_t p_search_flags, int p_from_line,int p_from_column) const;
+ PopupMenu *menu;
+
void _clear();
void _cancel_completion();
void _cancel_code_hint();
@@ -317,6 +320,17 @@ protected:
public:
+ enum MenuItems {
+ MENU_CUT,
+ MENU_COPY,
+ MENU_PASTE,
+ MENU_CLEAR,
+ MENU_SELECT_ALL,
+ MENU_UNDO,
+ MENU_MAX
+
+ };
+
enum SearchFlags {
SEARCH_MATCH_CASE=1,
@@ -433,6 +447,8 @@ public:
uint32_t get_saved_version() const;
void tag_saved_version();
+ void menu_option(int p_option);
+
void set_show_line_numbers(bool p_show);
void set_tooltip_request_func(Object *p_obj, const StringName& p_function, const Variant& p_udata);
@@ -442,6 +458,8 @@ public:
void set_code_hint(const String& p_hint);
void query_code_comple();
+ PopupMenu *get_menu() const;
+
String get_text_for_completion();
virtual bool is_text_field() const;