X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fwx%2Fsrc%2FbbwxCommandButton.h;h=2490e8b8ef75f48a587cc3369faccff1e2565ec5;hb=d54571378c577b97b27aa532faf30070e979dc02;hp=91964e258760a390ab74f28fc83681204bab5621;hpb=6575a389b71b1b85c79e4444885becb76ecf16e4;p=bbtk.git diff --git a/packages/wx/src/bbwxCommandButton.h b/packages/wx/src/bbwxCommandButton.h index 91964e2..2490e8b 100644 --- a/packages/wx/src/bbwxCommandButton.h +++ b/packages/wx/src/bbwxCommandButton.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxCommandButton.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:32 $ - Version: $Revision: 1.6 $ + Date: $Date: 2009/05/15 14:58:03 $ + Version: $Revision: 1.9 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -36,49 +36,29 @@ */ /** * \file - * \brief Pattern for the definition of a new type of Node (header) + * \brief */ /** - * \class bbtk::NodePatern - * \brief Pattern for the definition of a new type of Node + * \class CommandButton + * \brief */ -#ifdef _USE_WXWIDGETS_ +#ifdef USE_WXWIDGETS #ifndef __bbwxCommandButton_h_INCLUDED_H__ #define __bbwxCommandButton_h_INCLUDED_H__ #include "bbtkWxBlackBox.h" - +#include "bbwx_EXPORT.h" namespace bbwx { - class CommandButton; //-------------------------------------------------------------------------- - class CommandButtonWidget : public wxPanel - { - public: - CommandButtonWidget(CommandButton* box, wxWindow *parent, - wxString title); - ~CommandButtonWidget(); - void OnCommandButton( wxEvent& ); - void SetLabel(wxString title); - void SetColour(wxColour color); - - private: - CommandButton* mBox; - wxButton *mwxCommandButton; - }; - - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - - class /*BBTK_EXPORT*/ CommandButton : public bbtk::WxBlackBox + class bbwx_EXPORT CommandButton : public bbtk::WxBlackBox { friend class CommandButtonWidget; BBTK_BLACK_BOX_INTERFACE(CommandButton,bbtk::WxBlackBox); @@ -89,23 +69,22 @@ namespace bbwx BBTK_PROCESS(Process); void Process(); BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(); + void CreateWidget(wxWindow*); protected: - virtual void bbUserConstructor(); private: void UpdateColour(); void UpdateLabel(); }; - + //================================================================= // UserBlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(CommandButton,bbtk::WxBlackBox); BBTK_NAME("CommandButton"); BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr"); BBTK_DESCRIPTION("Button which executes bbi commands"); - + typedef std::vector vectorcolour; BBTK_INPUT(CommandButton,In,"Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote (\").",std::string,""); @@ -114,10 +93,10 @@ namespace bbwx // BBTK_OUTPUT(CommandButton,Out,"..Out..",int); BBTK_END_DESCRIBE_BLACK_BOX(CommandButton); //================================================================= - - + + }//namespace bbwx - + #endif // __bbwxCommandButton_h_INCLUDED_H__ - -#endif //_USE_WXWIDGETS_ + +#endif //USE_WXWIDGETS