]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Mon, 24 Nov 2008 15:45:46 +0000 (15:45 +0000)
committerguigues <guigues>
Mon, 24 Nov 2008 15:45:46 +0000 (15:45 +0000)
26 files changed:
kernel/appli/bbfy/bbfy.cpp
kernel/src/bbtkWxBlackBox.cxx
kernel/src/bbtkWxBlackBox.h
kernel/src/bbtkWxGUIHtmlBrowser.cxx
kernel/src/bbtkWxGUIHtmlBrowser.h
packages/wx/src/bbwxColourSelectorButton.cxx
packages/wx/src/bbwxColourSelectorButton.h
packages/wx/src/bbwxCommandButton.cxx
packages/wx/src/bbwxCommandButton.h
packages/wx/src/bbwxInputText.cxx
packages/wx/src/bbwxInputText.h
packages/wx/src/bbwxLayoutLine.cxx
packages/wx/src/bbwxLayoutLine.h
packages/wx/src/bbwxLayoutSplit.cxx
packages/wx/src/bbwxLayoutSplit.h
packages/wx/src/bbwxLayoutTab.cxx
packages/wx/src/bbwxLayoutTab.h
packages/wx/src/bbwxOutputText.xml
packages/wx/src/bbwxRadioButton.cxx
packages/wx/src/bbwxRadioButton.h
packages/wx/src/bbwxSlider.cxx
packages/wx/src/bbwxSlider.h
packages/wxvtk/src/bbwxvtkViewer2D.cxx
packages/wxvtk/src/bbwxvtkViewer2D.h
packages/wxvtk/src/bbwxvtkViewer3D.cxx
packages/wxvtk/src/bbwxvtkViewer3D.h

index 58407a5699490cbe899703f05e54fd47faea1b36..db4161bbc8833c8806ee65370649b6b1e5a9e80c 100644 (file)
@@ -719,7 +719,7 @@ void bbfy::CreateHeader()
   if (mIsWidget) 
     {
        mFile << "  BBTK_CREATE_WIDGET(CreateWidget);\n" ;
-       mFile << "  void CreateWidget();\n";
+       mFile << "  void CreateWidget(wxWindow*);\n";
     }
 
 
@@ -1039,7 +1039,7 @@ void bbfy::CreateCode()
   // CreateWidget
   if (mIsWidget)
     {
-      mFile << "void "<<mName<<"::CreateWidget()\n{\n";
+      mFile << "void "<<mName<<"::CreateWidget(wxWindow* parent)\n{\n";
       mFile << mCreateWidget << "\n";
       mFile << "}\n";
     }
index 208ad9dfeec119ce22102f10a9bdbd24b572537c..a5f2ce099e3fd2a2047c1ff4465b041797284812 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/17 10:00:24 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2008/11/24 15:45:48 $
+  Version:   $Revision: 1.30 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -142,8 +142,10 @@ namespace bbtk
                     <<title<<",size)"<<std::endl);
     // Insert the widget into the window
     wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+         // LG 22/11/08 : new widget pipeline
+         bbGetBlackBox()->bbCreateWidgetAndEventHandler(this);
     wxWindow* widget = bbGetBlackBox()->bbGetOutputWidget();
-    widget->Reparent(this);
+// old :    widget->Reparent(this);
     sizer->Add( widget, 1, wxALL|wxEXPAND, 2);
     //SetAutoLayout(true);
     SetSizer(sizer);
@@ -218,9 +220,11 @@ namespace bbtk
                     <<title<<",size)"<<std::endl);
     // Insert the widget into the window
     wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+         // LG 22/11/08 : new widget pipeline
+         bbGetBlackBox()->bbCreateWidgetAndEventHandler(this);
     wxWindow* widget = bbGetBlackBox()->bbGetOutputWidget();
     wxFrame* frame = (wxFrame*)this;
-    widget->Reparent(frame);
+// old :    widget->Reparent(frame);
     sizer->Add( widget, 1, wxALL|wxGROW, 2);
     //  frame->SetAutoLayout(true);
     frame->SetSizer(sizer);
@@ -553,13 +557,133 @@ namespace bbtk
   //=========================================================================
   void WxBlackBox::bbProcess()
   { 
-    if (bbGetOutputWidget()==0) this->bbUserCreateWidget();
+/*
+         if (bbGetOutputWidget()==0) this->bbUserCreateWidget();
     this->bbUserProcess(); 
     bbShowWindow();
     //    this->bbUserOnShow();
+*/
+         // LG 22/11/08 : new widget pipeline
+         // If output widget not connected : 
+         if ( (*bbGetOutputConnectorMap().find("Widget")).second
+                 ->GetConnectionVector().size() == 0 ) 
+      {
+                 Window* show = 0;
+                 // If the window already exists : no need creating it
+                 if (bbGetWindow()!=0)
+                 {
+                         bbtkDebugMessage("wx",2,
+                                                          "-> Window already exists"
+                                                          <<std::endl);
+                         show = bbGetWindow();
+                 }
+                 // Else create window 
+                 else 
+                 {
+                         bbtkDebugMessage("wx",2,
+                                                          "-> Creating the window"
+                                                          <<std::endl);
+                         
+                         
+                         // Input WinDialog set to true : creating a Dialog
+                         if (bbGetInputWinDialog()) 
+                         {
+                                 bbtkDebugMessage("wx",2,
+                                                                  "   Input WinDialog set to true : creating a Dialog"
+                                                                  <<std::endl);
+                                 show = (Window*) new WxBlackBoxDialog( GetThisPointer<WxBlackBox>(),
+                                                                                                               // bbGetWxParent(), 
+                                                                                                               // LG 24/11/08 : New widget pipeline
+                                                                                                               Wx::GetTopWindow(),
+                                                                                                               std2wx( bbGetInputWinTitle() + " - bbtk (c) CREATIS LRMN"),
+                                                                                                               wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
+                         }
+                         // Input WinDialog set to false : creating a Frame
+                         else 
+                         {
+                                 bbtkDebugMessage("process",2,
+                                                                  "   Input WinDialog set to false : creating a Frame"
+                                                                  <<std::endl);
+                                 show = (Window*) new WxBlackBoxFrame( GetThisPointer<WxBlackBox>(),
+                                                                                                          // bbGetWxParent(), 
+                                                                                                          // LG 24/11/08 : New widget pipeline
+                                                                                                          Wx::GetTopWindow(),
+                                                                                                          std2wx( bbGetInputWinTitle()  + " - bbtk (c) CREATIS LRMN"),
+                                                                                                          wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
+                         }
+                                                 
+                 }
+               
+                 // Show the window
+                 show->bbShow(); 
+                 
+                 
+         }               
+         this->bbUserProcess(); 
+         
   }
   //=========================================================================
-  
+       
+       
+       // LG 24/11/08 : New widget pipeline
+       void WxBlackBox::bbCreateWidgetAndEventHandler(wxWindow* parent)
+       {
+               if (bbGetOutputWidget()==0)
+               {
+                       this->bbUserCreateWidget(parent);
+               }               
+               // If Event Handler for the widget does not exist or is obsolete : create it 
+               if (bbGetOutputWidget()!=0)
+               {
+                       if (bbGetWidgetEventHandler()==0)
+                       {
+                               bbtkDebugMessage("wx",3,
+                                                                "-> No widget event handler : creating one"
+                                                                <<std::endl);
+                               new WxBlackBoxWidgetEventHandler(GetThisPointer<WxBlackBox>(),
+                                                                                                bbGetOutputWidget());
+                       }
+                       else if ( ! bbGetWidgetEventHandler()->IsHandlerOf 
+                                        ( bbGetOutputWidget() ) )
+                       {
+                               bbtkDebugMessage("wx",3,
+                                                                "-> Obsolete widget event handler : re-creating one"
+                                                                <<std::endl);
+                               delete bbGetWidgetEventHandler();
+                               new WxBlackBoxWidgetEventHandler(GetThisPointer<WxBlackBox>(),
+                                                                                                bbGetOutputWidget());
+                       }
+                       // Sets the name of the wxWindow to the input WinTitle
+                       bbGetOutputWidget()->SetName(bbtk::std2wx(bbGetInputWinTitle()));
+               }
+               
+               
+       }
+
+
+       
+       wxWindow*  WxBlackBox::bbCreateWidgetOfInput(const std::string& in, wxWindow* parent)
+       {
+               wxWindow* w = 0;
+               // If input is connected 
+               BlackBoxInputConnector* c = bbGetInputConnectorMap().find(in)->second ;
+               if ( c->IsConnected() )                 
+               {
+                       // Get black box from 
+                       BlackBox::Pointer from = 
+                       c->GetConnection()->GetBlackBoxFrom();
+                       // Cast it into a WxBlackBox
+                       WxBlackBox::Pointer wfrom = boost::dynamic_pointer_cast<WxBlackBox>(from);
+                       // Call bbCreateWidgetAndEventHandler
+                       wfrom->bbCreateWidgetAndEventHandler(parent);
+                       // Get the widget created
+                       w = wfrom->bbGetOutputWidget();
+               }
+               return w;
+       }
+
+       /*
   //==================================================================
   /// Specific methods for window creation during pipeline execution
   /// Shows the window associated to the box 
@@ -631,7 +755,9 @@ namespace bbtk
                             "   Input WinDialog set to true : creating a Dialog"
                             <<std::endl);
            show = (Window*) new WxBlackBoxDialog( GetThisPointer<WxBlackBox>(),
-                                                  bbGetWxParent(), 
+                                                 // bbGetWxParent(), 
+                                                                                         // LG 24/11/08 : New widget pipeline
+                                                                                         Wx::GetTopWindow(),
                                                   std2wx( bbGetInputWinTitle() + " - bbtk (c) CREATIS LRMN"),
                                                   wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
          }
@@ -642,7 +768,9 @@ namespace bbtk
                             "   Input WinDialog set to false : creating a Frame"
                             <<std::endl);
            show = (Window*) new WxBlackBoxFrame( GetThisPointer<WxBlackBox>(),
-                                                 bbGetWxParent(), 
+                                                 // bbGetWxParent(), 
+                                                                                        // LG 24/11/08 : New widget pipeline
+                                                                                        Wx::GetTopWindow(),
                                                  std2wx( bbGetInputWinTitle()  + " - bbtk (c) CREATIS LRMN"),
                                                  wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
          }
@@ -673,7 +801,7 @@ namespace bbtk
 
   }
   //==================================================================
-
+*/
 
 
 
@@ -722,7 +850,8 @@ namespace bbtk
 
 
   //==================================================================
-  wxWindow* WxBlackBox::bbGetWxParent() { return Wx::GetTopWindow(); }
+       // LG 24/11/08 : New widget pipeline
+       //  wxWindow* WxBlackBox::bbGetWxParent() { return Wx::GetTopWindow(); }
   //==================================================================
   
   
index bfa37e78cfd215cfa9d0b6e7c9ab045acd6d2f1a..e8acc44ab0c7cb55b56128cea2a06b3cc715ddc9 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:43 $
-  Version:   $Revision: 1.19 $
+  Date:      $Date: 2008/11/24 15:45:48 $
+  Version:   $Revision: 1.20 $
 ========================================================================*/
 
 
@@ -77,14 +77,13 @@ namespace bbtk
   class BBTK_EXPORT WxBlackBox : public bbtk::AtomicBlackBox  
   { 
     BBTK_BLACK_BOX_INTERFACE(WxBlackBox,bbtk::AtomicBlackBox);
-    //   BBTK_DECLARE_INPUT(WinParent,WxParentToChildData*);
     BBTK_DECLARE_INPUT(WinTitle,std::string);
     BBTK_DECLARE_INPUT(WinWidth,int);
     BBTK_DECLARE_INPUT(WinHeight,int);
     BBTK_DECLARE_INPUT(WinDialog,bool);
     BBTK_DECLARE_INPUT(WinHide,Void);
     BBTK_DECLARE_INPUT(WinClose,Void);
-    BBTK_DECLARE_OUTPUT(Widget, wxWindow*);//WxBlackBoxWidget*);
+    BBTK_DECLARE_OUTPUT(Widget, wxWindow*);
 
   public:
     /// Main processing method of the box. Overloaded to handle windows inclusion : if the output Widget is connected then the execution is transfered to the box to which it is connected (as the container window must be created and displayed - this box will be executed by the normal pipeline recursion mechanism)
@@ -108,7 +107,9 @@ namespace bbtk
     Window* bbGetContainingWindow();
 
     /// Returns the parent wxWindow that must be used to create the widget 
-    wxWindow* bbGetWxParent();
+         //
+         // LG 24/11/08 : New widget pipeline
+         //    wxWindow* bbGetWxParent();
 
     /// Returns true iff the 'containing window' exists and is shown 
     /// (see bbGetContainingWindow).
@@ -124,6 +125,10 @@ namespace bbtk
     virtual void bbUserOnHide() {}
     //==================================================================    
 
+         // LG 24/11/08 : New widget pipeline
+         void bbCreateWidgetAndEventHandler(wxWindow* parent); 
+
+         
   protected:
     
   
@@ -139,14 +144,16 @@ namespace bbtk
     //==================================================================    
     /// User callback for creating the widget associated to the box
     /// ** Must be defined **
-    virtual void bbUserCreateWidget() 
+         // LG 24/11/08 : New widget pipeline
+         virtual void bbUserCreateWidget(wxWindow* parent) 
     {
       bbtkError(bbGetTypeName()<<" is a WxBlackBox whose bbUserCreateWidget methods is not overloaded : is it a feature or a bug ?!?");
     }
     //==================================================================    
 
 
-    
+         wxWindow* bbCreateWidgetOfInput(const std::string& in, wxWindow* parent);
+
 
     //==================================================================
     /// Main processing method of the box.
@@ -222,11 +229,11 @@ namespace bbtk
   /// Defines the bbUserCreateWidget method
 #define BBTK_CREATE_WIDGET(CALLBACK)                                   \
   public:                                                              \
-  inline void bbUserCreateWidget()                                     \
+  inline void bbUserCreateWidget(wxWindow* parent)                                     \
   {                                                                    \
     bbtkDebugMessageInc("wx",1,"**> Creating widget for ["             \
                        <<bbGetFullName()<<"]"<<std::endl);             \
-    CALLBACK();                                                                \
+    CALLBACK(parent);                                                          \
     bbtkDebugMessageInc("wx",1,"<** Creating widget for ["             \
                        <<bbGetFullName()<<"]"<<std::endl);             \
   }
index 9d82ec22c82b473de142d1cc95b8bf481ff63485..3ac89b63a291b462d273c882149570a3c42a3dde 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIHtmlBrowser.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:15 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/11/24 15:45:48 $
+  Version:   $Revision: 1.11 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -66,28 +66,20 @@ namespace bbtk
       reload_id,
       include_id,
       url_id  ,
-      html_id
+      html_id = 10100
     };
 
 
-/*EED
+/*
   //========================================================================
   void WxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& e)
   {
         std::cout  << "WxHtmlWindow::OnLink"<<std::endl;
     //    std::cout  << e.GetHref()<<std::endl;
-    LoadPage(e.GetHref());
-    if ( ! GetOpenedAnchor().IsEmpty() )
-      { 
-       //      std::cout << "#" << GetOpenedAnchor() << std::endl;
-       LoadPage(_T("#"+GetOpenedAnchor()));
-      }
-    mBrowser->UpdateURL();
+    mBrowser->OnLinkClicked2(e);
   }
-  //========================================================================
 */
 
-
 //EED2  BEGIN_EVENT_TABLE(WxHtmlWindow, wxPanel)
 //EED2    EVT_SIZE(WxHtmlWindow::OnSize)
 //EED2  END_EVENT_TABLE()
@@ -108,7 +100,7 @@ namespace bbtk
     EVT_BUTTON(reload_id, WxGUIHtmlBrowser::OnReloadButton )
   //    EVT_BUTTON(include_id, WxGUIHtmlBrowser::OnIncludeFileButton )
     EVT_TEXT_ENTER(url_id, WxGUIHtmlBrowser::OnURLEnter )
-    EVT_HTML_LINK_CLICKED(html_id, WxGUIHtmlBrowser::OnLinkClicked)
+   EVT_HTML_LINK_CLICKED(html_id, WxGUIHtmlBrowser::OnLinkClicked)
     EVT_SIZE(WxGUIHtmlBrowser::OnSize)
 
   END_EVENT_TABLE()
@@ -161,8 +153,13 @@ namespace bbtk
     bsizer->Add(mwxURL, 1, wxEXPAND);
 
 
-//    mwxHtmlWindow = new WxHtmlWindow(parent,html_id,this,size);
-    mwxHtmlWindow = new WxHtmlWindow(this,html_id,this,size);
+//    mwxHtmlWindow = new WxHtmlWindow(this,html_id,this,size);
+
+         mwxHtmlWindow = new wxHtmlWindow(this,html_id,
+                                                                        wxDefaultPosition, 
+                                                                        size,
+                                                                        wxHW_SCROLLBAR_AUTO, 
+                                                                        _T("bbtk::WxGUIHtmlBrowser"));
 
     /*
 
@@ -180,21 +177,12 @@ namespace bbtk
                                             wxDefaultPosition, 
                                             size ),
                            wxVERTICAL );
-//EED    hw->Add ( mwxHtmlWindow, 1, wxGROW  );
-    hw->Add ( mwxHtmlWindow, 1, wxEXPAND  );
-
-
 
-
-
-    //sizer->Add ( mwxHtmlWindow, 1, wxGROW  );
-//EED    sizer->Add ( hw, 1, wxGROW ); // | wxLEFT | wxRIGHT | wxBOTTOM, 10 );
+         hw->Add ( mwxHtmlWindow, 1, wxEXPAND  );
 
     sizer->Add ( bsizer , 0, wxEXPAND );
     sizer->Add ( hw, 1, wxGROW ); // | wxLEFT | wxRIGHT | wxBOTTOM, 10 );
 
-
-
     panel      -> SetSizer(sizer);
     panel      -> SetAutoLayout(true);
     panel      -> Layout();
@@ -299,11 +287,29 @@ namespace bbtk
   }
   //========================================================================
   
-
+       //========================================================================
+       void WxGUIHtmlBrowser::OnLinkClicked2(const wxHtmlLinkInfo& info)
+       {
+               std::cout << "OLK2"<<std::endl;
+               bool go = true;
+               if (mUser) 
+               {
+                       wxString file = info.GetHref();
+                       go = mUser->WxGUIHtmlBrowserUserOnLinkClicked( wx2std( file ) );
+               }
+               if (go) 
+               {
+                       mwxHtmlWindow->LoadPage( info.GetHref() );
+                       UpdateURL();
+               }
+               
+               
+       }
+               
   //========================================================================
   void WxGUIHtmlBrowser::OnLinkClicked(wxHtmlLinkEvent& e)
   { 
-  
+         std::cout << "OLK"<<std::endl;
     bool go = true;
     if (mUser) 
       {
index 14183b8fe1b597fba594008af20062b1e50872a9..174258cb16f17c0ff89fc71211b546774a2b7f95 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIHtmlBrowser.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:15 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/24 15:45:48 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -58,6 +58,7 @@ namespace bbtk
 
   class WxGUIHtmlBrowser;
 
+
   class WxHtmlWindow : public virtual wxHtmlWindow
   {
   public:
@@ -69,10 +70,11 @@ namespace bbtk
                  _T("bbtk::WxGUIHtmlBrowser")),
              mBrowser(browser)
     {
+               std::cout << "ctor"<<std::endl;
      SetBorders(30);
     };
     //    wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,const wxString& url, wxString *redirect);
-//EED    virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
+//   virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
 
 //EED2  void OnSize( wxSizeEvent&);
 
@@ -85,7 +87,11 @@ namespace bbtk
 
   };
 
+//     typedef wxHtmlWindow WxHtmlWindow;
   
+       
+#define THE_HTML_WINDOW_CLASS wxHtmlWindow
+       
   /// Abstract class which defines the callbacks invoked by WxGUIHtmlBrowser
   class WxGUIHtmlBrowserUser 
   {
@@ -117,6 +123,7 @@ namespace bbtk
     void OnReloadButton(wxCommandEvent& );
     //   void OnRunButton(wxCommandEvent& );
     void OnLinkClicked(wxHtmlLinkEvent& );
+       void OnLinkClicked2(const wxHtmlLinkInfo& );
     void OnURLEnter( wxCommandEvent&);
     void OnSize( wxSizeEvent&);
 
@@ -128,7 +135,7 @@ namespace bbtk
     std::string GetCurrentPage();
 
   private:
-    WxHtmlWindow* mwxHtmlWindow;
+    THE_HTML_WINDOW_CLASS * mwxHtmlWindow;
     wxTextCtrl* mwxURL;
     wxButton* mwxBackButton;
     wxButton* mwxForwardButton;
index 03a52286075cf8bff47c09105448a10ffbb7af73..9328d6ae5405c86ce1d40c7fa8261d40448fc882 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxColourSelectorButton.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.6 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -135,7 +135,7 @@ void wxColourPickerCtrlWidget::UpdateBox()
    *
    *
    */
-  void ColourSelectorButton::CreateWidget()
+  void ColourSelectorButton::CreateWidget(wxWindow* parent)
   {
     bbtkDebugMessage("Process",9,"=> ColourSelectorButton::CreateWidget()"<<std::endl);
     
@@ -146,7 +146,9 @@ void wxColourPickerCtrlWidget::UpdateBox()
     cg = (unsigned char)(255.*g);
     cb = (unsigned char)(255.*b);
 
-    pickerWidget = new wxColourPickerCtrlWidget(this, bbGetWxParent() , cr , cg , cb );    
+    pickerWidget = new wxColourPickerCtrlWidget(this, //bbGetWxParent() , 
+                                                                                               parent,
+                                                                                               cr , cg , cb );    
     
     bbtkDebugMessage("Process",9,"<= ColourSelectorButton::CreateWidget()"<<std::endl);
 
index 3606a218bdd0ce18acf059d6c3718b1e774a3a8e..c8deb653a65021913537900427758acdef764f53 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxColourSelectorButton.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -95,7 +95,7 @@ private:
     BBTK_PROCESS(Process);
     BBTK_CREATE_WIDGET(CreateWidget);
     void Process();
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
 
   protected:
     virtual void bbUserConstructor();
index a89bcc8efc717c1d1ee6e313c7751aac09e2b2f8..ca8ac024b7ee6d43798526212bb89b543e7f4a7b 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxCommandButton.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.12 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -216,11 +216,12 @@ namespace bbwx
    * 
    * 
    */  
-  void CommandButton::CreateWidget() 
+  void CommandButton::CreateWidget(wxWindow* parent
   { 
     bbSetOutputWidget
-      ( new CommandButtonWidget ( this, bbGetWxParent(), 
-                                 bbtk::std2wx(bbGetInputLabel()) ) );
+      ( new CommandButtonWidget ( this, //bbGetWxParent(), 
+                                                                parent,
+                                                                bbtk::std2wx(bbGetInputLabel()) ) );
     UpdateColour();
   } 
  
index 91964e258760a390ab74f28fc83681204bab5621..36a4f9c66b13ba89153c734dc6bf580deb9146c8 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxCommandButton.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -89,7 +89,7 @@ namespace bbwx
     BBTK_PROCESS(Process); 
     void Process(); 
     BBTK_CREATE_WIDGET(CreateWidget);
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
   protected: 
     virtual void bbUserConstructor(); 
     
index e9e2ab737f876eb5a7ce97a149d2be6164ed5125..49559feb696beccec36381a417df4a794c4916f1 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxInputText.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.4 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -127,25 +127,30 @@ namespace bbwx
   { 
     bbSetInputTitle("");
     bbSetInputIn("");
+         bbSetOutputWidget(0);
   }
   
 
   void InputText::Process() 
   { 
     InputTextWidget *w=(InputTextWidget *)bbGetOutputWidget();
-    bbSetInputIn( w->GetValue() );
-    bbSetOutputOut( w->GetValue() );
-    w->SetTitle( bbtk::std2wx ( bbGetInputTitle() ) );
+       if (w) 
+       {
+               bbSetInputIn( w->GetValue() );
+               w->SetTitle( bbtk::std2wx ( bbGetInputTitle() ) );
+       }
+       bbSetOutputOut( bbGetInputIn() );
   }
   
 
 
-  void InputText::CreateWidget()
+  void InputText::CreateWidget(wxWindow* parent)
   {
     bbSetOutputWidget
-      ( (wxWindow*) new InputTextWidget(this, bbGetWxParent(),
-                                       bbtk::std2wx ( bbGetInputIn() ) , 
-                                       bbtk::std2wx ( bbGetInputTitle() ) ) );
+      ( (wxWindow*) new InputTextWidget(this, //bbGetWxParent(),
+                                                                               parent,
+                                                                               bbtk::std2wx ( bbGetInputIn() ) , 
+                                                                               bbtk::std2wx ( bbGetInputTitle() ) ) );
        
   }
 
index f71adf17a4147dde30e5f095ba0228cb7c0fe74a..05a330ab801f57df6f1a58692ad447dcfdcd9a9e 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxInputText.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.5 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -100,7 +100,7 @@ namespace bbwx
     BBTK_PROCESS(Process);
     void Process();
     BBTK_CREATE_WIDGET(CreateWidget);
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
     
   protected:
     virtual void bbUserConstructor();
index 55be8963eb8896b90d53c7e2b2863fe1a420d858..22739baa835a0d0792f9d61a5484b8c9fd29bf1a 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutLine.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:46 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -65,6 +65,8 @@ namespace bbwx
   {
   }
   
+       
+/*
   void LayoutLine::TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer)
   {
     if (w!=NULL)
@@ -73,11 +75,13 @@ namespace bbwx
        sizer->Add(w, 1, wxEXPAND, 0);
       }
   }
-  
-  void LayoutLine::CreateWidget()
+  */
+       
+  void LayoutLine::CreateWidget(wxWindow* parent)
   {
     wxBoxSizer *sizer;
-    wxPanel *w=new wxPanel(bbGetWxParent(), -1);
+    wxPanel *w=new wxPanel(parent, //bbGetWxParent(),
+                                                  -1);
     w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
     
     int style=0;
@@ -89,7 +93,18 @@ namespace bbwx
       { style=wxVERTICAL;   }
     
     sizer      = new wxBoxSizer(style);
-    
+
+         wxWindow* cw;
+       if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0) sizer->Add(cw, 1, wxEXPAND, 0);
+         /*
     TryInsertWindow(w,bbGetInputWidget1(),sizer);
     TryInsertWindow(w,bbGetInputWidget2(),sizer);
     TryInsertWindow(w,bbGetInputWidget3(),sizer);
@@ -99,7 +114,7 @@ namespace bbwx
     TryInsertWindow(w,bbGetInputWidget7(),sizer);
     TryInsertWindow(w,bbGetInputWidget8(),sizer);
     TryInsertWindow(w,bbGetInputWidget9(),sizer);
-    
+    */
     w  -> SetSizer(sizer);
     bbSetOutputWidget( w );
   }
index 50ee0c04b26c77c2cc1ce1ba7954b498e86c6b83..e58b2c7dd225f3ec5c84cbf7c687f481d848c3af 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutLine.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:46 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -80,7 +80,7 @@ namespace bbwx
     BBTK_ON_SHOW_WIDGET(OnShowWidget);
  
     void Process();
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
     void OnShowWidget();
     
   protected:
index 939355f8d4175bf9f3cbd42f28c5eee05e6eb7a2..c5d6cf907cd4bafa44b40f5f832eefc4081416c3 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutSplit.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:46 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -58,9 +58,9 @@ namespace bbwx
   {
   }
 
-  void LayoutSplit::CreateWidget()
+  void LayoutSplit::CreateWidget(wxWindow* parent)
   {
-    wxSplitterWindow* w = new wxSplitterWindow(bbGetWxParent(),
+    wxSplitterWindow* w = new wxSplitterWindow(parent, //bbGetWxParent(),
                                               -1,
                                               wxDefaultPosition,
                                               wxDefaultSize,
@@ -68,20 +68,29 @@ namespace bbwx
                                               wxSP_3D |
                                               wxSP_LIVE_UPDATE );
     w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
-    wxWindow* w1 = bbGetInputWidget1();
+/*
+         wxWindow* w1 = bbGetInputWidget1();
     wxWindow* w2 = bbGetInputWidget2();
 
     if (w1==NULL) { w1=new wxPanel(bbGetWxParent()); }
     if (w2==NULL) { w2=new wxPanel(bbGetWxParent()); }
     w1->Reparent(w);
     w2->Reparent(w);
-    int orientation=0;
+ */ 
+
+         wxWindow* w1 = bbCreateWidgetOfInput("Widget1",w);
+         wxWindow* w2 = bbCreateWidgetOfInput("Widget2",w);
+         if (w1==NULL) { w1=new wxPanel(parent); }
+         if (w2==NULL) { w2=new wxPanel(parent); }
+         
+         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; }
     
-    if (orientation==1) { w->SplitHorizontally( w1, w2, 100); }
+
+         if (orientation==1) { w->SplitHorizontally( w1, w2, 100); }
     else                { w->SplitVertically( w1, w2, 100);   }
-    
+  
     bbSetOutputWidget( w );
   }
 
index 0db41d3a143e5fcea5b20a0c28b0e95d8cbc47b9..2b549b58605802f3497c8e6b92db8020faa700fd 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutSplit.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:46 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -71,7 +71,7 @@ namespace bbwx
     BBTK_ON_SHOW_WIDGET(OnShowWidget);
     
     void Process();
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
     void OnShowWidget();
 
   protected:
index 71db4f9b52551bae248aefa76f016ca2d4ec6f96..3bdfda97a092498224c4e8f90619afe587698a15 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutTab.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:46 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -64,7 +64,7 @@ namespace bbwx
                bbSetInputWidget8(NULL);
                bbSetInputWidget9(NULL);
        }
-
+/*
        void LayoutTab::TryInsertWindow(wxNotebook *book, wxWindow *widgetchild )
        {
                  if (widgetchild!=NULL)
@@ -74,23 +74,24 @@ namespace bbwx
                           widgetchild->Show();
                  }             
        }
-
+*/
 
        void LayoutTab::Process() 
        { 
        }
 
          
-       void LayoutTab::CreateWidget() 
+       void LayoutTab::CreateWidget(wxWindow* parent
        { 
          long style = wxNB_TOP;
          if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|T|TOP")==true)     { style=wxNB_TOP; }
          if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|R|RIGHT")==true)   { style=wxNB_RIGHT; }
          if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"2|B|BOTTOM")==true)  { style=wxNB_BOTTOM; }
          if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"3|L|LEFT")==true)    { style=wxNB_LEFT; }
-         wxNotebook *w = new wxNotebook(bbGetWxParent(), -1, wxDefaultPosition,wxDefaultSize,style );
+         wxNotebook *w = new wxNotebook(parent, //bbGetWxParent(),
+                                                                        -1, wxDefaultPosition,wxDefaultSize,style );
          w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
-                 
+                 /*
          TryInsertWindow(w,bbGetInputWidget1());
          TryInsertWindow(w,bbGetInputWidget2());
          TryInsertWindow(w,bbGetInputWidget3());
@@ -100,7 +101,7 @@ namespace bbwx
          TryInsertWindow(w,bbGetInputWidget7());
          TryInsertWindow(w,bbGetInputWidget8());
          TryInsertWindow(w,bbGetInputWidget9());
-
+*/
 
          bbSetOutputWidget( w );
        }
index 1f76929da1380c1ef64c7d8c07ea2ebaf74f7314..6d973687c9a6384e96991d632bc4a7147d3dd4b1 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutTab.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:46 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.8 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -80,7 +80,7 @@ namespace bbwx
     BBTK_ON_SHOW_WIDGET(OnShowWidget);
  
     void Process();
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
     void OnShowWidget();
 
   protected:
index 7b8af12284d199f7f3abafcf190ec442021f6eb3..c6746aaa4f2986883aecf058a57d82cfa7128c5b 100644 (file)
   <input name="In" type="std::string" description="Text"/>
 
   <createwidget><PRE>
-   bbSetOutputWidget( new wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
+   bbSetOutputWidget( new wxStaticText ( parent, /*bbGetWxParent(),*/  -1 , _T("") ) );
    Process();
   </PRE></createwidget>
  
   <process><PRE>
-   std::string msg;
-    if (bbGetInputTitle()!="")
-      {
-       msg = bbGetInputTitle()+": " + bbGetInputIn();
-      }  
-    else 
-      {
-       msg = bbGetInputIn();
-      }
-   ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) ); 
+       wxStaticText* w = (wxStaticText*)bbGetOutputWidget();
+       if (w) 
+       {
+               std::string msg;
+               if (bbGetInputTitle()!="")
+               {
+                       msg = bbGetInputTitle()+": " + bbGetInputIn();
+               }  
+               else 
+               {
+                       msg = bbGetInputIn();
+               }
+               w->SetLabel( bbtk::std2wx( msg ) ); 
+       }
   </PRE></process>
   
   <constructor><PRE> 
     bbSetInputIn("");
     bbSetInputTitle("");
+       bbSetOutputWidget(0);
   </PRE></constructor>    
 
 
index ae79162bf0f38b5126484960cb43f3b671b4fe99..69755095d1c1899394122c7afaf0ee66c6733741 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxRadioButton.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.7 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -183,7 +183,7 @@ namespace bbwx
    *
    *
    */ 
- void RadioButton::CreateWidget()
+ void RadioButton::CreateWidget(wxWindow* parent)
   {
 
     std::vector<wxString> lstIn;
@@ -200,7 +200,8 @@ namespace bbwx
 
     RadioButtonWidget *w = new RadioButtonWidget(
                          this,
-                         bbGetWxParent(),
+//                         bbGetWxParent(),
+                                                       parent, 
                          bbGetInputIn() ,
                          bbtk::std2wx(bbGetInputTitle()),
                          lstIn );
index 8889dc0d8aff959a006794dbb97c8877c7f017c5..79bcb637c391ade01b874ceb813e6eb708366a3d 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxRadioButton.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.6 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -111,7 +111,7 @@ namespace bbwx
     BBTK_CREATE_WIDGET(CreateWidget);
     BBTK_PROCESS(Process);
     void Process();
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
 
   protected:
     virtual void bbUserConstructor();
index 0636b5eddd8025029a12bb35d7a8bcee7ed064f4..49d059506fd799ee627fbd1654d29fb361eacc5a 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxSlider.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:32 $
-  Version:   $Revision: 1.14 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.15 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -368,7 +368,7 @@ namespace bbwx
     bbSetOutputOut( bbGetInputIn() );
   }
 
-  void Slider::CreateWidget()
+  void Slider::CreateWidget(wxWindow* parent)
   {
 
     int orientation=0;
@@ -378,7 +378,7 @@ namespace bbwx
     
     //    std::cout << "bbGetWxParent = "<<bbGetWxParent()<<std::endl;
     SliderWidget *w =  new SliderWidget(this, 
-                                       bbGetWxParent(),
+                                       parent, //bbGetWxParent(),
                                        orientation , 
                                        bbGetInputChangeResolution(), 
                                        bbGetInputLabel(), 
index a79960acde9888ec64728fb518011e0267912189..3bd9fed2a70ac7da17bdb66d105a31b1ef7da057 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxSlider.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:33 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2008/11/24 15:45:51 $
+  Version:   $Revision: 1.14 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -137,7 +137,7 @@ namespace bbwx
     BBTK_PROCESS(Process);
     BBTK_CREATE_WIDGET(CreateWidget);
     void Process();
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
 
   protected:
     virtual void bbUserConstructor();
index e28a457f7951757d72c3da2ef4d0f74e086191f4..ebf62d1ea2632a00305690f64a7be783302df6f5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer2D.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/20 16:32:41 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2008/11/24 15:45:53 $
+  Version:   $Revision: 1.21 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -260,11 +260,14 @@ namespace bbwxvtk
     // (see wxvtk/bbs/appli/ExampleSimpleSlicer)
     // I think there is a problem with rendering before window 
     // has been reparented ... we have to check this 
-
-    ((Viewer2DWidget*)bbGetOutputWidget())->UpdateView();
-    bbSetOutputOut( bbGetInputSlice() );
-    bbSetOutputRenderer( ((Viewer2DWidget*)bbGetOutputWidget())->GetRenderer() );
-       
+         Viewer2DWidget* w = (Viewer2DWidget*)bbGetOutputWidget(); 
+    if (w)
+       {
+               w->UpdateView();
+               bbSetOutputRenderer( ((Viewer2DWidget*)bbGetOutputWidget())->GetRenderer() );
+       }
+         bbSetOutputOut( bbGetInputSlice() );
+         
   }
   
 
@@ -272,6 +275,7 @@ namespace bbwxvtk
   {
     bbSetInputIn(NULL);
     bbSetInputSlice(0);
+         bbSetOutputWidget(0);
     bbSetInputOrientation(0);
   }
 
@@ -280,11 +284,11 @@ namespace bbwxvtk
    *
    *
    */ 
-  void Viewer2D::CreateWidget()
+  void Viewer2D::CreateWidget(wxWindow* parent)
   {
     bbtkDebugMessageInc("Core",9,"Viewer2D::CreateWidget()"<<std::endl);
 
-    Viewer2DWidget* w = new Viewer2DWidget(this,bbGetWxParent());
+         Viewer2DWidget* w = new Viewer2DWidget(this,parent);//bbGetWxParent());
     bbSetOutputWidget(w);
 
     bbtkDebugDecTab("Core",9);
index b0a9d82cd6f2ce6f50867bf06c960f1e962514e1..4ddaa9aa9cb107e5593fdfd2275d94901d3f5e98 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer2D.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:48 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/11/24 15:45:54 $
+  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
@@ -87,7 +87,7 @@ namespace bbwxvtk
     BBTK_ON_SHOW_WIDGET(OnShowWidget);
     
     void Process();
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
     void OnShowWidget();
     void bbUserConstructor();
   };
index 3f61f572cb23e413659cbbdc10d61b4c499d3dcb..228e9a4f261988d228dfd2e70470c75fccf827bf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer3D.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:48 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/11/24 15:45:54 $
+  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
@@ -161,11 +161,13 @@ void Viewer3DWidget::Refresh(bool eraseBackground , const wxRect* rect )
    *
    *
    */ 
-  void Viewer3D::CreateWidget()
+  void Viewer3D::CreateWidget(wxWindow* parent)
   {
     bbtkDebugMessageInc("Core",9,"Viewer3D::CreateWidget()"<<std::endl);
 
-    Viewer3DWidget* w = new Viewer3DWidget(this,bbGetWxParent(),bbGetInputStereo());
+    Viewer3DWidget* w = new Viewer3DWidget(this,parent,
+                                                                                  //bbGetWxParent(),
+                                                                                  bbGetInputStereo());
     w->Update();
     
 
index a493efb7df3112afb8cece092ccae01a8e540ce0..cb5e5b9960a8c32c914d9a8bd2c6013b12143f92 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer3D.h,v $
   Language:  C++
-  Date:      $Date: 2008/11/13 14:46:48 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/11/24 15:45:54 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -95,7 +95,7 @@ namespace bbwxvtk
     BBTK_ON_SHOW_WIDGET(OnShowWidget);
   
     void Process();
-    void CreateWidget();
+    void CreateWidget(wxWindow*);
     void OnShowWidget();
 
   protected: