Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::InMemoryClipboard Class Referencefinal

In-memory ClipboardInterface backed by a single std::string member. More...

#include "donner/editor/InMemoryClipboard.h"

Inheritance diagram for donner::editor::InMemoryClipboard:
[legend]
Collaboration diagram for donner::editor::InMemoryClipboard:
[legend]

Public Member Functions

 InMemoryClipboard (const InMemoryClipboard &)=delete
InMemoryClipboard & operator= (const InMemoryClipboard &)=delete
 InMemoryClipboard (InMemoryClipboard &&)=delete
InMemoryClipboard & operator= (InMemoryClipboard &&)=delete
std::string getText () const override
 Returns the current clipboard contents, or an empty string if the clipboard is empty / unavailable.
void setText (std::string_view text) override
 Replaces the clipboard contents with text.
bool hasText () const override
 Returns true if the clipboard currently contains non-empty text.

Detailed Description

In-memory ClipboardInterface backed by a single std::string member.

Copying from one InMemoryClipboard and pasting into another does not share state — each instance owns its own buffer.

Member Function Documentation

◆ getText()

std::string donner::editor::InMemoryClipboard::getText ( ) const
inlinenodiscardoverridevirtual

Returns the current clipboard contents, or an empty string if the clipboard is empty / unavailable.

Implements donner::editor::ClipboardInterface.

◆ hasText()

bool donner::editor::InMemoryClipboard::hasText ( ) const
inlinenodiscardoverridevirtual

Returns true if the clipboard currently contains non-empty text.

Implements donner::editor::ClipboardInterface.

◆ setText()

void donner::editor::InMemoryClipboard::setText ( std::string_view text)
inlineoverridevirtual

Replaces the clipboard contents with text.

Implements donner::editor::ClipboardInterface.


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