From 7f3e351235aade22bdfd826c6422d095285c20c8 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Thu, 14 Feb 2008 19:19:52 +0000 Subject: [PATCH] *** empty log message *** --- packages/wx/src/bbwxColourDialog.cxx | 38 ++++++++++++------------ packages/wx/src/bbwxColourDialog.h | 19 ++++++------ packages/wx/src/bbwxColourDialogButton.h | 8 ++--- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/packages/wx/src/bbwxColourDialog.cxx b/packages/wx/src/bbwxColourDialog.cxx index 7f6c929..805254b 100644 --- a/packages/wx/src/bbwxColourDialog.cxx +++ b/packages/wx/src/bbwxColourDialog.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxColourDialog.cxx,v $ Language: C++ - Date: $Date: 2008/02/14 16:55:07 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/02/14 19:19:52 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -27,6 +27,7 @@ #include "bbwxColourDialog.h" #include "bbwxPackage.h" +#include @@ -34,7 +35,7 @@ namespace bbwx { BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourDialog); - BBTK_USER_BLACK_BOX_IMPLEMENTATION(ColourDialog,bbtk::WxBlackBox); + BBTK_USER_BLACK_BOX_IMPLEMENTATION(ColourDialog,bbtk::AtomicBlackBox); void ColourDialog::bbUserConstructor() @@ -46,26 +47,25 @@ namespace bbwx bbtkDebugMessageInc("Core",9,"ColourDialog::Process() [" <GetReturnCode()==wxID_OK) + wxColourDialog *colordialog = new wxColourDialog( 0 ); + colordialog->ShowModal(); + if (colordialog->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(""); - } - + 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 ColourDialog::CreateWidget() - { - mColorDialog = new wxColourDialog( 0 ); - bbSetOutputWidget( mColorDialog ); - } +// void ColourDialog::CreateWidget() +// { +// mColorDialog = new wxColourDialog( 0 ); +// bbSetOutputWidget( mColorDialog ); +// } }//namespace bbwx diff --git a/packages/wx/src/bbwxColourDialog.h b/packages/wx/src/bbwxColourDialog.h index 1877264..db5edc9 100644 --- a/packages/wx/src/bbwxColourDialog.h +++ b/packages/wx/src/bbwxColourDialog.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxColourDialog.h,v $ Language: C++ - Date: $Date: 2008/02/14 16:55:07 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/02/14 19:19:52 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -37,7 +37,6 @@ #include "bbtkWxBlackBox.h" -#include // Namespace of the package "wx" is "bbwx" // Namespace associated to packages should be of the form : @@ -49,26 +48,26 @@ namespace bbwx //================================================================= - class /*BBTK_EXPORT*/ ColourDialog : public bbtk::WxBlackBox + class /*BBTK_EXPORT*/ ColourDialog : public bbtk::AtomicBlackBox { - BBTK_USER_BLACK_BOX_INTERFACE(ColourDialog,bbtk::WxBlackBox); + BBTK_USER_BLACK_BOX_INTERFACE(ColourDialog,bbtk::AtomicBlackBox); BBTK_DECLARE_OUTPUT(Out,std::string); BBTK_PROCESS(Process); - BBTK_CREATE_WIDGET(CreateWidget); +// BBTK_CREATE_WIDGET(CreateWidget); void Process(); - void CreateWidget(); +// void CreateWidget(); protected: virtual void bbUserConstructor(); - private: - wxColourDialog* mColorDialog; + // private: + // wxColourDialog* mColorDialog; }; //================================================================= //================================================================= // UserBlackBox description - BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourDialog,bbtk::WxBlackBox); + BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourDialog,bbtk::AtomicBlackBox); // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); BBTK_NAME("ColourDialog"); BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr"); diff --git a/packages/wx/src/bbwxColourDialogButton.h b/packages/wx/src/bbwxColourDialogButton.h index 75fb6d4..4ea9f89 100644 --- a/packages/wx/src/bbwxColourDialogButton.h +++ b/packages/wx/src/bbwxColourDialogButton.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxColourDialogButton.h,v $ Language: C++ - Date: $Date: 2008/02/13 15:09:37 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/02/14 19:19:52 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,10 +24,10 @@ */ /** - * \class bbwx::Slider + * \class bbwx::ColourDialogButton * \brief - * \class bbwx::SliderWidget + * \class bbwx::wxColourPickerCtrlWidget * \brief */ -- 2.45.1