void csDiagramView::OnClear(wxCommandEvent& WXUNUSED(event)) { wxList selections; FindSelectedShapes(selections); DoCut(selections); }
void HandleKey(EventRecord *event) { BOOLEAN appleKeyPressed = ((event->modifiers & appleKey) != 0); char key = (event->message & 0xff); if (!appleKeyPressed) return; switch (key) { case 'C': case 'c': DoCopy(); break; case 'X': case 'x': DoCut(); break; case 'V': case 'v': DoPaste(); break; } }
void HandleMenu(int menuItem) { SetPort(gCalcWinPtr); switch (menuItem) { case cutAction: DoCut(); break; case copyAction: DoCopy(); break; case pasteAction: DoPaste(); break; case clearAction: DoClear(); break; default: break; } }
void csDiagramView::OnCut(wxCommandEvent& WXUNUSED(event)) { csDiagramDocument *doc = (csDiagramDocument *)GetDocument(); // Copy the shapes to the clipboard wxGetApp().GetDiagramClipboard().Copy(doc->GetDiagram()); wxList selections; FindSelectedShapes(selections); DoCut(selections); }
void PyConsole::OnContextMenu(wxCommandEvent& event) { int id = event.GetId(); if( id == idCut ) DoCut(); else if( id == idCopy ) DoCopy(); else if( id == idPaste ) DoPaste(); else if( id == idDelete ) DoDelete(); else if( id == idSelectAll ) DoSelectAll(); }