Loading...
Searching...
No Matches
Clipboard.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * This file is a part of Ultralight. *
3 * *
4 * See <https://ultralig.ht> for licensing and more. *
5 * *
6 * (C) 2024 Ultralight, Inc. *
7 **************************************************************************************************/
8#pragma once
10#include <Ultralight/String.h>
11
12namespace ultralight {
13
14///
15/// User-defined clipboard interface.
16///
17/// The library uses this to read and write data to the system's clipboard.
18///
19/// AppCore automatically provides a platform-specific implementation of this that cuts, copies,
20/// and pastes to the OS clipboard when you call App::Create().
21///
22/// If you are using Renderer::Create() instead of App::Create(), you will need to provide your own
23/// implementation of this. @see Platform::set_clipboard().
24///
26 public:
27 virtual ~Clipboard();
28
29 ///
30 /// Clear the clipboard.
31 ///
32 virtual void Clear() = 0;
33
34 ///
35 /// Read plain text from the clipboard
36 ///
37 /// This is called when the library wants to read text from the OS clipboard.
38 ///
39 virtual String ReadPlainText() = 0;
40
41 ///
42 /// Write plain text to the clipboard.
43 ///
44 /// This is called when the library wants to write text to the OS clipboard.
45 ///
46 virtual void WritePlainText(const String& text) = 0;
47};
48
49} // namespace ultralight
#define UExport
Definition Exports.h:25
User-defined clipboard interface.
Definition Clipboard.h:25
virtual String ReadPlainText()=0
Read plain text from the clipboard.
virtual void Clear()=0
Clear the clipboard.
virtual void WritePlainText(const String &text)=0
Write plain text to the clipboard.
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition String.h:34
Definition App.h:14