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 $
========================================================================*/
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)
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).
virtual void bbUserOnHide() {}
//==================================================================
+ // LG 24/11/08 : New widget pipeline
+ void bbCreateWidgetAndEventHandler(wxWindow* parent);
+
+
protected:
//==================================================================
/// 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.
/// 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); \
}