/*========================================================================= Program: bbtk Module: $RCSfile: bbwxButtonExecBlackBox.h,v $ Language: C++ Date: $Date: 2008/02/12 10:31:58 $ Version: $Revision: 1.1 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*//** /** * \file * \brief Short description in one line * * Long description which * can span multiple lines */ /** * \class bbwx::Slider * \brief * \class bbwx::SliderWidget * \brief */ #ifdef _USE_WXWIDGETS_ // Prevents multiple inclusions : use symbols of the form // __FILENAME_INCLUDED__ // where FILENAME must be replaced by the actual file name #ifndef __bbwxButtonExecBlackBox_h_INCLUDED_H__ #define __bbwxButtonExecBlackBox_h_INCLUDED_H__ // Include wxBlackBox definition #include "bbtkWxBlackBox.h" // Namespace of the package "wx" is "bbwx" // Namespace associated to packages should be of the form : // bbPACKAGENAME namespace bbwx { //-------------------------------------------------------------------------- // Forward declaration of the box class ButtonExecBlackBox; //-------------------------------------------------------------------------- // The widget created by the box class ButtonExecBlackBoxWidget : public wxPanel { public: /// Ctor with the two first params the parent window and the creator box /// which must be passed to the WxBlackBoxWidget constructor. /// The other params initialize the widget ButtonExecBlackBoxWidget(ButtonExecBlackBox* box, wxWindow *parent, wxString title); ~ButtonExecBlackBoxWidget(); /// Events callbacks void OnButton( wxEvent& ); // Accessors void SetLabel(wxString title); void SetColour(wxColour color); private: ButtonExecBlackBox *mBox; wxButton *mwxButton; }; //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- class /*BBTK_EXPORT*/ ButtonExecBlackBox : public bbtk::WxBlackBox { BBTK_USER_BLACK_BOX_INTERFACE(ButtonExecBlackBox,bbtk::WxBlackBox); BBTK_DECLARE_INPUT(In, std::string ); BBTK_DECLARE_INPUT(Label, std::string ); BBTK_DECLARE_INPUT(Colour, std::vector ); // BBTK_DECLARE_OUTPUT(Out,int); BBTK_CREATE_WIDGET(CreateWidget); BBTK_PROCESS(Process); void Process(); void CreateWidget(); protected: virtual void bbUserConstructor(); private: ButtonExecBlackBoxWidget *mWidget; }; //================================================================= // UserBlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(ButtonExecBlackBox,bbtk::WxBlackBox); BBTK_NAME("ButtonExecBlackBox"); BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr"); // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); BBTK_DESCRIPTION("Button widget (Execute a BlackBox)"); typedef std::vector vectorcolour; BBTK_INPUT(ButtonExecBlackBox,In,"Name of the Black Box to be executed",std::string); BBTK_INPUT(ButtonExecBlackBox,Label,"Label of the button",std::string); BBTK_INPUT(ButtonExecBlackBox,Colour,"Colour of the button (-1 -1 -1 Background)",vectorcolour); // BBTK_OUTPUT(ButtonExecBlackBox,Out,"..Out..",int); BBTK_END_DESCRIBE_BLACK_BOX(ButtonExecBlackBox); //================================================================= }//namespace bbwx #endif // __bbwxButtonExecBlackBox_h_INCLUDED_H__ #endif //_USE_WXWIDGETS_