bool EditorApplication::OnInit() { COCA_DEBUG_INFO( "EditorApplication::OnInit" ); SetAppName( "coca editor" ); // coca resource manager _resourceManager.createThread(); // frame EditorFrame* frame = new EditorFrame( 0, E_ID_EDITOR_FRAME, "coca editor", wxDefaultPosition, wxSize( 800, 600 ) ); SetTopWindow( frame ); readConfig(); loadPlugins(); createDocumentTemplates(); _documentManager.SetMaxDocsOpen( 1 ); frame->Show(); COCA_DEBUG_INFO( "EditorApplication::OnInit finished" ); return true; }
void MainBook::DetachActiveEditor() { if(GetActiveEditor()) { LEditor* editor = GetActiveEditor(); m_book->RemovePage(m_book->GetSelection(), true); EditorFrame* frame = new EditorFrame(clMainFrame::Get(), editor); frame->Show(); m_detachedEditors.push_back(frame); } }
bool EditorApp::OnInit() { //(*AppInitialize bool wxsOK = true; wxInitAllImageHandlers(); if ( wxsOK ) { EditorFrame* Frame = new EditorFrame(0); Frame->Show(); SetTopWindow(Frame); } //*) return wxsOK; }
void BdayFrame::editFile( const wxFileName & file, const wxString & title ) { wxWindowList & wnds = GetChildren(); for ( wxWindowList::iterator it = wnds.begin(); it != wnds.end(); ++it ) if ( ( *it )->IsKindOf(CLASSINFO(wxFrame)) ) if ( ((wxFrame *)( *it ))->GetTitle().IsSameAs(title) ) { ( *it )->Raise(); return; } EditorFrame * frame = new EditorFrame(this, file, title); if ( frame->hasError() ) { wxMessageDialog mb(this, frame->getError(), GetTitle(), wxOK| wxICON_ERROR); mb.ShowModal(); } else { frame->Show(true); } }