static const wxCmdLineEntryDesc cmdLineDesc[] =
{
- { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Debug messages on (message All 9)") },
- { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"), _T("be quiet") },
+ { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("debug messages on (message all 9)") },
+ { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"), _T("be quiet (message mac 0)") },
{ wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("print help") },
{ wxCMD_LINE_SWITCH, _T("g"), _T("graphical-dialog"), _T("prompts the user for the parameters values using dialog boxes") },
{ wxCMD_LINE_SWITCH, _T("t"), _T("text-dialog"), _T("prompts the user for the parameters values in text mode") },
setlocale(LC_NUMERIC, "C");
#endif
- if (quiet) bbtk::MessageManager::SetMessageLevel("All",0);
- if (debug) bbtk::MessageManager::SetMessageLevel("All",9);
+ if (quiet) bbtk::MessageManager::SetMessageLevel("max",0);
+ if (debug) bbtk::MessageManager::SetMessageLevel("all",9);
bbtk::Wx::CreateInvisibleTopWindow();
FILE(TO_NATIVE_PATH ${BBTK_BIN_PATH}/bb${BBTK_PACKAGE_NAME}.dll pathCommand2 )
set(command1 cd "${BBTK_BIN_PATH}/../bbs/")
set(command2 copy ${pathCommand2} . )
- set(command3 ${BBTK_BBI} -N ${OUTPUT_FILE})
+ set(command3 ${BBTK_BBI} -N -q ${OUTPUT_FILE})
set(command4 del bb${BBTK_PACKAGE_NAME}.dll)
ADD_CUSTOM_COMMAND(
ADD_CUSTOM_COMMAND(
OUTPUT ${DOC_OUTPUT}
COMMAND
- cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -N ${OUTPUT_FILE}
+ cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -N -q ${OUTPUT_FILE}
DEPENDS bb${PACKAGE_NAME}
)
ENDIF(WIN32)
ADD_CUSTOM_COMMAND(
OUTPUT ${INDEX_OUTPUT}
COMMAND
- cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -n ${CMAKE_CURRENT_BINARY_DIR}/make-index.bbs
+ cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -N -q ${CMAKE_CURRENT_BINARY_DIR}/make-index.bbs
DEPENDS ${BBTK_BBI_DEPENDENCY} ${BBTK_PACKAGES_DEPS}
)
ADD_CUSTOM_TARGET(bbdoc_index ALL
Program: bbtk
Module: $RCSfile: bbtkBlackBox.cxx,v $
Language: C++
-Date: $Date: 2008/04/22 14:30:25 $
-Version: $Revision: 1.14 $
+Date: $Date: 2008/04/23 14:49:27 $
+Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
/// Signals that the BlackBox has been modified
void BlackBox::bbSetModifiedStatus(BlackBoxInputConnector* c)
{
- bbtkDebugMessageInc("Process",5,
- "=> BlackBox::bbSetModifiedStatus("<<c<<") ["
- <<bbGetFullName()<<"]"<<std::endl);
-
+ bbtkDebugMessage("modified",1,
+ "==> BlackBox::bbSetModifiedStatus("<<c<<") ["
+ <<bbGetFullName()<<"]"<<std::endl);
+
if ( (c==bbGetInputConnectorMap().find("WinHide")->second) )
- // && (bbCanReact()))
+ // && (bbCanReact()))
{
- bbtkDebugMessage("Process",9,
+ bbtkDebugMessage("modified",2,
"-> Hide triggered by WinHide input change"
<<std::endl);
this->bbHideWindow();
this->bbSetStatus(MODIFIED);
return;
}
-
+
if ( ( bbBoxProcessModeIsReactive() ||
(c==bbGetInputConnectorMap().find("BoxExecute")->second))
&& (bbCanReact() ) )
{
- bbtkDebugMessage("Process",9,
+ bbtkDebugMessage("modified",2,
"-> Execution triggered by Reactive mode or BoxExecute input change"<<std::endl);
this->bbSetStatus(MODIFIED);
bbGlobalAddToExecutionList( GetThisPointer<BlackBox>() );
}
else if ( bbGetStatus() == MODIFIED ) //! this->bbIsUptodate())
{
- bbtkDebugMessage("Process",5,"-> Already modified"<<std::endl);
- bbtkDebugDecTab("Process",5);
+ bbtkDebugMessage("modified",2,"-> Already modified"<<std::endl);
return;
}
else
{
- bbtkDebugMessage("Process",5,"-> Status set to modified"<<std::endl);
- bbtkDebugDecTab("Process",5);
+ bbtkDebugMessage("modified",2,"-> Status set to modified"<<std::endl);
this->bbSetStatus(MODIFIED);
}
this->bbSignalOutputModification(false);
- bbtkDebugMessageDec("Process",5,
+ /*
+ bbtkDebugMessageDec("Process",5,
"<= BlackBox::bbSetModifiedStatus("<<c<<") ["
<<bbGetFullName()<<"]"<<std::endl);
+ */
}
//=========================================================================
Program: bbtk
Module: $RCSfile: bbtkBlackBoxOutputConnector.cxx,v $
Language: C++
- Date: $Date: 2008/04/22 14:30:25 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/04/23 14:49:27 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void BlackBoxOutputConnector::SetModifiedStatus()
{
- bbtkDebugMessageInc("Process",5,
- "BlackBoxOutputConnector::SetModifiedStatus()"
- <<std::endl);
+ bbtkDebugMessage("modified",2,
+ "==> BlackBoxOutputConnector::SetModifiedStatus() ["
+ <<this<<"]"
+ <<std::endl);
ConnectionVector::iterator i;
for (i=mConnection.begin();i!=mConnection.end();++i)
{
(*i)->SetModifiedStatus();
}
- bbtkDebugDecTab("Process",5);
+ // bbtkDebugDecTab("Process",5);
}
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBox.cxx,v $
Language: C++
-Date: $Date: 2008/04/22 14:30:25 $
-Version: $Revision: 1.15 $
+Date: $Date: 2008/04/23 14:49:27 $
+Version: $Revision: 1.16 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//==================================================================
void ComplexBlackBox::bbSetModifiedStatus(BlackBoxInputConnector* c)
{
- bbtkDebugMessage("Process",3,
- "ComplexBlackBox::bbSetModifiedStatus("
+ bbtkDebugMessage("modified",1,
+ "==> ComplexBlackBox::bbSetModifiedStatus("
<<c<<") ["<<bbGetFullName()<<"]"<<std::endl);
c->GetBlackBox()->bbSetModifiedStatus(c);
- bbtkDebugMessage("Process",3,
- "EO ComplexBlackBox::bbSetModifiedStatus("
+ /*
+ bbtkDebugMessage("modified",1,
+ "<== ComplexBlackBox::bbSetModifiedStatus("
<<c<<") ["<<bbGetFullName()<<"]"<<std::endl);
+ */
}
//==================================================================
Program: bbtk
Module: $RCSfile: bbtkConnection.cxx,v $
Language: C++
- Date: $Date: 2008/04/22 14:30:25 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2008/04/23 14:49:27 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
/// Modified
void Connection::SetModifiedStatus()
{
- bbtkDebugMessageInc("Process",5,
- "Connection::SetModifiedStatus() ["
- <<GetFullName()<<"]"<<std::endl);
+ bbtkDebugMessage("modified",2,
+ "==> Connection::SetModifiedStatus() ["
+ <<GetFullName()<<"]"<<std::endl);
if (mAdaptor) mAdaptor->bbSetModifiedStatus();
mTo->bbSetModifiedStatus( mTo->bbGetInputConnectorMap().find(mInput)->second );
- bbtkDebugDecTab("Process",5);
+ /*
+ bbtkDebugMessage("modified",2,
+ "==> Connection::SetModifiedStatus() ["
+ <<GetFullName()<<"]"<<std::endl);
+ */
}
//==================================================================
Program: bbtk
Module: $RCSfile: bbtkMessageManager.cxx,v $
Language: C++
- Date: $Date: 2008/04/23 08:34:06 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2008/04/23 14:49:27 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
mMessageLevel[key] = 0;
mMessageHelp[key] = "Connections related messages";
if (mMaxMessageLength<key.length()) mMaxMessageLength = key.length();
+ key = "modified";
+ mMessageLevel[key] = 0;
+ mMessageHelp[key] = "Modified related messages";
+ if (mMaxMessageLength<key.length()) mMaxMessageLength = key.length();
}
static int mgNbWindowsAlive = 0;
static int mgNbWindowsShown = 0;
- void Wx::CreateInvisibleTopWindow()
+ void Wx::CreateInvisibleTopWindow(wxWindow* parent)
{
- wxWindow* top = new wxFrame(0,-1,_T("TOP (YOU SHOULD NOT SEE ME !!)"));
+ wxWindow* top = new wxFrame(parent,
+ -1,_T("TOP (YOU SHOULD NOT SEE ME !!)"));
top->Hide();
Wx::SetTopWindow(top);
}
static void EndBusyCursor();
static int mBeginBusyCallsCount;
- static void CreateInvisibleTopWindow();
+ static void CreateInvisibleTopWindow(wxWindow* parent=0);
/// Returns the global parent of all bbtk windows
static wxWindow* GetTopWindow();
/// Sets the global parent of all bbtk windows
Program: bbtk
Module: $RCSfile: bbtkWxBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/04/22 14:30:25 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2008/04/23 14:49:28 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bbSetOutputWidget(0);
bbSetWidgetEventHandler(0);
+ bbSetUpdateTransferedToParent(false);
}
//=========================================================================
/// Main processing method of the box.
IOStatus WxBlackBox::bbBackwardUpdate( Connection::Pointer caller )
{
- bbtkDebugMessageInc("Process",1,
- "=> WxBlackBox::bbBackwardUpdate("
- <<(caller?caller->GetFullName():"0")<<") ["
- <<bbGetFullName()<<"]"<<std::endl);
+ bbtkDebugMessage("Process",1,
+ "=> WxBlackBox::bbBackwardUpdate("
+ <<(caller?caller->GetFullName():"0")<<") ["
+ <<bbGetFullName()<<"]"<<std::endl);
+ // If the caller's box to is not the box to connected to the
+ // output 'Widget'
+ if ( ! (( bbGetStatus() == MODIFIED ) ||
+ ( bbBoxProcessModeIsAlways() )) )
+ {
+ bbtkDebugMessage("Process",2,"Up-to-date : nothing to do"<<std::endl);
+ bbtkDebugMessage("Process",1,
+ "<= WxBlackBox::bbBackwardUpdate("
+ <<(caller?caller->GetFullName():"0")<<") ["
+ <<bbGetFullName()<<"]"<<std::endl);
+ return bbGetStatus();
+ }
+
+ BlackBox::OutputConnectorMapType::const_iterator i
+ = bbGetOutputConnectorMap().find("Widget") ;
+ if ( i->second->GetConnectionVector().size() != 0 )
+
+ {
+ BlackBox::Pointer to =
+ i->second->GetConnectionVector()[0]->GetBlackBoxTo();
+
+ if (caller)
+ {
+ bbtkDebugMessage("Process",2,
+ "-> Output 'Widget' connected to '"
+ <<to->bbGetFullName()<<"' - caller->to = '"
+ <<caller->GetBlackBoxTo()->bbGetFullName()
+ <<"'"
+ <<std::endl);
+ }
+ else
+ {
+ bbtkDebugMessage("Process",2,
+ "-> Output 'Widget' connected to '"
+ <<to->bbGetFullName()<<"'"
+ <<std::endl);
+ }
+ if ((caller==0) ||
+ ((caller!=0) &&
+ (caller->GetBlackBoxTo() != to))&&
+ (!bbGetUpdateTransferedToParent()))
+ {
+ bbtkDebugMessage("Process",2,
+ " ... Transfering update order to parent"
+ <<std::endl);
+
+ bbSetUpdateTransferedToParent(true);
+ i->second->GetConnectionVector().front() //.lock()
+ ->GetBlackBoxTo()->bbExecute(false);
+ }
+ else
+ {
+ bbSetUpdateTransferedToParent(false);
+ bbtkDebugMessage("Process",2,
+ " ... No need to transfer to parent"
+ <<std::endl);
+ }
+ }
+ /*
+
// If the caller is not the connection to the output widget
// and the output 'Widget' is connected then
// we must execute the parent box
// but only one time
- // (this is the role of the flag UpdateTransferedToParent=
+ // (this is the role of the flag UpdateTransferedToParent)
if ( (caller==0) ||
((caller!=0)&&(caller->GetBlackBoxFromOutput()!="Widget"))
)
{
- BlackBox::OutputConnectorMapType::const_iterator i
- = bbGetOutputConnectorMap().find("Widget") ;
- if ( i->second->GetConnectionVector().size() != 0 )
-
- {
- bbtkDebugMessage("Process",2,
- "-> Output 'Widget' connected : transfering update order to parent"
- <<std::endl);
- if ( bbGetUpdateTransferedToParent() )
- {
- bbSetUpdateTransferedToParent(false);
- bbtkDebugMessage("Process",2,
- " ... already transfered : abort"
- <<std::endl);
- }
- else
- {
- bbSetUpdateTransferedToParent(true);
- i->second->GetConnectionVector().front() //.lock()
- ->GetBlackBoxTo()->bbExecute(false);
- }
- }
}
+ */
// call 'standard' BlackBox execution method
if (!bbGetUpdateTransferedToParent())
{
Program: bbtk
Module: $RCSfile: bbtkWxGUIConsole.cxx,v $
Language: C++
- Date: $Date: 2008/04/22 14:30:25 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2008/04/23 14:49:28 $
+ Version: $Revision: 1.8 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Creates and sets the parent window of all bbtk windows
+ /*
wxWindow* top = new wxPanel(this,-1);//,_T("top"));
top->Hide();
Wx::SetTopWindow(top);
-
+ */
+ Wx::CreateInvisibleTopWindow(this);
// Layout
//EED SetSizer(sizer);