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
#include "bbwxColourDialog.h"
#include "bbwxPackage.h"
+#include <wx/colordlg.h>
{
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()
bbtkDebugMessageInc("Core",9,"ColourDialog::Process() ["
<<bbGetFullName()<<"]"<<std::endl);
- if (mColorDialog->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
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
#include "bbtkWxBlackBox.h"
-#include <wx/colordlg.h>
// Namespace of the package "wx" is "bbwx"
// Namespace associated to packages should be of the form :
//=================================================================
- 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");
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
*/
/**
- * \class bbwx::Slider
+ * \class bbwx::ColourDialogButton
* \brief
- * \class bbwx::SliderWidget
+ * \class bbwx::wxColourPickerCtrlWidget
* \brief
*/