2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
5 #ifndef __bbwxBitmapButton_h_INCLUDED__
6 #define __bbwxBitmapButton_h_INCLUDED__
7 #include "bbwx_EXPORT.h"
8 #include "bbtkWxBlackBox.h"
12 class bbwx_EXPORT BitmapButton : public bbtk::WxBlackBox
14 friend class BitmapButtonWidget;
16 BBTK_BLACK_BOX_INTERFACE(BitmapButton,bbtk::WxBlackBox);
18 BBTK_DECLARE_INPUT(In, std::string );
19 BBTK_DECLARE_INPUT(Bitmap, wxBitmap* );
20 BBTK_DECLARE_INPUT(Label, std::string );
21 BBTK_DECLARE_INPUT(Colour, std::vector<double> );
24 BBTK_PROCESS(Process);
26 BBTK_CREATE_WIDGET(CreateWidget);
27 void CreateWidget(wxWindow*);
35 class BitmapButtonWidget : public wxPanel
41 wxBitmap* bitmap = NULL,
42 wxString title = wxT("")
44 ~BitmapButtonWidget();
45 void OnClick( wxEvent& );
46 void SetLabel(wxString title);
47 void SetColour(wxColour color);
48 void SetIcon( wxBitmap* bitmap);
57 typedef std::vector<double> colorVector;
59 BBTK_BEGIN_DESCRIBE_BLACK_BOX(BitmapButton,bbtk::WxBlackBox);
60 BBTK_NAME("BitmapButton");
61 BBTK_AUTHOR("daniel.gonzalez@creatis.insa-lyon.fr");
62 BBTK_DESCRIPTION("A bitmap button is a control that contains a bitmap. If no bitmap is provided, then a label is used instead.");
63 //BBTK_CATEGORY("widget");
64 BBTK_INPUT(BitmapButton,In,"Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote (\").",std::string,"");
65 BBTK_INPUT(BitmapButton,Bitmap,"Bitmap image of the button",wxBitmap*,"");
66 BBTK_INPUT(BitmapButton,Label,"Label of the button",std::string,"");
67 BBTK_INPUT(BitmapButton,Colour,"Button background color. By default (-1, -1, -1)",colorVector,"color");
68 BBTK_END_DESCRIBE_BLACK_BOX(BitmapButton);
70 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
75 #endif // __bbwxBitmapButton_h_INCLUDED__
76 #endif // _USE_WXWIDGETS_