TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::IClipboard Class Referenceabstract

The clipboard text editors copy to and paste from, and images go through; GUIApplication::SetClipboard sets one (default: SDL's, or LocalClipboard without SDL). More...

#include <gui_core/text/gui_clipboard.h>

Inheritance diagram for tachyon::IClipboard:

Public Member Functions

virtual ~IClipboard ()=default
virtual std::string Get () const =0
 The clipboard's text, UTF-8; empty when it holds none.
virtual void Set (std::string_view text)=0
 Puts UTF-8 text on the clipboard.
virtual bool HasImage () const
 Whether the clipboard holds an image. A clipboard without images says no.
virtual ClipboardImage GetImage () const
 The clipboard's image; an empty one when it holds none, or it can't be read.
virtual bool SetImage (const ClipboardImage &image)
 Puts an image on the clipboard.

Detailed Description

The clipboard text editors copy to and paste from, and images go through; GUIApplication::SetClipboard sets one (default: SDL's, or LocalClipboard without SDL).

The clipboard holds one thing: setting text drops an image, and the other way round.

Constructor & Destructor Documentation

◆ ~IClipboard()

virtual tachyon::IClipboard::~IClipboard ( )
virtualdefault

Member Function Documentation

◆ Get()

virtual std::string tachyon::IClipboard::Get ( ) const
pure virtual

The clipboard's text, UTF-8; empty when it holds none.

Implemented in tachyon::LocalClipboard, and tachyon::SDLClipboard.

◆ Set()

virtual void tachyon::IClipboard::Set ( std::string_view text)
pure virtual

Puts UTF-8 text on the clipboard.

Implemented in tachyon::LocalClipboard, and tachyon::SDLClipboard.

◆ HasImage()

virtual bool tachyon::IClipboard::HasImage ( ) const
inlinevirtual

Whether the clipboard holds an image. A clipboard without images says no.

Reimplemented in tachyon::LocalClipboard, and tachyon::SDLClipboard.

◆ GetImage()

virtual ClipboardImage tachyon::IClipboard::GetImage ( ) const
inlinevirtual

The clipboard's image; an empty one when it holds none, or it can't be read.

Reimplemented in tachyon::LocalClipboard, and tachyon::SDLClipboard.

◆ SetImage()

virtual bool tachyon::IClipboard::SetImage ( const ClipboardImage & image)
inlinevirtual

Puts an image on the clipboard.

False when it's empty, or this clipboard can't hold images; the clipboard then stays as it was.

Reimplemented in tachyon::LocalClipboard, and tachyon::SDLClipboard.


The documentation for this class was generated from the following file: