MCPcopy Create free account
hub / github.com/NatLabRockies/SAM / OnCopyData

Method OnCopyData

src/widgets.cpp:302–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300 }
301
302 void OnCopyData(wxCommandEvent &)
303 {
304 if (wxTheClipboard->Open())
305 {
306 wxString data;
307 for (int i=0;i<m_grid->GetNumberRows();i++)
308 {
309 data += m_grid->GetCellValue(i,0);
310 if (i < m_grid->GetNumberRows()-1)
311 data += '\n';
312 }
313 wxTheClipboard->SetData( new wxTextDataObject( data ) );
314 wxTheClipboard->Close();
315 }
316 }
317
318 void OnPasteData(wxCommandEvent &)
319 {

Callers

nothing calls this directly

Calls 4

OpenMethod · 0.80
GetCellValueMethod · 0.80
GetNumberRowsMethod · 0.45
SetDataMethod · 0.45

Tested by

no test coverage detected