- 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;
- }
- //==================================================================
-
-
- //==================================================================
- void WxBlackBox::bbHideWindow()
- {
- bbtkDebugMessageInc("wx",1,"=> WxBlackBox::bbHideWindow() ["
- <<bbGetFullName()<<"]"<<std::endl);
-
- if (bbGetWindow()!=0) bbGetWindow()->bbHide();
-
- bbtkDebugMessageDec("wx",2,"<= WxBlackBox::bbHideWindow() ["
- <<bbGetFullName()<<"]"<<std::endl);
- }
- //==================================================================
-
-
- //==================================================================
- void WxBlackBox::bbCloseWindow()
- {
- bbtkDebugMessageInc("wx",1,"=> WxBlackBox::bbCloseWindow() ["
- <<bbGetFullName()<<"]"<<std::endl);