/*========================================================================= Program: bbtk Module: $RCSfile: bbwxColourSelector.cxx,v $ Language: C++ Date: $Date: 2008/02/20 11:51:59 $ Version: $Revision: 1.1 $ 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 */ #ifdef _USE_WXWIDGETS_ #include "bbwxColourSelector.h" #include "bbwxPackage.h" #include namespace bbwx { BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourSelector); BBTK_USER_BLACK_BOX_IMPLEMENTATION(ColourSelector,bbtk::AtomicBlackBox); void ColourSelector::bbUserConstructor() { } void ColourSelector::Process() { bbtkDebugMessageInc("Core",9,"ColourSelector::Process() [" <ShowModal(); if (colordialog->GetReturnCode()==wxID_OK) { char col[100]; wxColour& c = colordialog->GetColourData().GetColour(); sprintf(col,"%f %f %f",c.Red()/255.,c.Green()/255.,c.Blue()/255.); bbSetOutputOut( col ); } else { bbSetOutputOut(""); } bbtkDebugDecTab("Core",9); } // void ColourSelector::CreateWidget() // { // mColorDialog = new wxColourSelector( 0 ); // bbSetOutputWidget( mColourSelector ); // } }//namespace bbwx #endif // _USE_WXWIDGETS_