]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxGUIScriptingInterface.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxGUIScriptingInterface.cxx
index d176ba3d31a2b1eb8adf37ddffdc7169c903362a..6ae91c60d69d82515e4242e3d43b9556439807d8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/09/10 09:25:19 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2008/10/02 13:21:11 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -39,6 +39,7 @@
 #include "bbtkWxStreamRedirector.h"
 #include "bbtkUtilities.h"
 
+#include <wx/tipwin.h>
 
 //#include "icons/cc_run.xpm"
 
@@ -233,9 +234,14 @@ namespace bbtk
     //    mwxNotebook->SetSelection(1);
     mWxGUIHtmlBrowser->GoHome();
 //    Refresh();
-//    m_mgr.Update();
+    m_mgr.Update();
     //   LoadPerspective();
 
+
+    wxTipWindow* tip = new wxTipWindow(this,
+                                      _T("\n                  Welcome to bbStudio !\n\n   To run a demo or example:\n     1. click on the 'Demos' or 'Examples' link\n     2. select a demo or example\n     3. click on the '[source]' link : the source file is loaded in bbStudio\n     4. click on the 'Run' button (the arrow at the bottom right of the source file)   \n"),1000);
+    tip->CenterOnParent();
+    tip->Show();
   }
   //================================================================
 
@@ -261,7 +267,7 @@ namespace bbtk
     }                                                                  \
   catch (InterpreterError e)                                           \
     {                                                                  \
-      std::cerr << "* IERROR : "<<e.GetMessage()<<std::endl;           \
+      std::cerr << "* IERROR : "<<e.GetErrorMessage()<<std::endl;              \
       if (e.IsInScriptFile())                                          \
        std::cerr << "* FILE   : '"<<e.GetScriptFile()<<"'"<<std::endl; \
       std::cerr << "* LINE   : "<<e.GetScriptLine()<<std::endl;                \
@@ -543,6 +549,11 @@ namespace bbtk
     f.open(fname.c_str(), std::ios::out );
     f << conf << std::endl;
 
+    //    int x,y;
+    //    GetPosition(&x,&y);
+    //    f << x << "  " << y << std::endl;
+
+
     int w,h;
     GetSize(&w,&h);
 
@@ -566,14 +577,17 @@ namespace bbtk
        std::string conf;
        f >> conf;
 
-       int w,h;
+       //      int x,y;
+       //      f >> x >> y ;
 
+       int w,h;
        f >> w >> h ;
 
        f.close();
        
        //      std::cout << conf << std::endl;
 
+       //      Move(x,y);
        SetSize(w,h);
        m_mgr.LoadPerspective(std2wx(conf));
       }