X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fwx%2Fsrc%2FbbwxColourSelectorButton.cxx;h=042b494e5ba26aff2b61eefc6af321e638250c3e;hb=b7dd1ccf2db9c018dabadd835739aba15f3664ba;hp=60ff6fd18228e13868238394660d38d7efb68501;hpb=2d305d9737d382cd3c837a003ab8bfdd2fa10310;p=bbtk.git diff --git a/packages/wx/src/bbwxColourSelectorButton.cxx b/packages/wx/src/bbwxColourSelectorButton.cxx index 60ff6fd..042b494 100644 --- a/packages/wx/src/bbwxColourSelectorButton.cxx +++ b/packages/wx/src/bbwxColourSelectorButton.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxColourSelectorButton.cxx,v $ Language: C++ - Date: $Date: 2008/11/25 13:01:32 $ - Version: $Revision: 1.8 $ + Date: $Date: 2009/05/15 14:58:03 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -42,9 +42,29 @@ #include "bbwxColourSelectorButton.h" #include "bbwxPackage.h" +#include namespace bbwx { +//------------------------------------------------------------------------- +class wxColourPickerCtrlWidget :public wxPanel +{ + +public: + wxColourPickerCtrlWidget( ColourSelectorButton* box, + wxWindow *parent, + unsigned char cr, + unsigned char cg, + unsigned char cb ); + + ~wxColourPickerCtrlWidget(); + void OnColorChange(wxColourPickerEvent& e); + void UpdateBox(); +private: + wxColourPickerCtrl *picker; + ColourSelectorButton *mBox; +}; +//------------------------------------------------------------------------- //------------------------------------------------------------------------- wxColourPickerCtrlWidget::wxColourPickerCtrlWidget( ColourSelectorButton* box, @@ -116,16 +136,26 @@ void wxColourPickerCtrlWidget::UpdateBox() BBTK_BLACK_BOX_IMPLEMENTATION(ColourSelectorButton,bbtk::WxBlackBox); BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourSelectorButton); - void ColourSelectorButton::bbUserConstructor() - { - // Default input value - bbSetInputIn("1 1 1"); - // Initial output value = the same than input - bbSetOutputOut("1 1 1"); - // IMPORTANT : Initialize output widget to null pointer to test it after - bbSetOutputWidget(0); - } - + //----------------------------------------------------------------- + void ColourSelectorButton::bbUserSetDefaultValues() + { + // Default input value + bbSetInputIn("1 1 1"); + // Initial output value = the same than input + bbSetOutputOut("1 1 1"); + // IMPORTANT : Initialize output widget to null pointer to test it after + bbSetOutputWidget(0); + } + + //----------------------------------------------------------------- + void ColourSelectorButton::bbUserInitializeProcessing() + { + } + + //----------------------------------------------------------------- + void ColourSelectorButton::bbUserFinalizeProcessing() + { + } void ColourSelectorButton::Process() {