|
KiCad PCB EDA Suite
|
#include <memory>#include <string>#include <vector>#include <wx/buffer.h>#include <wx/string.h>Go to the source code of this file.
Classes | |
| struct | CLIPBOARD_MIME_DATA |
Functions | |
| bool | SaveClipboard (const std::string &aTextUTF8) |
| Store information to the system clipboard. | |
| bool | SaveClipboard (const std::string &aTextUTF8, const std::vector< CLIPBOARD_MIME_DATA > &aMimeData) |
| Store information to the system clipboard with additional MIME types. | |
| bool | SaveTabularDataToClipboard (const std::vector< std::vector< wxString > > &aData) |
| Store tabular data to the system clipboard. | |
| bool | GetTabularDataFromClipboard (std::vector< std::vector< wxString > > &aData) |
| Attempt to get tabular data from the clipboard. | |
| std::string | GetClipboardUTF8 () |
| Return the information currently stored in the system clipboard. | |
| std::unique_ptr< wxImage > | GetImageFromClipboard () |
| Get image data from the clipboard, if there is any. | |
| std::string GetClipboardUTF8 | ( | ) |
Return the information currently stored in the system clipboard.
If data stored in the clipboard is in non-text format, empty string is returned.
Definition at line 120 of file clipboard.cpp.
References result.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), SYMBOL_EDIT_FRAME::DuplicateSymbol(), PCB_CONTROL::Paste(), PL_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), and SYMBOL_EDITOR_EDIT_TOOL::Paste().
| std::unique_ptr< wxImage > GetImageFromClipboard | ( | ) |
Get image data from the clipboard, if there is any.
If there's a filename there, and it can be loaded as an image, do that.
Definition at line 158 of file clipboard.cpp.
References image.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PCB_CONTROL::Paste(), PL_EDIT_TOOL::Paste(), and SCH_EDITOR_CONTROL::Paste().
| bool GetTabularDataFromClipboard | ( | std::vector< std::vector< wxString > > & | aData | ) |
Attempt to get tabular data from the clipboard.
Definition at line 227 of file clipboard.cpp.
References AutoDecodeCSV().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PIN_TABLE_IMPORT::ImportData().
| bool SaveClipboard | ( | const std::string & | aTextUTF8 | ) |
Store information to the system clipboard.
| aText | is the information to be stored, expected UTF8 encoding. The text will be stored as Unicode string (not stored as UTF8 string). |
Definition at line 39 of file clipboard.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PL_EDIT_TOOL::Copy(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), SCH_EDITOR_CONTROL::CopyAsText(), SYMBOL_EDITOR_EDIT_TOOL::CopyAsText(), EDIT_TOOL::copyToClipboardAsText(), SCH_EDITOR_CONTROL::doCopy(), and SaveClipboard().
| bool SaveClipboard | ( | const std::string & | aTextUTF8, |
| const std::vector< CLIPBOARD_MIME_DATA > & | aMimeData ) |
Store information to the system clipboard with additional MIME types.
Creates a composite clipboard object with text as the primary format and additional custom MIME type data. When aMimeData is empty, falls back to SaveClipboard(aTextUTF8).
| aTextUTF8 | is the text to store, expected UTF8 encoding. Stored as primary text format. |
| aMimeData | is additional data to store by MIME type (e.g., image/svg+xml, image/png). |
Definition at line 59 of file clipboard.cpp.
References image, and SaveClipboard().
| bool SaveTabularDataToClipboard | ( | const std::vector< std::vector< wxString > > & | aData | ) |
Store tabular data to the system clipboard.
Definition at line 193 of file clipboard.cpp.
References CSV_WRITER::WriteLines().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and PIN_TABLE_EXPORT::ExportData().