initToolbar();
initTabPanelsManager();
initPackageBrowser();
- initHelpHTMLBrowser();
-
+ // JGGR & CM initHelpHTMLBrowser();
+ _helpHtmlBrowser = NULL;
CreateStatusBar();
_frameAUIMgr->Update();
_actualPkgBrowserBoxName = "";
// connect command event handlers
+
Connect(ID_NEW, wxEVT_COMMAND_TOOL_CLICKED,
wxCommandEventHandler(wxGUIEditorGraphicBBS::OnCreateNewTab));
Connect(ID_OPEN, wxEVT_COMMAND_TOOL_CLICKED,
}
//=========================================================================
void wxGUIEditorGraphicBBS::initHelpHTMLBrowser() {
- //TO FIX THE PATH OF BBTK BIN IN ORDER TO USE REGENERATE EXECUTABLES
- //RegenerateAll();
+ // JGRR & CM
_helpHtmlBrowser = new WxGUIHtmlBrowser(this, wxSize(200, 0));
- _frameAUIMgr->AddPane(_helpHtmlBrowser, wxAuiPaneInfo().Right().MinSize(
- 200, 200));
+
+ // EO JGRR & CM
+
}
//=========================================================================
//=========================================================================
std::string wxGUIEditorGraphicBBS::CheckExtension(std::string filename, std::string extension) {
- if(extension.size() != 4){
- printf("CheckExtension Warning! Extension size != 4\n");
- }else{
- if(filename.size() > 4){
- if( (filename.compare(filename.size()-4,4,extension)) !=0 ){
- filename.append(extension);
- }
- }else{
- filename.append(extension);
+ if(filename.size() > extension.size() ){
+ if( (filename.compare(filename.size()-extension.size(), extension.size(),extension)) !=0 ){
+ filename.append(extension);
}
+ }else{
+ filename.append(extension);
}
return filename;
}
wxString fileName = openFileDialog->GetPath();
ifstream inputStream;
std::string fName = (const char*) (fileName.mb_str());
+
inputStream.open(fName.c_str());
+ assert(inputStream.good()); // fails
_tabsMgr->addNewTab(openFileDialog->GetFilename());
-
_tabsMgr->loadDiagram(inputStream, fName);
inputStream.close();
//=========================================================================
void wxGUIEditorGraphicBBS::OnEditConfig(wxCommandEvent& event) {
printf("EED wxGUIEditorGraphicBBS::OnEditConfig ... not implemented ..\n");
-}
-//=========================================================================
-void wxGUIEditorGraphicBBS::OnShowHTMLDoc(wxCommandEvent& event) {
- printf("EED wxGUIEditorGraphicBBS::OnShowHTMLDoc ... not implemented ..\n");
+ }
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::OnShowHTMLDoc(wxCommandEvent& event) {
+ // JGRR & CM WH
+ if (_helpHtmlBrowser != NULL){
+ _frameAUIMgr->DetachPane(_helpHtmlBrowser);
+ _helpHtmlBrowser->Destroy();
+ }
+ initHelpHTMLBrowser();
+ _frameAUIMgr->AddPane(_helpHtmlBrowser, wxAuiPaneInfo().Right().MinSize(200, 200));
+ _frameAUIMgr->Update();
+ refreshGUIControls();
+
+ // EO JGRR & CM WH
}
//=========================================================================
void wxGUIEditorGraphicBBS::OnCreateIndex(wxCommandEvent& event) {
Close(true);
}
+
+
//=========================================================================
} // EO namespace bbtk