]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxBlackBox.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxBlackBox.h
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);             \
   }