Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
Language: C++
- Date: $Date: 2008/04/18 12:59:16 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/04/25 07:33:17 $
+ Version: $Revision: 1.8 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
mWxGUICommand->SetFocus();
- // Creates and sets the parent window of all bbtk windows
- wxWindow* top = new wxPanel(this,-1);//,_T("top"));
- top->Hide();
- Wx::SetTopWindow(top);
+ /*
-
+ mwxNotebook = new wxAuiNotebook(this,
+ -1,
+ wxPoint(0, 0),
+ wxSize(500,500),
+ wxAUI_NB_TAB_SPLIT
+ | wxAUI_NB_TAB_MOVE
+ | wxAUI_NB_TAB_EXTERNAL_MOVE
+ //| wxAUI_NB_WINDOWLIST_BUTTON
+ //|wxAUI_NB_SCROLL_BUTTONS
+ // | wxAUI_NB_CLOSE_BUTTON
+ //| wxAUI_NB_CLOSE_ON_ACTIVE_TAB
+ //| wxAUI_NB_CLOSE_ON_ALL_TABS
+ | wxNO_BORDER);
+ */
//
m_mgr.AddPane(mWxGUITextEditor,
wxAuiPaneInfo().Name(wxT("editor_content"))
.MaximizeButton(true)
.Center()
.MinSize(wxSize(100,100))
- );
+ );
+
m_mgr.AddPane(mWxGUIHtmlBrowser,
wxAuiPaneInfo().Name(wxT("browser_content"))
.Caption(wxT("Help"))
.MinimizeButton(true)
.MaximizeButton(true)
.Right()
- .MinSize(wxSize(100,100))
+ .MinSize(wxSize(200,100))
);
+
m_mgr.AddPane(mWxGUIOutputMessages,
wxAuiPaneInfo().Name(wxT("messages_content"))
.Caption(wxT("Messages"))
// m_mgr.AddPane(mwxButtonRun,
// wxAuiPaneInfo().Name(wxT("button_run_content")));
+ // Creates the parent window of all bbtk windows as a child of this
+ Wx::CreateTopWindow(this);
+ // Add the method OnWxSignal as a Wx::Signal observer
+ //bbtkAddWxSignalObserver(WxGUIPackageBrowser2Window::OnWxSignal);
//.PaneBorder(false));
m_mgr.Update();
//================================================================
#define CATCH_MACRO \
+ catch (QuitException e) \
+ { \
+ std::cout << "* quit exception caught"<<std::endl; \
+ } \
catch (InterpreterError e) \
{ \
std::cerr << "* IERROR : "<<e.GetMessage()<<std::endl; \
(*buf) << mWxGUITextEditor->GetCurrentPage()->GetText();
try
{
+ std::cout << "RUN"<<std::endl;
if (mwxMenuItemReset->IsChecked()) WxGUICommandEnter("reset");
mInterpreter->InterpretBuffer(buf);
+ std::cout << "EO RUN"<<std::endl;
}
- CATCH_MACRO
+ CATCH_MACRO;
+ std::cout << "EO RUN 3"<<std::endl;
}
//================================================================
commandStr = "gedit ";
#endif
commandStr = commandStr + configFile;
- std::cout << "system: " << commandStr << std::endl;
+ // std::cout << "system: " << commandStr << std::endl;
system ( commandStr.c_str() );
}
//================================================================
std::string strappli="gnome-open ";
#endif
std::string strcommand = strappli +default_temp_dir+"/temp_dir/workspace_workspacePrototype.png";
- std::cout << "system: " << strcommand << std::endl;
+ // std::cout << "system: " << strcommand << std::endl;
system ( strcommand.c_str() );
}
//================================================================
bool WxGUIScriptingInterface::WxGUIHtmlBrowserUserOnLinkClicked(const std::string& target)
{
- std::cout << "OnLink"<<std::endl;
size_t s = target.length();
if ((s>3) && (target[s-1]=='s')
&& (target[s-2]=='b')