summaryrefslogtreecommitdiffstats
path: root/tests/display_server_mock.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-04-30 17:03:04 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-04-30 17:03:04 +0200
commite19b808a7afa498921beee95ec15321ab29b735d (patch)
tree0924bc49b4ac76790316b07086338f358e763846 /tests/display_server_mock.h
parentd9bf750cbf9b24103f85f43856e771fb739df4c8 (diff)
parent773a473807c75975b5820b30a4f0eccaece7cfa2 (diff)
downloadredot-engine-e19b808a7afa498921beee95ec15321ab29b735d.tar.gz
Merge pull request #86978 from kitbdev/multicaret-overhaul
Overhaul multicaret editing and selection in TextEdit
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 ee7433fcbd..fd79a46c5c 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);
}