Example #1
0
//------------------------------------
// Find / Replace
//------------------------------------
void FindReplaceHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event)
{
    LEditor *editor = dynamic_cast<LEditor*>(owner);
    if ( editor ) {
        if ( event.GetId() == wxID_FIND ) {
            clMainFrame::Get()->GetMainBook()->ShowQuickBar( editor ? editor->GetSelectedText() : "" );

        } else if ( event.GetId() == wxID_REPLACE ) {
            editor->DoFindAndReplace(true);

        }

    } else if ( event.GetId() == wxID_FIND ) {
        clMainFrame::Get()->GetMainBook()->ShowQuickBarForPlugins();
    }
}