1 /*=========================================================================
4 Module: $RCSfile: bbwxColourSelectorButton.h,v $
6 Date: $Date: 2008/05/07 13:14:49 $
7 Version: $Revision: 1.4 $
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
27 * \class bbwx::ColourSelectorButton
30 * \class bbwx::wxColourPickerCtrlWidget
34 #ifdef _USE_WXWIDGETS_
36 // Prevents multiple inclusions : use symbols of the form
37 // __FILENAME_INCLUDED__
38 // where FILENAME must be replaced by the actual file name
39 #ifndef __bbwxColourSelectorButton_h_INCLUDED_H__
40 #define __bbwxColourSelectorButton_h_INCLUDED_H__
42 // Include wxBlackBox definition
43 #include "bbtkWxBlackBox.h"
45 #include <wx/clrpicker.h>
47 // Namespace of the package "wx" is "bbwx"
48 // Namespace associated to packages should be of the form :
53 class ColourSelectorButton;
55 class wxColourPickerCtrlWidget :public wxPanel
59 wxColourPickerCtrlWidget( ColourSelectorButton* box,
65 ~wxColourPickerCtrlWidget();
66 void OnColorChange(wxColourPickerEvent& e);
69 wxColourPickerCtrl *picker;
70 ColourSelectorButton *mBox;
72 //------------------------------------------------------------------------
73 //------------------------------------------------------------------------
74 //------------------------------------------------------------------------
79 //------------------------------------------------------------------------
81 class /*BBTK_EXPORT*/ ColourSelectorButton : public bbtk::WxBlackBox
83 BBTK_BLACK_BOX_INTERFACE(ColourSelectorButton,bbtk::WxBlackBox);
84 BBTK_DECLARE_INPUT(In,std::string);
85 BBTK_DECLARE_OUTPUT(Out,std::string);
86 BBTK_PROCESS(Process);
87 BBTK_CREATE_WIDGET(CreateWidget);
92 virtual void bbUserConstructor();
95 wxColourPickerCtrlWidget* pickerWidget;
98 //=================================================================
99 // UserBlackBox description
100 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourSelectorButton,bbtk::WxBlackBox);
101 BBTK_NAME("ColourSelectorButton");
102 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
103 // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
104 BBTK_DESCRIPTION("A button which displays a colour picker dialog when clicked");
105 BBTK_INPUT(ColourSelectorButton,In,"Initial colour",std::string,"colour");
106 BBTK_OUTPUT(ColourSelectorButton,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string,"colour");
107 BBTK_END_DESCRIBE_BLACK_BOX(ColourSelectorButton);
108 //=================================================================
113 #endif // __bbwxColourSelectorButton_h_INCLUDED_H__
115 #endif //_USE_WXWIDGETS_