X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWxBlackBox.h;h=095553d59b3023405e39e47016feb01dd4b704d7;hb=9e2b6d4716a5d12f39d8dde0a2d719fe961bdd2c;hp=700fa3e044a32849732f2995e398f759f1a3c0c0;hpb=141959873bfc3610f427de9a7690458a8b18bd2a;p=bbtk.git diff --git a/kernel/src/bbtkWxBlackBox.h b/kernel/src/bbtkWxBlackBox.h index 700fa3e..095553d 100644 --- a/kernel/src/bbtkWxBlackBox.h +++ b/kernel/src/bbtkWxBlackBox.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkWxBlackBox.h,v $ Language: C++ - Date: $Date: 2008/03/10 12:28:43 $ - Version: $Revision: 1.9 $ + Date: $Date: 2008/07/24 14:37:06 $ + Version: $Revision: 1.17 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -61,17 +61,22 @@ namespace bbtk //================================================================== /// Widget black boxes class BBTK_EXPORT WxBlackBox : public bbtk::AtomicBlackBox - { - BBTK_USER_BLACK_BOX_INTERFACE(WxBlackBox,bbtk::AtomicBlackBox); + { + BBTK_BLACK_BOX_INTERFACE(WxBlackBox,bbtk::AtomicBlackBox); // BBTK_DECLARE_INPUT(WinParent,WxParentToChildData*); BBTK_DECLARE_INPUT(WinTitle,std::string); BBTK_DECLARE_INPUT(WinWidth,int); BBTK_DECLARE_INPUT(WinHeight,int); BBTK_DECLARE_INPUT(WinDialog,bool); BBTK_DECLARE_INPUT(WinHide,Void); + BBTK_DECLARE_INPUT(WinClose,Void); BBTK_DECLARE_OUTPUT(Widget, wxWindow*);//WxBlackBoxWidget*); public: + /// Main processing method of the box. Overloaded to handle windows inclusion : if the output Widget is connected then the execution is transfered to the box to which it is connected (as the container window must be created and displayed - this box will be executed by the normal pipeline recursion mechanism) + virtual void bbExecute(bool force = false); + + typedef WxBlackBoxWindow Window; /// Returns the **OWN** window associated to the box @@ -129,8 +134,10 @@ namespace bbtk - - + //================================================================== + /// Main processing method of the box. + virtual IOStatus bbBackwardUpdate( Connection::Pointer caller ); + //================================================================== @@ -152,6 +159,8 @@ namespace bbtk void bbShowWindow(); /// Hides the WxBlackBoxWindow associated to the box (if exists) void bbHideWindow(); + /// Closes (destroys) the WxBlackBoxWindow associated to the box (if exists) + void bbCloseWindow(); //================================================================== private: @@ -179,8 +188,17 @@ namespace bbtk void bbInitAttributes(); protected : - /// Main processing method of the box. Overloaded to handle windows inclusion : if the output Widget is connected then the execution is transfered to the box to which it is connected (the container window must be created and displayed - this box will be also executed by the normal pipeline recursion mechanism) - virtual void bbExecute(bool force = false); + + + /// For Forward update mechanism when execution is called + /// on a contained window + /// Is set to true before transfering update to parent + /// in order to not re-transfer a second time... + bool bbmUpdateTransferedToParent; + + bool bbGetUpdateTransferedToParent() const { return bbmUpdateTransferedToParent; } + void bbSetUpdateTransferedToParent(bool b) + { bbmUpdateTransferedToParent = b; } }; //================================================================= @@ -192,10 +210,10 @@ namespace bbtk public: \ inline void bbUserCreateWidget() \ { \ - bbtkDebugMessageInc("Process",1,"=> "< Creating widget for [" \ <