From: guigues Date: Fri, 12 Dec 2008 08:55:20 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: v0.9.1~36 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=c429a5e1229f3dbc56e2d0100980c7e4a3506d89;p=bbtk.git *** empty log message *** --- diff --git a/packages/std/src/bbstdCast.h b/packages/std/src/bbstdCast.h index 6f81b3a..73731a9 100644 --- a/packages/std/src/bbstdCast.h +++ b/packages/std/src/bbstdCast.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdCast.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:26 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/12/12 08:55:20 $ + Version: $Revision: 1.6 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,14 +33,15 @@ #define __bbstdCast_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //================================================================= - // UserBlackBox declaration + // BlackBox declaration template - class Cast : public bbtk::AtomicBlackBox + class bbstd_EXPORT Cast : public bbtk::AtomicBlackBox { BBTK_TEMPLATE2_BLACK_BOX_INTERFACE(Cast,bbtk::AtomicBlackBox,T,U); BBTK_DECLARE_INPUT(In,T); @@ -62,7 +63,7 @@ namespace bbstd //================================================================= - // UserBlackBox description + // BlackBox description BBTK_BEGIN_DESCRIBE_TEMPLATE2_BLACK_BOX(Cast,bbtk::AtomicBlackBox); BBTK_NAME("Cast"+bbtk::HumanTypeName()+"To"+bbtk::HumanTypeName()); BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr"); diff --git a/packages/std/src/bbstdConcatStrings.h b/packages/std/src/bbstdConcatStrings.h index 6b6d46c..715154c 100644 --- a/packages/std/src/bbstdConcatStrings.h +++ b/packages/std/src/bbstdConcatStrings.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdConcatStrings.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:26 $ - Version: $Revision: 1.6 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.7 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,10 +33,11 @@ #define __bbstdConcatStrings_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { - class ConcatStrings + class bbstd_EXPORT ConcatStrings : public bbtk::AtomicBlackBox { diff --git a/packages/std/src/bbstdConfiguration.h b/packages/std/src/bbstdConfiguration.h index 2482997..0c76ab3 100644 --- a/packages/std/src/bbstdConfiguration.h +++ b/packages/std/src/bbstdConfiguration.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdConfiguration.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:26 $ - Version: $Revision: 1.9 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,10 +33,11 @@ #define __bbstdConfiguration_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { - class Configuration + class bbstd_EXPORT Configuration : public bbtk::AtomicBlackBox { diff --git a/packages/std/src/bbstdExecBbiCommand.h b/packages/std/src/bbstdExecBbiCommand.h index c4fa1bf..7a85a7d 100755 --- a/packages/std/src/bbstdExecBbiCommand.h +++ b/packages/std/src/bbstdExecBbiCommand.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdExecBbiCommand.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:26 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.6 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,11 +33,12 @@ #define __bbstdExecBbiCommand_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { - class ExecBbiCommand + class bbstd_EXPORT ExecBbiCommand : public bbtk::AtomicBlackBox { diff --git a/packages/std/src/bbstdExecSystemCommand.h b/packages/std/src/bbstdExecSystemCommand.h index 2b4ed1f..6633faf 100755 --- a/packages/std/src/bbstdExecSystemCommand.h +++ b/packages/std/src/bbstdExecSystemCommand.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdExecSystemCommand.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:26 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.6 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,11 +33,12 @@ #define __bbstdExecSystemCommand_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { - class ExecSystemCommand + class bbstd_EXPORT ExecSystemCommand : public bbtk::AtomicBlackBox { diff --git a/packages/std/src/bbstdFilesFromDirectory.h b/packages/std/src/bbstdFilesFromDirectory.h index 10ec9b2..125909b 100644 --- a/packages/std/src/bbstdFilesFromDirectory.h +++ b/packages/std/src/bbstdFilesFromDirectory.h @@ -2,51 +2,53 @@ #define __bbstdFilesFromDirectory_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" #include "iostream" +#include "bbstd_EXPORT.h" namespace bbstd { -class /*BBTK_EXPORT*/ FilesFromDirectory - : - public bbtk::AtomicBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(FilesFromDirectory,bbtk::AtomicBlackBox); -//================================================================== -/// User callback called in the box contructor -virtual void bbUserConstructor(); -/// User callback called in the box copy constructor -virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer); -/// User callback called in the box destructor -virtual void bbUserDestructor(); -//================================================================== - BBTK_DECLARE_INPUT(In,std::string); - BBTK_DECLARE_INPUT(Recursive,bool); - BBTK_DECLARE_OUTPUT(Out,std::vector); - BBTK_PROCESS(Process); - void Process(); - + class bbstd_EXPORT FilesFromDirectory + : + public bbtk::AtomicBlackBox + { + BBTK_BLACK_BOX_INTERFACE(FilesFromDirectory,bbtk::AtomicBlackBox); + //================================================================== + /// User callback called in the box contructor + virtual void bbUserConstructor(); + /// User callback called in the box copy constructor + virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer); + /// User callback called in the box destructor + virtual void bbUserDestructor(); + //================================================================== + BBTK_DECLARE_INPUT(In,std::string); + BBTK_DECLARE_INPUT(Recursive,bool); + BBTK_DECLARE_OUTPUT(Out,std::vector); + BBTK_PROCESS(Process); + void Process(); + private : - std::string NormalizePath(std::string const &pathname); - int Explore(std::string const &dirpath, bool recursive); + std::string NormalizePath(std::string const &pathname); + int Explore(std::string const &dirpath, bool recursive); + + /// List of file names + std::vector Filenames; + /// name of the root directory to explore + std::string DirName; + }; - /// List of file names - std::vector Filenames; - /// name of the root directory to explore - std::string DirName; -}; - -//================================================================= -// UserBlackBox description -BBTK_BEGIN_DESCRIBE_BLACK_BOX(FilesFromDirectory,bbtk::AtomicBlackBox); -BBTK_NAME("FilesFromDirectory"); -BBTK_AUTHOR("jpr@creatis.univ-lyon1.fr"); -BBTK_DESCRIPTION("returns the fullPathNames of the files in a Directory"); -BBTK_CATEGORY(""); -BBTK_INPUT(FilesFromDirectory,In,"Directory Name",std::string,""); -BBTK_INPUT(FilesFromDirectory,Recursive,"Recursive directory exploration",bool,""); + //================================================================= + // BlackBox description + BBTK_BEGIN_DESCRIBE_BLACK_BOX(FilesFromDirectory,bbtk::AtomicBlackBox); + BBTK_NAME("FilesFromDirectory"); + BBTK_AUTHOR("jpr@creatis.univ-lyon1.fr"); + BBTK_DESCRIPTION("returns the fullPathNames of the files in a Directory"); + BBTK_CATEGORY(""); + BBTK_INPUT(FilesFromDirectory,In,"Directory Name",std::string,""); + BBTK_INPUT(FilesFromDirectory,Recursive,"Recursive directory exploration",bool,""); + + BBTK_OUTPUT(FilesFromDirectory,Out,"FullPathNames of the files",std::vector,""); + BBTK_END_DESCRIBE_BLACK_BOX(FilesFromDirectory); -BBTK_OUTPUT(FilesFromDirectory,Out,"FullPathNames of the files",std::vector,""); -BBTK_END_DESCRIBE_BLACK_BOX(FilesFromDirectory); } // EO namespace bbstd diff --git a/packages/std/src/bbstdGetVectorElement.h b/packages/std/src/bbstdGetVectorElement.h index 7b58724..d49110e 100644 --- a/packages/std/src/bbstdGetVectorElement.h +++ b/packages/std/src/bbstdGetVectorElement.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdGetVectorElement.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:26 $ - Version: $Revision: 1.3 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.4 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,13 +33,14 @@ #define __bbstdGetVectorElement_INCLUDED_h__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //================================================================= // BlackBox declaration template - class GetVectorElement : public bbtk::AtomicBlackBox + class bbstd_EXPORT GetVectorElement : public bbtk::AtomicBlackBox { BBTK_TEMPLATE_BLACK_BOX_INTERFACE(GetVectorElement,bbtk::AtomicBlackBox,T); BBTK_DECLARE_INPUT(In,std::vector); diff --git a/packages/std/src/bbstdMagicBox.h b/packages/std/src/bbstdMagicBox.h index ca4f2cc..ffd86de 100644 --- a/packages/std/src/bbstdMagicBox.h +++ b/packages/std/src/bbstdMagicBox.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdMagicBox.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:27 $ - Version: $Revision: 1.9 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,11 +33,12 @@ #define __bbstdMagicBox_h_INCLUDED_H__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //================================================================== - class MagicBox + class bbstd_EXPORT MagicBox : public bbtk::AtomicBlackBox { diff --git a/packages/std/src/bbstdMakeFileName.h b/packages/std/src/bbstdMakeFileName.h index 657e7c3..d259137 100644 --- a/packages/std/src/bbstdMakeFileName.h +++ b/packages/std/src/bbstdMakeFileName.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdMakeFileName.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:27 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,10 +33,11 @@ #define __bbstdMakeFileName_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { - class MakeFileName + class bbstd_EXPORT MakeFileName : public bbtk::AtomicBlackBox { diff --git a/packages/std/src/bbstdRelay.h b/packages/std/src/bbstdRelay.h index 676da80..a2a3ce9 100644 --- a/packages/std/src/bbstdRelay.h +++ b/packages/std/src/bbstdRelay.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdRelay.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:27 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,12 +33,13 @@ #define __bbstdRelay_h_INCLUDED_H__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //======================================================================= template - class Relay + class bbstd_EXPORT Relay : public bbtk::AtomicBlackBox { diff --git a/packages/std/src/bbstdStringSelect.h b/packages/std/src/bbstdStringSelect.h index bdb9e45..2e3ab73 100644 --- a/packages/std/src/bbstdStringSelect.h +++ b/packages/std/src/bbstdStringSelect.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdStringSelect.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:27 $ - Version: $Revision: 1.6 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.7 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,11 +33,12 @@ #define __bbstdStringSelect_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //======================================================================= - class /*BBTK_EXPORT*/ StringSelect + class bbstd_EXPORT StringSelect : public bbtk::AtomicBlackBox { diff --git a/packages/std/src/bbstdStringTo.h b/packages/std/src/bbstdStringTo.h index 35bc909..1e68938 100644 --- a/packages/std/src/bbstdStringTo.h +++ b/packages/std/src/bbstdStringTo.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdStringTo.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:27 $ - Version: $Revision: 1.6 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.7 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,13 +33,14 @@ #define __bbstdStringTo_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //================================================================= // BlackBox declaration template - class StringTo : public bbtk::AtomicBlackBox + class bbstd_EXPORT StringTo : public bbtk::AtomicBlackBox { BBTK_TEMPLATE_BLACK_BOX_INTERFACE(StringTo,bbtk::AtomicBlackBox,T); BBTK_DECLARE_INPUT(In,std::string); diff --git a/packages/std/src/bbstdStringToVector.h b/packages/std/src/bbstdStringToVector.h index 5243d1a..7b515d1 100644 --- a/packages/std/src/bbstdStringToVector.h +++ b/packages/std/src/bbstdStringToVector.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdStringToVector.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:27 $ - Version: $Revision: 1.8 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.9 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,13 +33,14 @@ #define __bbstdStringToVector_INCLUDED_h__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //================================================================= // BlackBox declaration template - class StringToVector : public bbtk::AtomicBlackBox + class bbstd_EXPORT StringToVector : public bbtk::AtomicBlackBox { BBTK_TEMPLATE_BLACK_BOX_INTERFACE(StringToVector,bbtk::AtomicBlackBox,T); BBTK_DECLARE_INPUT(In,std::string); diff --git a/packages/std/src/bbstdToString.h b/packages/std/src/bbstdToString.h index 6f08faf..ab8c6a2 100644 --- a/packages/std/src/bbstdToString.h +++ b/packages/std/src/bbstdToString.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdToString.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:27 $ - Version: $Revision: 1.6 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.7 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -33,13 +33,14 @@ #define __bbstdToString_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //================================================================= // BlackBox declaration template - class ToString : public bbtk::AtomicBlackBox + class bbstd_EXPORT ToString : public bbtk::AtomicBlackBox { BBTK_TEMPLATE_BLACK_BOX_INTERFACE(ToString,bbtk::AtomicBlackBox,T); BBTK_DECLARE_INPUT(In,T); diff --git a/packages/std/src/bbstdVectorToString.h b/packages/std/src/bbstdVectorToString.h index 86b6d4d..b75907d 100644 --- a/packages/std/src/bbstdVectorToString.h +++ b/packages/std/src/bbstdVectorToString.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbstdVectorToString.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:27 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/12/12 08:55:21 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -34,13 +34,14 @@ #define __bbstdVectorToString_INCLUDED_h__ #include "bbtkAtomicBlackBox.h" +#include "bbstd_EXPORT.h" namespace bbstd { //================================================================= // BlackBox declaration template - class VectorToString : public bbtk::AtomicBlackBox + class bbstd_EXPORT VectorToString : public bbtk::AtomicBlackBox { BBTK_TEMPLATE_BLACK_BOX_INTERFACE(VectorToString,bbtk::AtomicBlackBox,T); BBTK_DECLARE_INPUT(In,std::vector); diff --git a/packages/wx/src/bbwxColourSelector.h b/packages/wx/src/bbwxColourSelector.h index 2b9b6f9..4c19eae 100644 --- a/packages/wx/src/bbwxColourSelector.h +++ b/packages/wx/src/bbwxColourSelector.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxColourSelector.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:32 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -51,8 +51,10 @@ #ifndef __bbWxColourSelector_h__ #define __bbWxColourSelector_h__ -// Include wxBlackBox definition -#include "bbtkWxBlackBox.h" +// Include base BlackBox definition +#include "bbtkAtomicBlackBox.h" +// Include bbwx_EXPORT symbol definition +#include "bbwx_EXPORT.h" // Namespace of the package "wx" is "bbwx" // Namespace associated to packages should be of the form : @@ -61,25 +63,20 @@ namespace bbwx { //================================================================= - class /*BBTK_EXPORT*/ ColourSelector : public bbtk::AtomicBlackBox + class bbwx_EXPORT ColourSelector : public bbtk::AtomicBlackBox { BBTK_BLACK_BOX_INTERFACE(ColourSelector,bbtk::AtomicBlackBox); BBTK_DECLARE_OUTPUT(Out,std::string); BBTK_PROCESS(Process); -// BBTK_CREATE_WIDGET(CreateWidget); void Process(); -// void CreateWidget(); - protected: virtual void bbUserConstructor(); - // private: - // wxColourSelector* mColorDialog; }; - + //================================================================= // UserBlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourSelector,bbtk::AtomicBlackBox); - // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); + BBTK_CATEGORY("widget"); BBTK_NAME("ColourSelector"); BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr"); BBTK_DESCRIPTION("Colour Selector dialog (bbfication of wxColourSelector)"); @@ -88,6 +85,6 @@ namespace bbwx //================================================================= }//namespace bbtk -#endif // __bbtkWxColourSelector_h__ -#endif //_USE_WXWIDGETS_ +#endif // __bbtkWxColourSelector_h__ +#endif //USE_WXWIDGETS diff --git a/packages/wx/src/bbwxColourSelectorButton.cxx b/packages/wx/src/bbwxColourSelectorButton.cxx index 60ff6fd..f61de88 100644 --- a/packages/wx/src/bbwxColourSelectorButton.cxx +++ b/packages/wx/src/bbwxColourSelectorButton.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxColourSelectorButton.cxx,v $ Language: C++ - Date: $Date: 2008/11/25 13:01:32 $ - Version: $Revision: 1.8 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.9 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -42,9 +42,29 @@ #include "bbwxColourSelectorButton.h" #include "bbwxPackage.h" +#include namespace bbwx { +//------------------------------------------------------------------------- +class wxColourPickerCtrlWidget :public wxPanel +{ + +public: + wxColourPickerCtrlWidget( ColourSelectorButton* box, + wxWindow *parent, + unsigned char cr, + unsigned char cg, + unsigned char cb ); + + ~wxColourPickerCtrlWidget(); + void OnColorChange(wxColourPickerEvent& e); + void UpdateBox(); +private: + wxColourPickerCtrl *picker; + ColourSelectorButton *mBox; +}; +//------------------------------------------------------------------------- //------------------------------------------------------------------------- wxColourPickerCtrlWidget::wxColourPickerCtrlWidget( ColourSelectorButton* box, diff --git a/packages/wx/src/bbwxColourSelectorButton.h b/packages/wx/src/bbwxColourSelectorButton.h index aef50a2..3e6a81e 100644 --- a/packages/wx/src/bbwxColourSelectorButton.h +++ b/packages/wx/src/bbwxColourSelectorButton.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxColourSelectorButton.h,v $ Language: C++ - Date: $Date: 2008/11/25 11:17:25 $ - Version: $Revision: 1.9 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -41,8 +41,7 @@ * \class bbwx::ColourSelectorButton * \brief - * \class bbwx::wxColourPickerCtrlWidget - * \brief + */ #ifdef _USE_WXWIDGETS_ @@ -55,8 +54,7 @@ // Include wxBlackBox definition #include "bbtkWxBlackBox.h" - -#include +#include "bbwx_EXPORT.h" // Namespace of the package "wx" is "bbwx" // Namespace associated to packages should be of the form : @@ -64,30 +62,10 @@ namespace bbwx { - //================================================================= -class ColourSelectorButton; - -class wxColourPickerCtrlWidget :public wxPanel -{ -public: - wxColourPickerCtrlWidget( ColourSelectorButton* box, - wxWindow *parent, - unsigned char cr, - unsigned char cg, - unsigned char cb ); - - ~wxColourPickerCtrlWidget(); - void OnColorChange(wxColourPickerEvent& e); - void UpdateBox(); -private: - wxColourPickerCtrl *picker; - ColourSelectorButton *mBox; -}; - -//------------------------------------------------------------------------ -// The black box - class /*BBTK_EXPORT*/ ColourSelectorButton : public bbtk::WxBlackBox + //------------------------------------------------------------------------ + // The black box + class bbwx_EXPORT ColourSelectorButton : public bbtk::WxBlackBox { BBTK_BLACK_BOX_INTERFACE(ColourSelectorButton,bbtk::WxBlackBox); BBTK_DECLARE_INPUT(In,std::string); @@ -96,17 +74,13 @@ private: BBTK_CREATE_WIDGET(CreateWidget); void Process(); void CreateWidget(wxWindow*); - protected: virtual void bbUserConstructor(); - /* - private: - wxColourPickerCtrlWidget* pickerWidget; - */ }; + //================================================================= //================================================================= - // UserBlackBox description + // BlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourSelectorButton,bbtk::WxBlackBox); // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); BBTK_NAME("ColourSelectorButton"); @@ -120,4 +94,4 @@ private: }//namespace bbtk #endif // __bbtkWxColourSelector_h__ -#endif //_USE_WXWIDGETS_ +#endif //USE_WXWIDGETS diff --git a/packages/wx/src/bbwxCommandButton.cxx b/packages/wx/src/bbwxCommandButton.cxx index b56228f..e216d99 100644 --- a/packages/wx/src/bbwxCommandButton.cxx +++ b/packages/wx/src/bbwxCommandButton.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxCommandButton.cxx,v $ Language: C++ - Date: $Date: 2008/11/25 11:31:03 $ - Version: $Revision: 1.13 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.14 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -46,8 +46,27 @@ namespace bbwx { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,CommandButton); - + + + //-------------------------------------------------------------------------- + class CommandButtonWidget : public wxPanel + { + public: + CommandButtonWidget(CommandButton* box, wxWindow *parent, + wxString title); + ~CommandButtonWidget(); + void OnCommandButton( wxEvent& ); + void SetLabel(wxString title); + void SetColour(wxColour color); + + private: + CommandButton* mBox; + wxButton *mwxCommandButton; + }; + + //-------------------------------------------------------------------------- + //-------------------------------------------------------------------------- + CommandButtonWidget::CommandButtonWidget(CommandButton* box, wxWindow *parent, wxString title ) @@ -166,7 +185,7 @@ namespace bbwx //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- - + BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,CommandButton); BBTK_BLACK_BOX_IMPLEMENTATION(CommandButton,bbtk::WxBlackBox); void CommandButton::bbUserConstructor() diff --git a/packages/wx/src/bbwxCommandButton.h b/packages/wx/src/bbwxCommandButton.h index 36a4f9c..ccbb0e0 100644 --- a/packages/wx/src/bbwxCommandButton.h +++ b/packages/wx/src/bbwxCommandButton.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxCommandButton.h,v $ Language: C++ - Date: $Date: 2008/11/24 15:45:51 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -36,49 +36,29 @@ */ /** * \file - * \brief Pattern for the definition of a new type of Node (header) + * \brief */ /** - * \class bbtk::NodePatern - * \brief Pattern for the definition of a new type of Node + * \class CommandButton + * \brief */ -#ifdef _USE_WXWIDGETS_ +#ifdef USE_WXWIDGETS #ifndef __bbwxCommandButton_h_INCLUDED_H__ #define __bbwxCommandButton_h_INCLUDED_H__ #include "bbtkWxBlackBox.h" - +#include "bbwx_EXPORT.h" namespace bbwx { - class CommandButton; //-------------------------------------------------------------------------- - class CommandButtonWidget : public wxPanel - { - public: - CommandButtonWidget(CommandButton* box, wxWindow *parent, - wxString title); - ~CommandButtonWidget(); - void OnCommandButton( wxEvent& ); - void SetLabel(wxString title); - void SetColour(wxColour color); - - private: - CommandButton* mBox; - wxButton *mwxCommandButton; - }; - - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - - class /*BBTK_EXPORT*/ CommandButton : public bbtk::WxBlackBox + class bbwx_EXPORT CommandButton : public bbtk::WxBlackBox { friend class CommandButtonWidget; BBTK_BLACK_BOX_INTERFACE(CommandButton,bbtk::WxBlackBox); @@ -98,14 +78,14 @@ namespace bbwx void UpdateColour(); void UpdateLabel(); }; - + //================================================================= // UserBlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(CommandButton,bbtk::WxBlackBox); BBTK_NAME("CommandButton"); BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr"); BBTK_DESCRIPTION("Button which executes bbi commands"); - + typedef std::vector vectorcolour; BBTK_INPUT(CommandButton,In,"Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote (\").",std::string,""); @@ -114,10 +94,10 @@ namespace bbwx // BBTK_OUTPUT(CommandButton,Out,"..Out..",int); BBTK_END_DESCRIBE_BLACK_BOX(CommandButton); //================================================================= - - + + }//namespace bbwx - + #endif // __bbwxCommandButton_h_INCLUDED_H__ - -#endif //_USE_WXWIDGETS_ + +#endif //USE_WXWIDGETS diff --git a/packages/wx/src/bbwxDirectorySelector.h b/packages/wx/src/bbwxDirectorySelector.h index d95dda4..362a75b 100644 --- a/packages/wx/src/bbwxDirectorySelector.h +++ b/packages/wx/src/bbwxDirectorySelector.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxDirectorySelector.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:32 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.6 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -36,24 +36,23 @@ * can span multiple lines */ /** - * \file - * \brief Pattern for the definition of a new type of Node (header) + * \file bbwxDirectorySelector.h + * \brief */ /** - * \class bbtk::NodePatern - * \brief Pattern for the definition of a new type of Node + * \class DirectorySelector + * \brief */ -#ifdef _USE_WXWIDGETS_ +#ifdef USE_WXWIDGETS #ifndef __bbWxDirectorySelector_h__ #define __bbWxDirectorySelector_h__ #include "bbtkAtomicBlackBox.h" - - +#include "bbwx_EXPORT.h" namespace bbwx { @@ -62,7 +61,7 @@ namespace bbwx //================================================================= - class /*BBTK_EXPORT*/ DirectorySelector : public bbtk::AtomicBlackBox + class bbwx_EXPORT DirectorySelector : public bbtk::AtomicBlackBox { BBTK_BLACK_BOX_INTERFACE(DirectorySelector,bbtk::AtomicBlackBox); BBTK_DECLARE_INPUT(Title,std::string); @@ -101,4 +100,4 @@ namespace bbwx //namespace bbtk #endif //__bbtkWxDirectorySelector_h__ -#endif //_USE_WXWIDGETS_ +#endif //USE_WXWIDGETS diff --git a/packages/wx/src/bbwxFileSelector.h b/packages/wx/src/bbwxFileSelector.h index 45fd951..32faca1 100644 --- a/packages/wx/src/bbwxFileSelector.h +++ b/packages/wx/src/bbwxFileSelector.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxFileSelector.h,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:32 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.6 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -45,14 +45,14 @@ */ -#ifdef _USE_WXWIDGETS_ +#ifdef USE_WXWIDGETS #ifndef __bbWxFileSelector_h__ #define __bbWxFileSelector_h__ #include "bbtkAtomicBlackBox.h" - +#include "bbwx_EXPORT.h" namespace bbwx @@ -62,7 +62,7 @@ namespace bbwx //================================================================= - class /*BBTK_EXPORT*/ FileSelector : public bbtk::AtomicBlackBox + class bbwx_EXPORT FileSelector : public bbtk::AtomicBlackBox { BBTK_BLACK_BOX_INTERFACE(FileSelector,bbtk::AtomicBlackBox); BBTK_DECLARE_INPUT(Title,std::string); @@ -109,4 +109,4 @@ namespace bbwx //namespace bbtk #endif //__bbtkWxFileSelector_h__ -#endif //_USE_WXWIDGETS_ +#endif //USE_WXWIDGETS diff --git a/packages/wx/src/bbwxInputText.cxx b/packages/wx/src/bbwxInputText.cxx index 49559fe..cc7c724 100644 --- a/packages/wx/src/bbwxInputText.cxx +++ b/packages/wx/src/bbwxInputText.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxInputText.cxx,v $ Language: C++ - Date: $Date: 2008/11/24 15:45:51 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.5 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -47,7 +47,35 @@ namespace bbwx { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,InputText); + + + + + + //-------------------------------------------------------------------------- + class InputTextWidget : wxPanel + { + public: + InputTextWidget(InputText* box, wxWindow *parent, + wxString In, wxString title); + ~InputTextWidget(); + + std::string GetValue(); + void OnTextUpdate(wxCommandEvent& event); + + void SetTitle(wxString); + + private: + InputText *mBox; + wxTextCtrl *mwxTextCtrl; + wxStaticText *mwxTitle; + }; + + //------------------------------------------------------------------------ + //------------------------------------------------------------------------ + //------------------------------------------------------------------------ + + InputTextWidget::InputTextWidget(InputText* box, @@ -118,7 +146,7 @@ namespace bbwx //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- - + BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,InputText); BBTK_BLACK_BOX_IMPLEMENTATION(InputText,bbtk::WxBlackBox); diff --git a/packages/wx/src/bbwxInputText.h b/packages/wx/src/bbwxInputText.h index 05a330a..e6d5b43 100644 --- a/packages/wx/src/bbwxInputText.h +++ b/packages/wx/src/bbwxInputText.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxInputText.h,v $ Language: C++ - Date: $Date: 2008/11/24 15:45:51 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.6 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -53,44 +53,14 @@ #include "bbtkWxBlackBox.h" - +#include "bbwx_EXPORT.h" namespace bbwx { - - - class InputText; - - //-------------------------------------------------------------------------- - class InputTextWidget : wxPanel - { - public: - InputTextWidget(InputText* box, wxWindow *parent, - wxString In, wxString title); - ~InputTextWidget(); - - std::string GetValue(); - void OnTextUpdate(wxCommandEvent& event); - - void SetTitle(wxString); - - private: - InputText *mBox; - wxTextCtrl *mwxTextCtrl; - wxStaticText *mwxTitle; - }; - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - - - - - - class /*BBTK_EXPORT*/ InputText : public bbtk::WxBlackBox + //================================================================= + class bbwx_EXPORT InputText : public bbtk::WxBlackBox { BBTK_BLACK_BOX_INTERFACE(InputText,bbtk::WxBlackBox); @@ -105,10 +75,11 @@ namespace bbwx protected: virtual void bbUserConstructor(); }; + //================================================================= //================================================================= - // UserBlackBox description + // BlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(InputText,bbtk::WxBlackBox); BBTK_NAME("InputText"); BBTK_AUTHOR("laurent guigues at creatis.insa-lyon.fr"); @@ -131,4 +102,4 @@ namespace bbwx //namespace bbtk #endif //__bbWxInputText_h__ -#endif //_USE_WXWIDGETS_ +#endif //USE_WXWIDGETS diff --git a/packages/wx/src/bbwxLayoutLine.h b/packages/wx/src/bbwxLayoutLine.h index 461530f..39ff236 100644 --- a/packages/wx/src/bbwxLayoutLine.h +++ b/packages/wx/src/bbwxLayoutLine.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxLayoutLine.h,v $ Language: C++ - Date: $Date: 2008/12/11 15:30:14 $ - Version: $Revision: 1.8 $ + Date: $Date: 2008/12/12 08:55:23 $ + Version: $Revision: 1.9 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -45,7 +45,7 @@ */ -#ifdef _USE_WXWIDGETS_ +#ifdef USE_WXWIDGETS #ifndef __bbWxLayoutLine_h__ @@ -60,7 +60,7 @@ namespace bbwx - + //=========================================================== class bbwx_EXPORT LayoutLine : public bbtk::WxBlackBox { @@ -88,16 +88,16 @@ namespace bbwx void TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer); }; + //=========================================================== -//================================================================= -// BlackBox description + //================================================================= + // BlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutLine,bbtk::WxBlackBox); BBTK_NAME("LayoutLine"); BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr"); BBTK_DESCRIPTION("LayoutLine widget (wxBoxSizer)"); - // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); - + // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); BBTK_INPUT(LayoutLine,Widget1,"widget 1",wxWindow*,""); BBTK_INPUT(LayoutLine,Widget2,"widget 2",wxWindow*,""); BBTK_INPUT(LayoutLine,Widget3,"widget 3",wxWindow*,""); @@ -111,8 +111,8 @@ namespace bbwx BBTK_END_DESCRIBE_BLACK_BOX(LayoutLine); //================================================================= - - + + } @@ -120,4 +120,4 @@ namespace bbwx //namespace bbtk #endif //__bbtkWxLayoutLine_h__ -#endif //_USE_WXWIDGETS_ +#endif //USE_WXWIDGETS diff --git a/packages/wx/src/bbwxLayoutSplit.h b/packages/wx/src/bbwxLayoutSplit.h index 2b549b5..0182754 100644 --- a/packages/wx/src/bbwxLayoutSplit.h +++ b/packages/wx/src/bbwxLayoutSplit.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxLayoutSplit.h,v $ Language: C++ - Date: $Date: 2008/11/24 15:45:51 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/12/12 08:55:24 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -41,7 +41,7 @@ */ -#ifdef _USE_WXWIDGETS_ +#ifdef USE_WXWIDGETS #ifndef __bbWxLayoutSplit_h__ @@ -50,7 +50,7 @@ #include "bbtkWxBlackBox.h" #include - +#include "bbwx_EXPORT.h" namespace bbwx { @@ -58,7 +58,8 @@ namespace bbwx - class LayoutSplit : public bbtk::WxBlackBox + //================================================================= + class bbwx_EXPORT LayoutSplit : public bbtk::WxBlackBox { BBTK_BLACK_BOX_INTERFACE(LayoutSplit,bbtk::WxBlackBox); @@ -78,10 +79,11 @@ namespace bbwx virtual void bbUserConstructor(); }; + //================================================================= -//================================================================= -// BlackBox description + //================================================================= + // BlackBox description BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutSplit,bbtk::WxBlackBox); BBTK_NAME("LayoutSplit"); BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr"); @@ -90,7 +92,7 @@ namespace bbwx BBTK_INPUT(LayoutSplit,Widget1,"Upper or left widget",wxWindow*,""); BBTK_INPUT(LayoutSplit,Widget2,"Lower or right widget",wxWindow*,""); BBTK_INPUT(LayoutSplit,Orientation,"Orientation (default H), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,""); - BBTK_INPUT(LayoutSplit,Proportion,"Proportion (in percent) of the first children in the window",int,""); + BBTK_INPUT(LayoutSplit,Proportion,"Proportion (in percent) of the first children in the window",int,""); BBTK_END_DESCRIBE_BLACK_BOX(LayoutSplit); //================================================================= } @@ -98,4 +100,4 @@ namespace bbwx //namespace bbtk #endif //__bbtkWxLayoutSplit_h__ -#endif //_USE_WXWIDGETS_ +#endif //USE_WXWIDGETS diff --git a/packages/wx/src/bbwxLayoutTab.h b/packages/wx/src/bbwxLayoutTab.h index ee306d7..f0e2c48 100644 --- a/packages/wx/src/bbwxLayoutTab.h +++ b/packages/wx/src/bbwxLayoutTab.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxLayoutTab.h,v $ Language: C++ - Date: $Date: 2008/11/25 13:18:33 $ - Version: $Revision: 1.9 $ + Date: $Date: 2008/12/12 08:55:24 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -54,6 +54,7 @@ #include "bbtkWxBlackBox.h" #include +#include "bbwx_EXPORT.h" namespace bbwx { @@ -61,7 +62,7 @@ namespace bbwx - class /*BBTK_EXPORT*/ LayoutTab : public bbtk::WxBlackBox + class bbwx_EXPORT LayoutTab : public bbtk::WxBlackBox { BBTK_BLACK_BOX_INTERFACE(LayoutTab,bbtk::WxBlackBox); diff --git a/packages/wx/src/bbwxRadioButton.cxx b/packages/wx/src/bbwxRadioButton.cxx index 6975509..203fd9e 100644 --- a/packages/wx/src/bbwxRadioButton.cxx +++ b/packages/wx/src/bbwxRadioButton.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxRadioButton.cxx,v $ Language: C++ - Date: $Date: 2008/11/24 15:45:51 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/12/12 08:55:24 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -44,8 +44,33 @@ namespace bbwx { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,RadioButton); + + + //-------------------------------------------------------------------------- + // The widget created by the box + class RadioButtonWidget : public wxPanel + { + public: + RadioButtonWidget( RadioButton* box, wxWindow *parent, + int In, + wxString title, + std::vector lstIn ); + + ~RadioButtonWidget(); + + int GetValue(); + void OnRadioButton(wxEvent& event); + + private: + RadioButton *mBox; + int MAX_RADIOBUTTON; + wxRadioButton *mwxRadioButton[10]; + }; + //------------------------------------------------------------------------ + //------------------------------------------------------------------------ + //------------------------------------------------------------------------ + //------------------------------------------------------------------------- RadioButtonWidget::RadioButtonWidget( RadioButton* box, wxWindow *parent, @@ -151,7 +176,7 @@ namespace bbwx //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- - + BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,RadioButton); BBTK_BLACK_BOX_IMPLEMENTATION(RadioButton,bbtk::WxBlackBox); diff --git a/packages/wx/src/bbwxRadioButton.h b/packages/wx/src/bbwxRadioButton.h index 79bcb63..adeed84 100644 --- a/packages/wx/src/bbwxRadioButton.h +++ b/packages/wx/src/bbwxRadioButton.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxRadioButton.h,v $ Language: C++ - Date: $Date: 2008/11/24 15:45:51 $ - Version: $Revision: 1.6 $ + Date: $Date: 2008/12/12 08:55:24 $ + Version: $Revision: 1.7 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -54,6 +54,8 @@ #define __bbWxRadioButton_h__ #include "bbtkWxBlackBox.h" +#include "bbwx_EXPORT.h" + // Namespace of the package "wx" is "bbwx" // Namespace associated to packages should be of the form : @@ -62,36 +64,7 @@ namespace bbwx { - - - class RadioButton; - - //-------------------------------------------------------------------------- - // The widget created by the box - class RadioButtonWidget : public wxPanel - { - public: - RadioButtonWidget( RadioButton* box, wxWindow *parent, - int In, - wxString title, - std::vector lstIn ); - - ~RadioButtonWidget(); - - int GetValue(); - void OnRadioButton(wxEvent& event); - - private: - RadioButton *mBox; - int MAX_RADIOBUTTON; - wxRadioButton *mwxRadioButton[10]; - }; - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - - class /*BBTK_EXPORT*/ RadioButton : public bbtk::WxBlackBox + class bbwx_EXPORT RadioButton : public bbtk::WxBlackBox { BBTK_BLACK_BOX_INTERFACE(RadioButton,bbtk::WxBlackBox);