1 /*=========================================================================
4 Module: $RCSfile: bbwxButtonExecBlackBox.h,v $
6 Date: $Date: 2008/02/12 10:31:58 $
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 =========================================================================*//**
20 * \brief Short description in one line
22 * Long description which
23 * can span multiple lines
30 * \class bbwx::SliderWidget
35 #ifdef _USE_WXWIDGETS_
37 // Prevents multiple inclusions : use symbols of the form
38 // __FILENAME_INCLUDED__
39 // where FILENAME must be replaced by the actual file name
40 #ifndef __bbwxButtonExecBlackBox_h_INCLUDED_H__
41 #define __bbwxButtonExecBlackBox_h_INCLUDED_H__
44 // Include wxBlackBox definition
45 #include "bbtkWxBlackBox.h"
49 // Namespace of the package "wx" is "bbwx"
50 // Namespace associated to packages should be of the form :
54 //--------------------------------------------------------------------------
55 // Forward declaration of the box
56 class ButtonExecBlackBox;
58 //--------------------------------------------------------------------------
59 // The widget created by the box
60 class ButtonExecBlackBoxWidget : public wxPanel
63 /// Ctor with the two first params the parent window and the creator box
64 /// which must be passed to the WxBlackBoxWidget constructor.
65 /// The other params initialize the widget
66 ButtonExecBlackBoxWidget(ButtonExecBlackBox* box,
69 ~ButtonExecBlackBoxWidget();
71 void OnButton( wxEvent& );
74 void SetLabel(wxString title);
75 void SetColour(wxColour color);
78 ButtonExecBlackBox *mBox;
82 //--------------------------------------------------------------------------
83 //--------------------------------------------------------------------------
84 //--------------------------------------------------------------------------
86 class /*BBTK_EXPORT*/ ButtonExecBlackBox : public bbtk::WxBlackBox
88 BBTK_USER_BLACK_BOX_INTERFACE(ButtonExecBlackBox,bbtk::WxBlackBox);
89 BBTK_DECLARE_INPUT(In, std::string );
90 BBTK_DECLARE_INPUT(Label, std::string );
91 BBTK_DECLARE_INPUT(Colour, std::vector<double> );
92 // BBTK_DECLARE_OUTPUT(Out,int);
93 BBTK_CREATE_WIDGET(CreateWidget);
94 BBTK_PROCESS(Process);
99 virtual void bbUserConstructor();
102 ButtonExecBlackBoxWidget *mWidget;
105 //=================================================================
106 // UserBlackBox description
107 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ButtonExecBlackBox,bbtk::WxBlackBox);
108 BBTK_NAME("ButtonExecBlackBox");
109 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
110 // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
111 BBTK_DESCRIPTION("Button widget (Execute a BlackBox)");
113 typedef std::vector<double> vectorcolour;
115 BBTK_INPUT(ButtonExecBlackBox,In,"Name of the Black Box to be executed",std::string);
116 BBTK_INPUT(ButtonExecBlackBox,Label,"Label of the button",std::string);
117 BBTK_INPUT(ButtonExecBlackBox,Colour,"Colour of the button (-1 -1 -1 Background)",vectorcolour);
118 // BBTK_OUTPUT(ButtonExecBlackBox,Out,"..Out..",int);
119 BBTK_END_DESCRIBE_BLACK_BOX(ButtonExecBlackBox);
120 //=================================================================
125 #endif // __bbwxButtonExecBlackBox_h_INCLUDED_H__
127 #endif //_USE_WXWIDGETS_