Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
Language: C++
- Date: $Date: 2009/04/15 15:45:49 $
- Version: $Revision: 1.37 $
+ Date: $Date: 2009/11/05 16:47:42 $
+ Version: $Revision: 1.39 $
=========================================================================*/
/* ---------------------------------------------------------------------
#endif
// parent window of all bbtk windows will be a child of this
- Wx::SetTopWindowParent(this);
- // Add the method OnWxSignal as a Wx::Signal observer
+ // Wx::SetTopWindowParent(this);
+ Wx::SetTopWindow(this);
+ // Wx::SetAutoDestroyTopWindow(false);
+ // Add the method OnWxSignal as a Wx::Signal observer
//bbtkAddWxSignalObserver(WxGUIPackageBrowser2Window::OnWxSignal);
//.PaneBorder(false));
//================================================================
WxGUIScriptingInterface::~WxGUIScriptingInterface()
{
+ bbtkDebugMessage("widget",9,"bbStudio::~bbStudio()"<<std::endl);
SavePerspective();
m_mgr.UnInit();
}
//================================================================
+ //================================================================
+ void WxGUIScriptingInterface::OnClose(wxCloseEvent& event)
+ {
+ bbtkDebugMessage("widget",9,"bbStudio::OnClose()"<<std::endl);
+ //Wx::SetWindowsHaveBeenDestroyedByParent();
+ //mInterpreter.reset();
+ wxWindowList& list = GetChildren();
+ wxWindowList::iterator iter;
+ for (iter = list.begin(); iter != list.end(); ++iter)
+ {
+ (*iter)->Close();
+ }
+ this->Destroy();
+ }
+ //================================================================
+
+
//================================================================
void WxGUIScriptingInterface::Open(const std::string& filename)
{
//================================================================
void WxGUIScriptingInterface::OnMenuEditConfig(wxCommandEvent& WXUNUSED(event))
{
+
std::string configFile =
ConfigurationFile::GetInstance().Get_config_xml_full_path();
Open(configFile);
+ wxMessageDialog ww(NULL,_T("If you change the bbtk_config.xml, you have to reinicialice this appliaction..."), _T("Alert !"), wxOK);
+ ww.ShowModal();
}
//================================================================
//================================================================
BEGIN_EVENT_TABLE(WxGUIScriptingInterface, wxFrame)
+ EVT_CLOSE( WxGUIScriptingInterface::OnClose)
EVT_MENU(ID_Menu_Quit, WxGUIScriptingInterface::OnMenuQuit)
EVT_MENU(ID_Menu_About, WxGUIScriptingInterface::OnMenuAbout)
EVT_MENU(ID_Menu_EditConfig, WxGUIScriptingInterface::OnMenuEditConfig)