Give access to the system clipboard. More...
#include <SFML/Window/Clipboard.hpp>
Static Public Member Functions | |
static String | getString () |
Get the content of the clipboard as string data. | |
static void | setString (const String &text) |
Set the content of the clipboard as string data. | |
Detailed Description
Give access to the system clipboard.
sf::Clipboard provides an interface for getting and setting the contents of the system clipboard.
It is important to note that due to limitations on some operating systems, setting the clipboard contents is only guaranteed to work if there is currently an open window for which events are being handled.
Usage example:
- See also
- sf::String, sf::Event
Definition at line 41 of file Clipboard.hpp.
Member Function Documentation
◆ getString()
|
static |
Get the content of the clipboard as string data.
This function returns the content of the clipboard as a string. If the clipboard does not contain string it returns an empty sf::String object.
- Returns
- Clipboard contents as sf::String object
◆ setString()
|
static |
Set the content of the clipboard as string data.
This function sets the content of the clipboard as a string.
- Warning
- Due to limitations on some operating systems, setting the clipboard contents is only guaranteed to work if there is currently an open window for which events are being handled.
- Parameters
-
text sf::String containing the data to be sent to the clipboard
The documentation for this class was generated from the following file: