]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Mon, 10 Mar 2008 10:01:14 +0000 (10:01 +0000)
committerguigues <guigues>
Mon, 10 Mar 2008 10:01:14 +0000 (10:01 +0000)
kernel/src/bbtkWxBlackBox.cxx
kernel/src/bbtkWxConsole.cxx
packages/wx/src/bbwxLayoutLine.cxx
packages/wx/src/bbwxSlider.cxx
packages/wxvtk/bbs/appli/ExampleViewer2D.bbs
packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbs

index 06ec96786de00233ec26424bfb22e6ce7055455e..f214188a02121428c991d8a315fab4105c37fb1d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/06 09:23:43 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/03/10 10:01:14 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -594,7 +594,7 @@ namespace bbtk
                             "   Input WinDialog set to true : creating a Dialog"
                             <<std::endl);
            show = (Window*) new WxBlackBoxDialog( this,
-                                                  Wx::GetTopWindow(), 
+                                                  bbGetWxParent(), 
                                                   std2wx( bbGetInputWinTitle() + " - bbtk (c) CREATIS LRMN"),
                                                   wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
          }
@@ -605,7 +605,7 @@ namespace bbtk
                             "   Input WinDialog set to false : creating a Frame"
                             <<std::endl);
            show = (Window*) new WxBlackBoxFrame( this,
-                                                 Wx::GetTopWindow(), 
+                                                 bbGetWxParent(), 
                                                  std2wx( bbGetInputWinTitle()  + " - bbtk (c) CREATIS LRMN"),
                                                  wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
          }
index 8608437eb0d7c136275eba10050520e36ce881a6..a599ead45e684aa61e4c16d86e76e3a9d25904b4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxConsole.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/10 06:24:13 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/03/10 10:01:14 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -329,10 +329,14 @@ namespace bbtk
     mRedirect_cerr = 
       new WxTextCtrlStreamRedirector(std::cerr,mwxTextHistory,*wxGREEN,true); 
         
-    // Sets the console as the parent window of all bbtk windows
-    wxFrame* top = new wxFrame(this,-1,_T("invisible"));
+    // Creates and sets the parent window of all bbtk windows
+    wxFrame* top = new wxFrame(this,-1,_T("bbtk"),
+                              wxDefaultPosition,
+                              wxSize(0,0),
+                              wxFRAME_TOOL_WINDOW) ;//wxMINIMIZE_BOX);
     Wx::SetTopWindow(top);
-
+    //    top->Show();
+    
 
     // Layout
 //EED    SetSizer(sizer);
index 977404c1cafa7487464713f89ae27d8cc23d7de7..67404621f4d1cceadcc027c2621563819485aeee 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutLine.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/15 12:19:58 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/03/10 10:01:15 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -32,60 +32,64 @@ namespace bbwx
 {
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx, LayoutLine);
   BBTK_USER_BLACK_BOX_IMPLEMENTATION(LayoutLine,bbtk::WxBlackBox);
-
-       void LayoutLine::bbUserConstructor()
-       {
-               bbSetInputOrientation("VERTICAL");
-               bbSetInputWidget1(NULL);
-               bbSetInputWidget2(NULL);
-               bbSetInputWidget3(NULL);
-               bbSetInputWidget4(NULL);
-               bbSetInputWidget5(NULL);
-               bbSetInputWidget6(NULL);
-               bbSetInputWidget7(NULL);
-               bbSetInputWidget8(NULL);
-               bbSetInputWidget9(NULL);
-       }
-
-         void LayoutLine::Process()
-         {
-         }
-
-       void LayoutLine::TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer)
-       {
-                 if (w!=NULL)
-                 {
-                         w->Reparent(parent);
-                         sizer->Add(w, 1, wxEXPAND, 0);
-                 }
-       }
-
-         void LayoutLine::CreateWidget()
-         {
-         wxBoxSizer *sizer;
-         wxPanel *w=new wxPanel(bbGetWxParent(), -1);
-         w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
-
-         int style=0;
-      if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  { style=wxHORIZONTAL; }
-         if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)        { style=wxVERTICAL;   }
-
-         sizer = new wxBoxSizer(style);
-
-         TryInsertWindow(w,bbGetInputWidget1(),sizer);
-         TryInsertWindow(w,bbGetInputWidget2(),sizer);
-         TryInsertWindow(w,bbGetInputWidget3(),sizer);
-         TryInsertWindow(w,bbGetInputWidget4(),sizer);
-         TryInsertWindow(w,bbGetInputWidget5(),sizer);
-         TryInsertWindow(w,bbGetInputWidget6(),sizer);
-         TryInsertWindow(w,bbGetInputWidget7(),sizer);
-         TryInsertWindow(w,bbGetInputWidget8(),sizer);
-         TryInsertWindow(w,bbGetInputWidget9(),sizer);
-
-         w     -> SetSizer(sizer);
-         bbSetOutputWidget( w );
+  
+  void LayoutLine::bbUserConstructor()
+  {
+    bbSetInputOrientation("VERTICAL");
+    bbSetInputWidget1(NULL);
+    bbSetInputWidget2(NULL);
+    bbSetInputWidget3(NULL);
+    bbSetInputWidget4(NULL);
+    bbSetInputWidget5(NULL);
+    bbSetInputWidget6(NULL);
+    bbSetInputWidget7(NULL);
+    bbSetInputWidget8(NULL);
+    bbSetInputWidget9(NULL);
   }
-
+  
+  void LayoutLine::Process()
+  {
+  }
+  
+  void LayoutLine::TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer)
+  {
+    if (w!=NULL)
+      {
+       w->Reparent(parent);
+       sizer->Add(w, 1, wxEXPAND, 0);
+      }
+  }
+  
+  void LayoutLine::CreateWidget()
+  {
+    wxBoxSizer *sizer;
+    wxPanel *w=new wxPanel(bbGetWxParent(), -1);
+    w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
+    
+    int style=0;
+    if (bbtk::Utilities::loosematch(bbGetInputOrientation(),
+                                   "0|H|HORIZONTAL")==true)  
+      { style=wxHORIZONTAL; }
+    if (bbtk::Utilities::loosematch(bbGetInputOrientation(),
+                                   "1|V|VERTICAL")==true)      
+      { style=wxVERTICAL;   }
+    
+    sizer      = new wxBoxSizer(style);
+    
+    TryInsertWindow(w,bbGetInputWidget1(),sizer);
+    TryInsertWindow(w,bbGetInputWidget2(),sizer);
+    TryInsertWindow(w,bbGetInputWidget3(),sizer);
+    TryInsertWindow(w,bbGetInputWidget4(),sizer);
+    TryInsertWindow(w,bbGetInputWidget5(),sizer);
+    TryInsertWindow(w,bbGetInputWidget6(),sizer);
+    TryInsertWindow(w,bbGetInputWidget7(),sizer);
+    TryInsertWindow(w,bbGetInputWidget8(),sizer);
+    TryInsertWindow(w,bbGetInputWidget9(),sizer);
+    
+    w  -> SetSizer(sizer);
+    bbSetOutputWidget( w );
+  }
+  
 }//namespace bbwx
 
 #endif // _USE_WXWIDGETS_
index 3017b5ef0a27565123b16197d0067659fda94e45..626138093b52915d63cbc9f04382c29b94ce31d8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxSlider.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/13 15:09:37 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/03/10 10:01:15 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -351,21 +351,24 @@ namespace bbwx
   void Slider::CreateWidget()
   {
 
-        int orientation=0;
-        if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  { orientation=0; }
-        if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)    { orientation=1; }
-         
-         SliderWidget *w =  new SliderWidget(this, 
-                                               bbGetWxParent(),
-                                               orientation , 
-                                               bbGetInputChangeResolution(), 
-                                               bbGetInputLabel(), 
-                                               bbtk::std2wx( bbGetInputTitle() ),
-                                               bbGetInputMin(), 
-                                               bbGetInputMax(),
-                                               bbGetInputIn(),
-                                               bbGetInputReactiveOnTrack()
-                                               ); 
+    int orientation=0;
+    if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true)  { orientation=0; }
+    if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true)    { orientation=1; }
+    
+    
+    std::cout << "bbGetWxParent = "<<bbGetWxParent()<<std::endl;
+    SliderWidget *w =  new SliderWidget(this, 
+                                       bbGetWxParent(),
+                                       orientation , 
+                                       bbGetInputChangeResolution(), 
+                                       bbGetInputLabel(), 
+                                       bbtk::std2wx( bbGetInputTitle() ),
+                                       bbGetInputMin(), 
+                                       bbGetInputMax(),
+                                       bbGetInputIn(),
+                                       bbGetInputReactiveOnTrack()
+                                       ); 
+    std::cout << "w = "<<w<<std::endl;
          //    w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
          
     bbSetOutputWidget( w );
index 35f628e6cbfa7e223f8e262eee3af49e68bda858..7eb6c5e73e45120d8ccb63a448a6f7adb54c1f01 100644 (file)
@@ -17,6 +17,14 @@ set viewer.Slice 20
 set viewer.WinWidth 400
 set viewer.WinHeight 400
 
-exec viewer
+# BUG :
+#exec viewer
+
+# The same :
+new LayoutLine l
+connect viewer.Widget l.Widget1
+exec l
+
+
 
 
index 6f2e5b4ca2fe185e0821e55d954213593890df92..7c4b51e9d153ab9ea519060362d05229e6249851 100644 (file)
@@ -33,6 +33,6 @@ define SimpleSlicer
  input BoxExecute refresh.In2 "Execute the box"
  output Widget main.Widget "Widget"
 
- # EXECUTING THE COMPLEX BOX EXECUTES slicer
+ # EXECUTING THE COMPLEX BOX EXECUTES main
  exec main
 endefine