예제 #1
0
파일: view.cpp 프로젝트: EdgarTx/wx
void csDiagramView::OnClear(wxCommandEvent& WXUNUSED(event))
{
    wxList selections;
    FindSelectedShapes(selections);

    DoCut(selections);
}
예제 #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;
    }
}
예제 #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;
    }
}
예제 #4
0
파일: view.cpp 프로젝트: EdgarTx/wx
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);
}
예제 #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();
}