/*========================================================================= Program: bbtk Module: $RCSfile: bbwxColourDialog.cxx,v $ Language: C++ Date: $Date: 2008/02/14 16:55:07 $ 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 "bbwxColourDialog.h" #include "bbwxPackage.h" namespace bbwx { BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourDialog); BBTK_USER_BLACK_BOX_IMPLEMENTATION(ColourDialog,bbtk::WxBlackBox); void ColourDialog::bbUserConstructor() { } void ColourDialog::Process() { bbtkDebugMessageInc("Core",9,"ColourDialog::Process() [" <GetReturnCode()==wxID_OK) { char col[100]; wxColour& c = mColorDialog->GetColourData().GetColour(); sprintf(col,"%f %f %f",c.Red()/255.,c.Green()/255.,c.Blue()/255.); bbSetOutputOut( col ); } else { bbSetOutputOut(""); } bbtkDebugDecTab("Core",9); } void ColourDialog::CreateWidget() { mColorDialog = new wxColourDialog( 0 ); bbSetOutputWidget( mColorDialog ); } }//namespace bbwx #endif // _USE_WXWIDGETS_