The Battle for Wesnoth  1.15.0-dev
Functions
desktop::clipboard Namespace Reference

Functions

void copy_to_clipboard (const std::string &text, const bool mouse)
 Copies text to the clipboard. More...
 
std::string copy_from_clipboard (const bool mouse)
 Copies text from the clipboard. More...
 
void handle_system_event (const SDL_Event &)
 
bool available ()
 Whether wesnoth was compiled with support for a clipboard. More...
 

Function Documentation

◆ available()

bool desktop::clipboard::available ( )

◆ copy_from_clipboard()

std::string desktop::clipboard::copy_from_clipboard ( const bool  mouse)

Copies text from the clipboard.

Parameters
mouseIs the pasting done by the mouse?
Returns
String on clipbaord.

Definition at line 40 of file clipboard.cpp.

Referenced by gui2::password_box::paste_selection(), and gui2::text_box_base::paste_selection().

◆ copy_to_clipboard()

void desktop::clipboard::copy_to_clipboard ( const std::string &  text,
const bool  mouse 
)

◆ handle_system_event()

void desktop::clipboard::handle_system_event ( const SDL_Event &  )

Definition at line 52 of file clipboard.cpp.

Referenced by events::run_event_loop().