TachyonUI
0.1.0
High-performance UI for building tools.
Toggle main menu visibility
Loading...
Searching...
No Matches
gui_clipboard.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
#include <string_view>
5
6
namespace
tachyon
7
{
10
13
class
IClipboard
14
{
15
public
:
16
virtual
~IClipboard
() =
default
;
17
19
virtual
std::string
Get
()
const
= 0;
21
virtual
void
Set
(std::string_view text) = 0;
22
};
23
25
class
LocalClipboard
final :
public
IClipboard
26
{
27
public
:
28
std::string
Get
()
const override
{
return
m_text; }
29
void
Set
(std::string_view text)
override
{ m_text = text; }
30
31
private
:
32
std::string m_text;
33
};
34
35
}
tachyon::IClipboard
The clipboard text editors copy to and paste from; GUIApplication::SetClipboard sets one (default: SD...
Definition
gui_clipboard.h:14
tachyon::IClipboard::Set
virtual void Set(std::string_view text)=0
Puts UTF-8 text on the clipboard.
tachyon::IClipboard::Get
virtual std::string Get() const =0
The clipboard's text, UTF-8; empty when it holds none.
tachyon::IClipboard::~IClipboard
virtual ~IClipboard()=default
tachyon::LocalClipboard
A clipboard inside the process, not shared with other applications.
Definition
gui_clipboard.h:26
tachyon::LocalClipboard::Set
void Set(std::string_view text) override
Puts UTF-8 text on the clipboard.
Definition
gui_clipboard.h:29
tachyon::LocalClipboard::Get
std::string Get() const override
The clipboard's text, UTF-8; empty when it holds none.
Definition
gui_clipboard.h:28
tachyon
Definition
gui_logging.h:24
gui_core
text
gui_clipboard.h
Generated by
1.18.0