class BBTK_EXPORT WxBlackBox : public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(WxBlackBox,bbtk::AtomicBlackBox);
class BBTK_EXPORT WxBlackBox : public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(WxBlackBox,bbtk::AtomicBlackBox);
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_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);
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)
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)
/// User callback called in the box contructor
virtual void bbUserConstructor();
/// User callback called in the box copy constructor
/// User callback called in the box contructor
virtual void bbUserConstructor();
/// User callback called in the box copy constructor
/// User callback called in the box destructor
virtual void bbUserDestructor();
//==================================================================
/// User callback called in the box destructor
virtual void bbUserDestructor();
//==================================================================
//==================================================================
/// User callback for creating the widget associated to the box
/// ** Must be defined **
//==================================================================
/// User callback for creating the widget associated to the box
/// ** Must be defined **
{
bbtkError(bbGetTypeName()<<" is a WxBlackBox whose bbUserCreateWidget methods is not overloaded : is it a feature or a bug ?!?");
}
//==================================================================
{
bbtkError(bbGetTypeName()<<" is a WxBlackBox whose bbUserCreateWidget methods is not overloaded : is it a feature or a bug ?!?");
}
//==================================================================
-
-
- //==================================================================
- /// Main processing method of the box.
- virtual IOStatus bbBackwardUpdate( Connection::Pointer caller );
- //==================================================================
-
+ //==================================================================
+ // For layout widgets : creates and returns the widget
+ // of the box connected to input in
+ wxWindow* bbCreateWidgetOfInput(const std::string& in, wxWindow* parent);
+ //==================================================================
- /// Overloaded processing method for WxBlackBoxes :
- /// 1) if the widget is null then
- /// calls the user defined widget creation method : bbUserCreateWidget()
- /// 2) calls the user defined processing method : bbUserProcess()
- /// 3) displays the window : bbShowWindow();
+ /// Overloaded processing method for WxBlackBoxes which handles
+ /// the window creation if needed
/// (does nothing if the box output 'Widget' is connected which
/// means that the box does not have its own window but is contained
/// into another window)
/// (does nothing if the box output 'Widget' is connected which
/// means that the box does not have its own window but is contained
/// into another window)
/// Hides the WxBlackBoxWindow associated to the box (if exists)
void bbHideWindow();
/// Closes (destroys) the WxBlackBoxWindow associated to the box (if exists)
/// Hides the WxBlackBoxWindow associated to the box (if exists)
void bbHideWindow();
/// Closes (destroys) the WxBlackBoxWindow associated to the box (if exists)
/// on a contained window
/// Is set to true before transfering update to parent
/// in order to not re-transfer a second time...
/// on a contained window
/// Is set to true before transfering update to parent
/// in order to not re-transfer a second time...
bool bbmUpdateTransferedToParent;
bool bbGetUpdateTransferedToParent() const { return bbmUpdateTransferedToParent; }
void bbSetUpdateTransferedToParent(bool b)
{ bbmUpdateTransferedToParent = b; }
bool bbmUpdateTransferedToParent;
bool bbGetUpdateTransferedToParent() const { return bbmUpdateTransferedToParent; }
void bbSetUpdateTransferedToParent(bool b)
{ bbmUpdateTransferedToParent = b; }
{ \
bbtkDebugMessageInc("wx",1,"**> Creating widget for [" \
<<bbGetFullName()<<"]"<<std::endl); \
{ \
bbtkDebugMessageInc("wx",1,"**> Creating widget for [" \
<<bbGetFullName()<<"]"<<std::endl); \
bbtkDebugMessageInc("wx",1,"<** Creating widget for [" \
<<bbGetFullName()<<"]"<<std::endl); \
}
bbtkDebugMessageInc("wx",1,"<** Creating widget for [" \
<<bbGetFullName()<<"]"<<std::endl); \
}