1 /*=========================================================================
4 Module: $RCSfile: bbwxColourDialogButton.h,v $
6 Date: $Date: 2008/02/14 19:19:52 $
7 Version: $Revision: 1.2 $
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::ColourDialogButton
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 __bbwxColourDialogButton_h_INCLUDED_H__
40 #define __bbwxColourDialogButton_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 :
54 class ColourDialogButton;
56 class wxColourPickerCtrlWidget :public wxPanel
60 wxColourPickerCtrlWidget( ColourDialogButton* box,
66 ~wxColourPickerCtrlWidget();
67 void OnColorChange(wxColourPickerEvent& e);
70 wxColourPickerCtrl *picker;
71 ColourDialogButton *mBox;
73 //------------------------------------------------------------------------
74 //------------------------------------------------------------------------
75 //------------------------------------------------------------------------
80 //------------------------------------------------------------------------
82 class /*BBTK_EXPORT*/ ColourDialogButton : public bbtk::WxBlackBox
84 BBTK_USER_BLACK_BOX_INTERFACE(ColourDialogButton,bbtk::WxBlackBox);
85 BBTK_DECLARE_INPUT(In,std::string);
86 BBTK_DECLARE_OUTPUT(Out,std::string);
87 BBTK_PROCESS(Process);
88 BBTK_CREATE_WIDGET(CreateWidget);
93 virtual void bbUserConstructor();
96 wxColourPickerCtrlWidget* pickerWidget;
99 //=================================================================
100 // UserBlackBox description
101 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourDialogButton,bbtk::WxBlackBox);
102 BBTK_NAME("ColourDialogButton");
103 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
104 // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
105 BBTK_DESCRIPTION("A button which displays a colour picker dialog when clicked");
106 BBTK_INPUT(ColourDialogButton,In,"Initial colour",std::string);
107 BBTK_OUTPUT(ColourDialogButton,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string);
108 BBTK_END_DESCRIBE_BLACK_BOX(ColourDialogButton);
109 //=================================================================
114 #endif // __bbwxColourDialogButton_h_INCLUDED_H__
116 #endif //_USE_WXWIDGETS_