summaryrefslogtreecommitdiffstats
path: root/tests/display_server_mock.h
diff options
context:
space:
mode:
authorkit <kitbdev@gmail.com>2024-01-22 18:27:19 -0500
committerkit <kitbdev@gmail.com>2024-04-26 14:26:10 -0400
commit773a473807c75975b5820b30a4f0eccaece7cfa2 (patch)
treef85a6731796d8dc9a8f76f8db117eea63a0fdda4 /tests/display_server_mock.h
parent154f727c7a7b766e5a2013c6eeb17fb843e9d7a4 (diff)
downloadredot-engine-773a473807c75975b5820b30a4f0eccaece7cfa2.tar.gz
Overhaul multiple caret editing in TextEdit.
Use a multicaret edit to delay merging overlapping carets until the end.
Diffstat (limited to 'tests/display_server_mock.h')
-rw-r--r--tests/display_server_mock.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/display_server_mock.h b/tests/display_server_mock.h
index 8d8a678e20..9cce95f9b5 100644
--- a/tests/display_server_mock.h
+++ b/tests/display_server_mock.h
@@ -47,6 +47,9 @@ private:
Callable event_callback;
Callable input_event_callback;
+ String clipboard_text;
+ String primary_clipboard_text;
+
static Vector<String> get_rendering_drivers_func() {
Vector<String> drivers;
drivers.push_back("dummy");
@@ -97,6 +100,8 @@ public:
switch (p_feature) {
case FEATURE_MOUSE:
case FEATURE_CURSOR_SHAPE:
+ case FEATURE_CLIPBOARD:
+ case FEATURE_CLIPBOARD_PRIMARY:
return true;
default: {
}
@@ -131,6 +136,11 @@ public:
virtual Point2i mouse_get_position() const override { return mouse_position; }
+ virtual void clipboard_set(const String &p_text) override { clipboard_text = p_text; }
+ virtual String clipboard_get() const override { return clipboard_text; }
+ virtual void clipboard_set_primary(const String &p_text) override { primary_clipboard_text = p_text; }
+ virtual String clipboard_get_primary() const override { return primary_clipboard_text; }
+
virtual Size2i window_get_size(WindowID p_window = MAIN_WINDOW_ID) const override {
return Size2i(1920, 1080);
}