docs
Docs
C++ API
C API
Search API
Ctrl K
1.4
2.0
latest
1.4
Ultralight C++ API
1.4.0
Toggle main menu visibility
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
9
#include <
Ultralight/Defines.h
>
10
#include <
Ultralight/String.h
>
11
12
namespace
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
///
25
class
UExport
Clipboard
{
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
UExport
#define UExport
Definition
Exports.h:25
String.h
Defines.h
ultralight::Clipboard
User-defined clipboard interface.
Definition
Clipboard.h:25
ultralight::Clipboard::ReadPlainText
virtual String ReadPlainText()=0
Read plain text from the clipboard.
ultralight::Clipboard::~Clipboard
virtual ~Clipboard()
ultralight::Clipboard::Clear
virtual void Clear()=0
Clear the clipboard.
ultralight::Clipboard::WritePlainText
virtual void WritePlainText(const String &text)=0
Write plain text to the clipboard.
ultralight::String
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition
String.h:34
ultralight
Definition
Bitmap.h:14
Ultralight
platform
Clipboard.h
Docs
C++ API
C API
Version
1.4
2.0
latest
1.4