]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Fri, 12 Dec 2008 12:56:28 +0000 (12:56 +0000)
committerguigues <guigues>
Fri, 12 Dec 2008 12:56:28 +0000 (12:56 +0000)
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkWxBlackBox.cxx
packages/wx/bbs/appli/wxTour.bbs
packages/wx/src/bbwxLayoutSplit.cxx
packages/wxvtk/bbs/boxes/bbDoubleSlicer.bbs
packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbs

index fc5f3f1..7356fd2 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/12/12 12:11:21 $
-  Version:   $Revision: 1.79 $
+  Date:      $Date: 2008/12/12 12:56:28 $
+  Version:   $Revision: 1.80 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -684,7 +684,6 @@ namespace bbtk
 void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
 {
     bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretLine(\""<<line<<"\")"<<std::endl);
-    bbtkMessage("echo",2,line<<std::endl);
 
     std::vector<std::string> words;
     SplitLine(line,words);
@@ -743,8 +742,28 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
     int level=0;
     std::string left,right,left2,right2;
     std::string filename;
+    if (command.code==cMessage)
+      {
+       if (words.size()<3)
+         {
+           mVirtualExecuter->HelpMessages();
+         }
+        else
+         {
+           sscanf(words[2].c_str(),"%d",&level);
+           mVirtualExecuter->SetMessageLevel(words[1],level);
+         }
+      }
+    else 
+      {
+       bbtkMessage("echo",2,line<<std::endl);
+      }
+
     switch (command.code) 
     {
+      case cMessage : 
+      
+        break;
       case cNew :
         mVirtualExecuter->Create(words[1],words[2]);
         break;
@@ -861,17 +880,6 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
         Help(words);
         break;
 
-      case cMessage : 
-        if (words.size()<3)
-        {
-         mVirtualExecuter->HelpMessages();
-        }
-        else
-        {
-         sscanf(words[2].c_str(),"%d",&level);
-          mVirtualExecuter->SetMessageLevel(words[1],level);
-        }
-        break;
 
       case cGraph :
         Graph(words);
index 3c99040..91d1085 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/12/11 09:50:35 $
-  Version:   $Revision: 1.35 $
+  Date:      $Date: 2008/12/12 12:56:28 $
+  Version:   $Revision: 1.36 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -95,6 +95,7 @@ namespace bbtk
     bbtkDebugMessage("wx",9,"WxBlackBoxWindow::bbShow()"<<std::endl);
     Wx::IncNbWindowsShown();
     mShown = true;
+    if (bbGetBlackBox()) bbGetBlackBox()->bbUserOnShow();
   }
   //=========================================================================
 
@@ -248,19 +249,19 @@ namespace bbtk
     bbtkDebugMessage("wx",5,"WxBlackBoxFrame::bbShow("
                     <<bbGetBlackBox()->bbGetFullName()<<")"<<std::endl);
     WxBlackBoxWindow::bbShow();
-  wxFrame::Show();
+    wxFrame::Show();
     // This Update is ** MANDATORY ** 
     // to synchronize wxvtkRenderWindowInteractor objects
     // (force wx objects creation **NOW**)
-
-
+    
+    
 #if defined(_WIN32)
-      wxFrame::Refresh();
+    wxFrame::Refresh();
 #endif
-
-      wxFrame::Update();
-      wxFrame::SetFocus();
-    if (bbGetBlackBox()) bbGetBlackBox()->bbUserOnShow();
+    
+    wxFrame::Update();
+    wxFrame::SetFocus();
+    //    if (bbGetBlackBox()) bbGetBlackBox()->bbUserOnShow();
   }
   //=========================================================================
 
index d22aaca..3f27202 100644 (file)
@@ -5,7 +5,7 @@ category "demo"
 include wx
 #==================================================================
 print " "
-print "===================================================="
+print "============================"
 print "A Slider whose output is plugged into an OutputText"
 message echo 2
 
@@ -39,14 +39,14 @@ exec main
 message echo 0
 clear
 print " "
-print "===================================================="
+print "============================"
 print "Splitting a window into two adjustable parts"
 #==================================================================
 message echo 2
 
 new LayoutSplit main
-set main.WinDialog true
 
+set main.WinDialog true
 exec main
 
 #==================================================================
index c5d6cf9..45e3ea5 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutSplit.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/24 15:45:51 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/12/12 12:56:33 $
+  Version:   $Revision: 1.9 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -99,6 +99,7 @@ namespace bbwx
   // when window is shown
   void  LayoutSplit::OnShowWidget()
   {
+    //    std::cout << "LayoutSplit::OnShowWidget()" << std::endl;
     if (bbGetOutputWidget()==0)
       {
        return;
index b779d44..595744f 100644 (file)
@@ -7,12 +7,15 @@ define DoubleSlicer wxvtk
  description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#exampleDoubleSlicer'>exampleDoubleSlicer.bbs</a>."
  author "laurent.guigues at creatis.insa-lyon.fr"
 
- new LayoutLine main
+ new LayoutSplit main
  new LayoutLine slicers
  new Viewer2D slicer1
  new Viewer2D slicer2
  new Slider slider
 
+ set main.Proportion 80
+ set slicers.Orientation HORIZONTAL
+
  connect slicers.Widget main.Widget1
  connect slicer1.Widget slicers.Widget1
  connect slicer2.Widget slicers.Widget2
@@ -39,6 +42,7 @@ define DoubleSlicer wxvtk
  input In1 slicer1.In "Left (or top) image"
  input In2 slicer2.In "Right (or bottom) image"
 
+ input WinDialog main.WinDialog "Execute in dialog mode"
  input WinTitle main.WinTitle "Title of the window"
  input WinWidth main.WinWidth "Width of the window"
  input WinHeight main.WinHeight "Width of the window"
index 89796ae..99d9b70 100644 (file)
@@ -29,6 +29,7 @@ define SimpleSlicer wxvtk
  #set main.Proportion 80
 
  input In viewer2D.In "Input image"
+ input WinDialog main.WinDialog "Execute in dialog mode"
  input WinTitle main.WinTitle "Title of the window"
  input WinWidth main.WinWidth "Width of the window"
  input WinHeight main.WinHeight "Height of the window"