Esempio n. 1
0
// ----------------------------------------------------------------------------
void ThreadSearchFrame::OnSearchFindNext(wxCommandEvent& event)
// ----------------------------------------------------------------------------
{
    //(pecan 2008/7/20) FullSearch
    //Don't search in preview pane, and don't search if no editor is open
    ScbEditor* sEd = GetConfig()->GetEditorManager(this)->GetBuiltinActiveEditor();
    if (not sEd)
        return;
    if (not ((wxWindow*)(sEd->GetControl()) == wxWindow::FindFocus()))
        return;

    bool bNext = !(event.GetId() == idSearchFindPrevious);
    //-Manager::Get()->GetEditorManager()->FindNext(bNext);
    GetConfig()->GetEditorManager(this)->FindNext(bNext);
} // end of OnSearchFindNext
Esempio n. 2
0
//PrintDialog::PrintDialog(wxWindow* parent)
SPrintDialog::SPrintDialog(wxWindow* parent, SEditorManager* edMgr)
{
	//ctor
	wxXmlResource::Get()->LoadObject(this, parent, _T("dlgPrint"),_T("wxScrollingDialog"));

	//-cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
	ScbEditor* ed = edMgr->GetBuiltinActiveEditor();
	if (ed)
	{
        bool hasSel = ed->GetControl()->GetSelectedText().Length();
        XRCCTRL(*this, "rbScope", wxRadioBox)->SetSelection(hasSel ? 0 : 1);
	}
	else
        XRCCTRL(*this, "rbScope", wxRadioBox)->SetSelection(1);

    int mode = Manager::Get()->GetConfigManager(_T("app"))->ReadInt(_T("/print_mode"), 1);
    XRCCTRL(*this, "rbColourMode", wxRadioBox)->SetSelection(mode);
    bool print_line_numbers = Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/print_line_numbers"), true);
    XRCCTRL(*this, "chkLineNumbers", wxCheckBox)->SetValue(print_line_numbers);
}
Esempio n. 3
0
// ----------------------------------------------------------------------------
void ThreadSearchFrame::OnSearchFind(wxCommandEvent& event)
// ----------------------------------------------------------------------------
{
    //(pecan 2008/7/20)
    //Don't search in preview pane, and don't search if no editor is open
    ScbEditor* sEd = GetConfig()->GetEditorManager(this)->GetBuiltinActiveEditor();
    if (not sEd)
        return;
    if (not ((wxWindow*)(sEd->GetControl()) == wxWindow::FindFocus()))
        return;

    bool bDoMultipleFiles = (event.GetId() == idSearchFindInFiles);
    if(!bDoMultipleFiles)
    {
        //-bDoMultipleFiles = !Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
        bDoMultipleFiles = not GetConfig()->GetEditorManager(this)->GetBuiltinActiveEditor();
    }
    //-Manager::Get()->GetEditorManager()->ShowFindDialog(false, bDoMultipleFiles);
    GetConfig()->GetEditorManager(this)->ShowFindDialog(false, false);
}// end of OnSearchFind