1 /*=========================================================================
4 Module: $RCSfile: bbwxCommandButton.h,v $
6 Date: $Date: 2008/07/25 07:44:12 $
7 Version: $Revision: 1.5 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 * \brief Short description in one line
21 * Long description which
22 * can span multiple lines
26 * \brief Pattern for the definition of a new type of Node (header)
29 * \class bbtk::NodePatern
30 * \brief Pattern for the definition of a new type of Node
34 #ifdef _USE_WXWIDGETS_
36 #ifndef __bbwxCommandButton_h_INCLUDED_H__
37 #define __bbwxCommandButton_h_INCLUDED_H__
40 #include "bbtkWxBlackBox.h"
48 //--------------------------------------------------------------------------
49 class CommandButtonWidget : public wxPanel
52 CommandButtonWidget(CommandButton* box, wxWindow *parent,
54 ~CommandButtonWidget();
55 void OnCommandButton( wxEvent& );
56 void SetLabel(wxString title);
57 void SetColour(wxColour color);
61 wxButton *mwxCommandButton;
64 //--------------------------------------------------------------------------
65 //--------------------------------------------------------------------------
66 //--------------------------------------------------------------------------
68 class /*BBTK_EXPORT*/ CommandButton : public bbtk::WxBlackBox
70 friend class CommandButtonWidget;
71 BBTK_BLACK_BOX_INTERFACE(CommandButton,bbtk::WxBlackBox);
72 BBTK_DECLARE_INPUT(In, std::string );
73 BBTK_DECLARE_INPUT(Label, std::string );
74 BBTK_DECLARE_INPUT(Colour, std::vector<double> );
75 // BBTK_DECLARE_OUTPUT(Out,int);
76 BBTK_PROCESS(Process);
78 BBTK_CREATE_WIDGET(CreateWidget);
81 virtual void bbUserConstructor();
89 //=================================================================
90 // UserBlackBox description
91 BBTK_BEGIN_DESCRIBE_BLACK_BOX(CommandButton,bbtk::WxBlackBox);
92 BBTK_NAME("CommandButton");
93 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
94 BBTK_DESCRIPTION("Button which executes bbi commands");
96 typedef std::vector<double> vectorcolour;
98 BBTK_INPUT(CommandButton,In,"Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote (\").",std::string,"");
99 BBTK_INPUT(CommandButton,Label,"Label of the button",std::string,"");
100 BBTK_INPUT(CommandButton,Colour,"Colour of the button (-1 -1 -1 Background)",vectorcolour,"colour");
101 // BBTK_OUTPUT(CommandButton,Out,"..Out..",int);
102 BBTK_END_DESCRIBE_BLACK_BOX(CommandButton);
103 //=================================================================
108 #endif // __bbwxCommandButton_h_INCLUDED_H__
110 #endif //_USE_WXWIDGETS_