TachyonUI
1.1.0
High-performance UI for building tools.
Toggle main menu visibility
Loading...
Searching...
No Matches
gui_sdl_clipboard.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
gui_core/text/gui_clipboard.h
>
4
5
#include <cstdint>
6
#include <span>
7
#include <string_view>
8
#include <vector>
9
10
namespace
tachyon
11
{
14
std::vector<uint8_t>
EncodeClipboardImage
(
const
ClipboardImage
& image, std::string_view mimeType);
17
ClipboardImage
DecodeClipboardImage
(std::span<const uint8_t> bytes, std::string_view mimeType);
18
21
24
class
SDLClipboard
:
public
IClipboard
25
{
26
public
:
27
std::string
Get
()
const override
;
28
void
Set
(std::string_view text)
override
;
29
30
bool
HasImage
()
const override
;
31
ClipboardImage
GetImage
()
const override
;
32
bool
SetImage
(
const
ClipboardImage
& image)
override
;
33
};
34
35
}
tachyon::IClipboard
The clipboard text editors copy to and paste from, and images go through; GUIApplication::SetClipboar...
Definition
gui_clipboard.h:29
tachyon::SDLClipboard
The system clipboard, through SDL.
Definition
gui_sdl_clipboard.h:25
tachyon::SDLClipboard::SetImage
bool SetImage(const ClipboardImage &image) override
Puts an image on the clipboard.
tachyon::SDLClipboard::GetImage
ClipboardImage GetImage() const override
The clipboard's image; an empty one when it holds none, or it can't be read.
tachyon::SDLClipboard::Get
std::string Get() const override
The clipboard's text, UTF-8; empty when it holds none.
tachyon::SDLClipboard::Set
void Set(std::string_view text) override
Puts UTF-8 text on the clipboard.
tachyon::SDLClipboard::HasImage
bool HasImage() const override
Whether the clipboard holds an image. A clipboard without images says no.
gui_clipboard.h
tachyon
Definition
gui_logging.h:24
tachyon::DecodeClipboardImage
ClipboardImage DecodeClipboardImage(std::span< const uint8_t > bytes, std::string_view mimeType)
The image in the bytes of a file of mimeType ("image/png" or "image/bmp"); an empty one when they can...
tachyon::EncodeClipboardImage
std::vector< uint8_t > EncodeClipboardImage(const ClipboardImage &image, std::string_view mimeType)
An image as the bytes of a file of mimeType ("image/png" or "image/bmp"); empty when the image is,...
tachyon::ClipboardImage
An image on the clipboard: RGBA, 8 bits a channel, alpha not premultiplied, rows from the top.
Definition
gui_clipboard.h:16
gui_core
windows
sdl
gui_sdl_clipboard.h
Generated by
1.18.0