Program: bbtk
Module: $RCSfile: bbwxColourSelectorButton.h,v $
Language: C++
- Date: $Date: 2008/07/25 07:44:12 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/09/10 12:01:47 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
-
+
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
-
+
=========================================================================*/
+
/**
* \file
* \brief Short description in one line
namespace bbwx
{
+ //=================================================================
class ColourSelectorButton;
class wxColourPickerCtrlWidget :public wxPanel
{
public:
- wxColourPickerCtrlWidget( ColourSelectorButton* box,
- wxWindow *parent,
+ wxColourPickerCtrlWidget( ColourSelectorButton* box,
+ wxWindow *parent,
unsigned char cr,
unsigned char cg,
unsigned char cb );
void OnColorChange(wxColourPickerEvent& e);
void UpdateBox();
private:
- wxColourPickerCtrl *picker;
+ wxColourPickerCtrl *picker;
ColourSelectorButton *mBox;
};
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
-
-
-
//------------------------------------------------------------------------
// The black box
class /*BBTK_EXPORT*/ ColourSelectorButton : public bbtk::WxBlackBox
- {
+ {
BBTK_BLACK_BOX_INTERFACE(ColourSelectorButton,bbtk::WxBlackBox);
BBTK_DECLARE_INPUT(In,std::string);
BBTK_DECLARE_OUTPUT(Out,std::string);
void CreateWidget();
protected:
- virtual void bbUserConstructor();
-
+ virtual void bbUserConstructor();
+
private:
wxColourPickerCtrlWidget* pickerWidget;
};
-
+
//=================================================================
// UserBlackBox description
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourSelectorButton,bbtk::WxBlackBox);
+ // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
BBTK_NAME("ColourSelectorButton");
BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
- // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
BBTK_DESCRIPTION("A button which displays a colour picker dialog when clicked");
BBTK_INPUT(ColourSelectorButton,In,"Initial colour",std::string,"colour");
BBTK_OUTPUT(ColourSelectorButton,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string,"colour");
BBTK_END_DESCRIBE_BLACK_BOX(ColourSelectorButton);
//=================================================================
-
-
-}//namespace bbwx
-#endif // __bbwxColourSelectorButton_h_INCLUDED_H__
+}//namespace bbtk
+#endif // __bbtkWxColourSelector_h__
#endif //_USE_WXWIDGETS_