1 /*=========================================================================
4 Module: $RCSfile: bbwxColourSelector.cxx,v $
6 Date: $Date: 2008/04/18 12:59:52 $
7 Version: $Revision: 1.3 $
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 =========================================================================*/
23 #ifdef _USE_WXWIDGETS_
25 #include "bbwxColourSelector.h"
26 #include "bbwxPackage.h"
28 #include <wx/colordlg.h>
33 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourSelector);
34 BBTK_BLACK_BOX_IMPLEMENTATION(ColourSelector,bbtk::AtomicBlackBox);
36 void ColourSelector::bbUserConstructor()
40 void ColourSelector::Process()
42 bbtkDebugMessageInc("Core",9,"ColourSelector::Process() ["
43 <<bbGetFullName()<<"]"<<std::endl);
45 wxColourDialog *colordialog = new wxColourDialog( 0 );
46 colordialog->ShowModal();
47 if (colordialog->GetReturnCode()==wxID_OK)
50 wxColour& c = colordialog->GetColourData().GetColour();
51 sprintf(col,"%f %f %f",c.Red()/255.,c.Green()/255.,c.Blue()/255.);
52 bbSetOutputOut( col );
56 bbtkDebugDecTab("Core",9);
59 // void ColourSelector::CreateWidget()
61 // mColorDialog = new wxColourSelector( 0 );
62 // bbSetOutputWidget( mColourSelector );
67 #endif // _USE_WXWIDGETS_