Program: bbtk
Module: $RCSfile: bbtkWxBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/12/12 12:56:28 $
- Version: $Revision: 1.36 $
+ Date: $Date: 2009/03/23 13:06:41 $
+ Version: $Revision: 1.37 $
=========================================================================*/
/* ---------------------------------------------------------------------
bbtkDebugMessage("wx",5,"WxBlackBoxDialog::bbShow() ["
<<bbGetBlackBox()->bbGetFullName()<<"]"<<std::endl);
WxBlackBoxWindow::bbShow();
+ Show(false);
SetReturnCode( wxDialog::ShowModal() );
bbClose();
}
}
//=========================================================================
+
+ //=========================================================================
+ void WxBlackBox::bbCreateWidget()
+ {
+ // If output widget not connected : have to create and show the window
+ 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();
+ } // 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>(),
+ Wx::GetTopWindow(),
+ std2wx( bbGetInputWinTitle() + " - bbtk (c) CREATIS LRMN"),
+ wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ));
+ //bbGetInputWinWidth() , bbGetInputWinHeight() ) );
+// show->bbGetDialog()->Update();
+// show->bbGetDialog()->Refresh();
+
+ //show->bbGetDialog()->Iconize(true);
+ show->bbGetDialog()->Show(true);
+// show->bbGetDialog()->Show(false);
+// show->bbGetDialog()->SetSize(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>(),
+ Wx::GetTopWindow(),
+ std2wx( bbGetInputWinTitle() + " - bbtk (c) CREATIS LRMN"),
+ wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
+// show->bbGetFrame()->Update();
+// show->bbGetFrame()->Refresh();
+ show->bbGetFrame()->Show();
+ }
+
+ } // else bbGetWindow
+// show->bbShow();
+
+ } // bbGetOutputConnectorMap().find("Widget")).second->GetConnectionVector().size()
+ }
+ //=========================================================================
+
+
+ //=========================================================================
+ void WxBlackBox::bbShowWidget()
+ {
+ // Show the window
+ Window *show = bbGetWindow();
+ if (show!=NULL)
+ {
+ show->bbShow();
+ }
+ }
+ //=========================================================================
+
+
+ //=========================================================================
+ void WxBlackBox::bbProcess()
+ {
+ // TODO : update the window size and title
+ this->bbUserProcess();
+ }
+ //=========================================================================
+
+ /* EED BORRAME original 18 mars 2009
//=========================================================================
void WxBlackBox::bbProcess()
{
// If output widget not connected : have to create and show the window
- if ( (*bbGetOutputConnectorMap().find("Widget")).second
- ->GetConnectionVector().size() == 0 )
+ if ( (*bbGetOutputConnectorMap().find("Widget")).second->GetConnectionVector().size() == 0 )
{
- Window* show = 0;
+ Window* show = 0;
// If the window already exists : no need creating it
if (bbGetWindow()!=0)
{
}
//=========================================================================
-
+*/
//=========================================================================