1 /*=========================================================================
4 Module: $RCSfile: bbwxColourSelector.cxx,v $
6 Date: $Date: 2008/02/20 11:51:59 $
7 Version: $Revision: 1.1 $
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 =========================================================================*/
24 #ifdef _USE_WXWIDGETS_
27 #include "bbwxColourSelector.h"
28 #include "bbwxPackage.h"
30 #include <wx/colordlg.h>
37 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourSelector);
38 BBTK_USER_BLACK_BOX_IMPLEMENTATION(ColourSelector,bbtk::AtomicBlackBox);
41 void ColourSelector::bbUserConstructor()
45 void ColourSelector::Process()
47 bbtkDebugMessageInc("Core",9,"ColourSelector::Process() ["
48 <<bbGetFullName()<<"]"<<std::endl);
50 wxColourDialog *colordialog = new wxColourDialog( 0 );
51 colordialog->ShowModal();
52 if (colordialog->GetReturnCode()==wxID_OK)
55 wxColour& c = colordialog->GetColourData().GetColour();
56 sprintf(col,"%f %f %f",c.Red()/255.,c.Green()/255.,c.Blue()/255.);
57 bbSetOutputOut( col );
61 bbtkDebugDecTab("Core",9);
64 // void ColourSelector::CreateWidget()
66 // mColorDialog = new wxColourSelector( 0 );
67 // bbSetOutputWidget( mColourSelector );
72 #endif // _USE_WXWIDGETS_