Program: bbtk
Module: $RCSfile: bbtkBlackBox.cxx,v $
Language: C++
-Date: $Date: 2008/05/07 12:59:23 $
-Version: $Revision: 1.18 $
+Date: $Date: 2008/07/23 11:46:10 $
+Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
//=========================================================================
BlackBox::BlackBox(const std::string &name)
- : bbmName(name),
- bbmStatus(MODIFIED),
- bbmBoxProcessMode("Pipeline"),
- bbmParent()
-
+ :
+ bbmStatus(MODIFIED),
+ bbmName(name),
+ bbmBoxProcessMode("Pipeline"),
+ bbmParent()
+
{
bbtkDebugMessage("object",4,"==> BlackBox::BlackBox(\""
<<name<<"\")"<<std::endl);
//=========================================================================
BlackBox::BlackBox(BlackBox& from, const std::string &name)
- : bbmName(name),
+ :
bbmStatus(from.bbmStatus),
+ bbmName(name),
bbmBoxProcessMode(from.bbmBoxProcessMode),
bbmParent()
"=> BlackBox::bbExecute() ["
<<bbGetFullName()<<"]"<<std::endl);
- Wx::BeginBusyCursor();
+ wxBusyCursor wait;
+ //EED Wx::BeginBusyCursor();
// If execution frozen : return
if (bbGlobalGetFreezeExecution())
// Calls the main recursive update method
bbBackwardUpdate(Connection::Pointer());
- Wx::EndBusyCursor();
+ //EED Wx::EndBusyCursor();
bbtkDebugMessageDec("process",2,
"<= BlackBox::bbExecute() ["
this->bbSetStatus(MODIFIED);
return;
}
+ if ( (c==bbGetInputConnectorMap().find("WinClose")->second) )
+ // && (bbCanReact()))
+ {
+ bbtkDebugMessage("modified",2,
+ "-> Close triggered by WinClose input change"
+ <<std::endl);
+ this->bbHideWindow();
+ this->bbSetStatus(MODIFIED);
+ return;
+ }
if ( ( bbBoxProcessModeIsReactive() ||
(c==bbGetInputConnectorMap().find("BoxExecute")->second))
this->bbSetStatus(MODIFIED);
bbGlobalAddToExecutionList( GetThisPointer<BlackBox>() );
}
+ /*
else if ( bbGetStatus() == MODIFIED ) //! this->bbIsUptodate())
{
bbtkDebugMessage("modified",2,"-> Already modified"<<std::endl);
return;
}
+ */
else
{
bbtkDebugMessage("modified",2,"-> Status set to modified"<<std::endl);
InputConnectorMapType::iterator i;
unsigned int namelmax = 0;
unsigned int valuelmax = 0;
- unsigned int connlmax = 0;
+ // unsigned int connlmax = 0;
for ( i = mInputConnectorMap.begin(); i != mInputConnectorMap.end(); ++i )
{
iname.push_back(i->first);
}
- //=========================================================================
- // Static members initialization
-/*EED
- bool BlackBox::bbmgSomeBoxExecuting = false;
- bool BlackBox::bbmgFreezeExecution = false;
- std::set<BlackBox*> BlackBox::bbmgExecutionList;
-*/
//=========================================================================
//=========================================================================
}
//=========================================================================
+ void BlackBox::bbUserOnShowWidget(std::string nameInput)
+ {
+ bbtk::BlackBoxInputConnector *cc;
+ cc = this->bbGetInputConnectorMap().find( nameInput.c_str() )->second;
+ if (cc->GetConnection()!=NULL)
+ {
+ cc->GetConnection()->GetBlackBoxFrom()->bbUserOnShow();
+ }
+ }
+
} // EO namespace bbtk