1 /*=========================================================================
4 Module: $RCSfile: bbwxCommandButton.h,v $
6 Date: $Date: 2008/02/15 12:47:18 $
7 Version: $Revision: 1.1 $
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 =========================================================================*//**
18 * \brief Short description in one line
20 * Long description which
21 * can span multiple lines
25 * \brief Pattern for the definition of a new type of Node (header)
28 * \class bbtk::NodePatern
29 * \brief Pattern for the definition of a new type of Node
33 #ifdef _USE_WXWIDGETS_
35 #ifndef __bbwxCommandButton_h_INCLUDED_H__
36 #define __bbwxCommandButton_h_INCLUDED_H__
39 #include "bbtkWxBlackBox.h"
47 //--------------------------------------------------------------------------
48 class CommandButtonWidget : public wxPanel
51 CommandButtonWidget(CommandButton* box, wxWindow *parent,
53 ~CommandButtonWidget();
54 void OnCommandButton( wxEvent& );
55 void SetLabel(wxString title);
56 void SetColour(wxColour color);
60 wxButton *mwxCommandButton;
63 //--------------------------------------------------------------------------
64 //--------------------------------------------------------------------------
65 //--------------------------------------------------------------------------
67 class /*BBTK_EXPORT*/ CommandButton : public bbtk::WxBlackBox
69 friend class CommandButtonWidget;
70 BBTK_USER_BLACK_BOX_INTERFACE(CommandButton,bbtk::WxBlackBox);
71 BBTK_DECLARE_INPUT(In, std::string );
72 BBTK_DECLARE_INPUT(Label, std::string );
73 BBTK_DECLARE_INPUT(Colour, std::vector<double> );
74 // BBTK_DECLARE_OUTPUT(Out,int);
75 BBTK_PROCESS(Process);
77 BBTK_CREATE_WIDGET(CreateWidget);
80 virtual void bbUserConstructor();
88 //=================================================================
89 // UserBlackBox description
90 BBTK_BEGIN_DESCRIBE_BLACK_BOX(CommandButton,bbtk::WxBlackBox);
91 BBTK_NAME("CommandButton");
92 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
93 BBTK_DESCRIPTION("Button which executes bbi commands");
95 typedef std::vector<double> vectorcolour;
97 BBTK_INPUT(CommandButton,In,"Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote (\").",std::string);
98 BBTK_INPUT(CommandButton,Label,"Label of the button",std::string);
99 BBTK_INPUT(CommandButton,Colour,"Colour of the button (-1 -1 -1 Background)",vectorcolour);
100 // BBTK_OUTPUT(CommandButton,Out,"..Out..",int);
101 BBTK_END_DESCRIBE_BLACK_BOX(CommandButton);
102 //=================================================================
107 #endif // __bbwxCommandButton_h_INCLUDED_H__
109 #endif //_USE_WXWIDGETS_