| 123 | } |
| 124 | |
| 125 | std::string GetClipboard() { |
| 126 | wxString data; |
| 127 | wxClipboard *cb = wxClipboard::Get(); |
| 128 | if (cb->Open()) { |
| 129 | if (cb->IsSupported(wxDF_TEXT) || cb->IsSupported(wxDF_UNICODETEXT)) { |
| 130 | wxTextDataObject raw_data; |
| 131 | cb->GetData(raw_data); |
| 132 | data = raw_data.GetText(); |
| 133 | } |
| 134 | cb->Close(); |
| 135 | } |
| 136 | return from_wx(data); |
| 137 | } |
| 138 | |
| 139 | void SetClipboard(std::string const& new_data) { |
| 140 | wxClipboard *cb = wxClipboard::Get(); |
no test coverage detected