From cc134f89048428aca99fa855a7e1e87c815a3413 Mon Sep 17 00:00:00 2001 From: guigues Date: Fri, 12 Dec 2008 12:11:21 +0000 Subject: [PATCH] *** empty log message *** --- kernel/src/bbtkComplexBlackBox.cxx | 28 ++++++++++++++----- kernel/src/bbtkExecuter.cxx | 14 ++++++++-- kernel/src/bbtkExecuter.h | 7 +++-- kernel/src/bbtkInterpreter.cxx | 16 +++++++++-- kernel/src/bbtkInterpreter.h | 5 ++-- kernel/src/bbtkKW.cxx | 9 +++--- kernel/src/bbtkTranscriptor.cxx | 9 ++++-- kernel/src/bbtkTranscriptor.h | 7 +++-- kernel/src/bbtkVirtualExec.h | 7 +++-- packages/kw/bbs/appli/exampleSlider.bbs | 4 --- .../kw/bbs/appli/{demoKW.bbs => kwTour.bbs} | 8 +++++- 11 files changed, 84 insertions(+), 30 deletions(-) delete mode 100644 packages/kw/bbs/appli/exampleSlider.bbs rename packages/kw/bbs/appli/{demoKW.bbs => kwTour.bbs} (90%) diff --git a/kernel/src/bbtkComplexBlackBox.cxx b/kernel/src/bbtkComplexBlackBox.cxx index c8fa3df..47b9837 100644 --- a/kernel/src/bbtkComplexBlackBox.cxx +++ b/kernel/src/bbtkComplexBlackBox.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkComplexBlackBox.cxx,v $ Language: C++ - Date: $Date: 2008/12/11 09:50:35 $ - Version: $Revision: 1.23 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.24 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -141,6 +141,24 @@ namespace bbtk bbtkDebugMessage("object",3, "==> ComplexBlackBox::~ComplexBlackBox() [" <bbDesallocateConnectors(); + + bbtkDebugMessage("object",3, + "<== ComplexBlackBox::~ComplexBlackBox() [" + < ComplexBlackBox::Clear() [" + < Releasing connections"< Releasing boxes"<bbDesallocateConnectors(); - bbtkDebugMessage("object",3, - "<== ComplexBlackBox::~ComplexBlackBox() [" + "<== ComplexBlackBox::Clear() [" <GetPrototype()->Clear(); + + } + //======================================================================= + //======================================================================= void Executer::EndDefine () { diff --git a/kernel/src/bbtkExecuter.h b/kernel/src/bbtkExecuter.h index 7175c39..922ca07 100644 --- a/kernel/src/bbtkExecuter.h +++ b/kernel/src/bbtkExecuter.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkExecuter.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:13 $ - Version: $Revision: 1.16 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.17 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -120,6 +120,9 @@ namespace bbtk /// Destroys a black box void Destroy (const std::string &boxName); + /// Clears the currently defined ComplexBlackBox + void Clear(); + /// Connects the output boxOutput to the input boxInput void Connect (const std::string &boxfrom, const std::string &output, diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 4b2e866..fc5f3f1 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ Language: C++ - Date: $Date: 2008/11/26 12:36:42 $ - Version: $Revision: 1.78 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.79 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -134,6 +134,14 @@ namespace bbtk info.help = "Deletes the black box of name "; mCommandDict[info.keyword] = info; + info.keyword = "clear"; + info.argmin = 0; + info.argmax = 0; + info.code = cClear; + info.syntax = "clear"; + info.help = "Clears the currently defined complex box (deletes all its boxes and connections)"; + mCommandDict[info.keyword] = info; + info.keyword = "newgui"; info.argmin = 2; info.argmax = 2; @@ -877,6 +885,10 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment ) Reset(); break; + case cClear : + mVirtualExecuter->Clear(); + break; + case cInclude : // if 'source' was given (words.size()==3) then tell to set the // source file name of the current complex box with the full file name included diff --git a/kernel/src/bbtkInterpreter.h b/kernel/src/bbtkInterpreter.h index 5325e56..4908827 100644 --- a/kernel/src/bbtkInterpreter.h +++ b/kernel/src/bbtkInterpreter.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.h,v $ Language: C++ - Date: $Date: 2008/12/11 15:30:04 $ - Version: $Revision: 1.37 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.38 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -170,6 +170,7 @@ namespace bbtk /// The enumeration of command codes == Command name typedef enum { + cClear, cNew, cDelete, cConnect, diff --git a/kernel/src/bbtkKW.cxx b/kernel/src/bbtkKW.cxx index cf88699..36874f1 100644 --- a/kernel/src/bbtkKW.cxx +++ b/kernel/src/bbtkKW.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkKW.cxx,v $ Language: C++ - Date: $Date: 2008/12/02 08:38:08 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.3 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -36,7 +36,7 @@ //#include "vtkConditionVariable.h" -#include "vtkMultiThreader.h" +//#include "vtkMultiThreader.h" #include @@ -53,7 +53,8 @@ namespace bbtk //========================================================================= static vtkKWApplication* mgKWApp = 0; - static vtkMultiThreader* mgMultiThreader = 0; /* + //static vtkMultiThreader* mgMultiThreader = 0; + /* static vtkKWWindowBase* mgKWTopWindow = 0; static vtkKWWindowBase* mgKWTopWindowParent = 0; static bool mgKWAutoDestroyTopWindow = true; diff --git a/kernel/src/bbtkTranscriptor.cxx b/kernel/src/bbtkTranscriptor.cxx index fb047d9..9f59d28 100644 --- a/kernel/src/bbtkTranscriptor.cxx +++ b/kernel/src/bbtkTranscriptor.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkTranscriptor.cxx,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:14 $ - Version: $Revision: 1.14 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.15 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -138,6 +138,11 @@ namespace bbtk m_Fp << " e->Reset( );" << std::endl; } + void Transcriptor::Clear() + { + m_Fp << " e->Clear( );" << std::endl; + } + void Transcriptor::SetWorkspaceName( const std::string& name ) { diff --git a/kernel/src/bbtkTranscriptor.h b/kernel/src/bbtkTranscriptor.h index c2e995c..dba498b 100644 --- a/kernel/src/bbtkTranscriptor.h +++ b/kernel/src/bbtkTranscriptor.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkTranscriptor.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:14 $ - Version: $Revision: 1.12 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.13 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -119,6 +119,9 @@ namespace bbtk /// Destroys a black box void Destroy (const std::string &boxName); + /// Clears the currently defined ComplexBlackBox + void Clear(); + /// Connects the output boxOutput to the input boxInput void Connect (const std::string &boxfrom, const std::string &output, diff --git a/kernel/src/bbtkVirtualExec.h b/kernel/src/bbtkVirtualExec.h index fd856b8..d09ed5a 100644 --- a/kernel/src/bbtkVirtualExec.h +++ b/kernel/src/bbtkVirtualExec.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkVirtualExec.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:14 $ - Version: $Revision: 1.17 $ + Date: $Date: 2008/12/12 12:11:21 $ + Version: $Revision: 1.18 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -127,6 +127,9 @@ namespace bbtk /// Destroys a black box virtual void Destroy (const std::string &boxName) = 0; + /// Clears the currently defined ComplexBlackBox + virtual void Clear() = 0; + /// Connects the output boxOutput to the input boxInput virtual void Connect (const std::string &boxfrom, const std::string &output, diff --git a/packages/kw/bbs/appli/exampleSlider.bbs b/packages/kw/bbs/appli/exampleSlider.bbs deleted file mode 100644 index 1eb6e45..0000000 --- a/packages/kw/bbs/appli/exampleSlider.bbs +++ /dev/null @@ -1,4 +0,0 @@ -load kw -new kwSlider s -exec s -#unload kw diff --git a/packages/kw/bbs/appli/demoKW.bbs b/packages/kw/bbs/appli/kwTour.bbs similarity index 90% rename from packages/kw/bbs/appli/demoKW.bbs rename to packages/kw/bbs/appli/kwTour.bbs index 41fd2fc..12ed078 100644 --- a/packages/kw/bbs/appli/demoKW.bbs +++ b/packages/kw/bbs/appli/kwTour.bbs @@ -4,6 +4,7 @@ category "demo" print "==================================" print "A Slider whose output is plugged into an OutputText" +message echo 2 include kw load std @@ -15,10 +16,12 @@ new kwLayoutSplit window connect in.Widget window.Widget1 connect out.Widget window.Widget2 exec window -reset +message echo 0 +clear print "==================================" print "The kwSlicer widget" +message echo 2 load kw include vtk @@ -30,8 +33,11 @@ connect r.Out s.In exec s reset +message echo 0 +clear print "==================================" print "Using both kw and wx" +message echo 2 load wx load kw -- 2.45.0