Exemple #1
0
void csDiagramView::OnClear(wxCommandEvent& WXUNUSED(event))
{
    wxList selections;
    FindSelectedShapes(selections);

    DoCut(selections);
}
Exemple #2
0
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;
    }
}
Exemple #3
0
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;
    }
}
Exemple #4
0
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);
}
Exemple #5
0
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();
}