00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00048 #ifdef _USE_WXWIDGETS_
00049
00050
00051 #ifndef __bbWxFileSelector_h__
00052 #define __bbWxFileSelector_h__
00053
00054 #include "bbtkAtomicBlackBox.h"
00055
00056
00057
00058 namespace bbwx
00059 {
00060
00061
00062
00063
00064
00065 class FileSelector : public bbtk::AtomicBlackBox
00066 {
00067 BBTK_BLACK_BOX_INTERFACE(FileSelector,bbtk::AtomicBlackBox);
00068 BBTK_DECLARE_INPUT(Title,std::string);
00069 BBTK_DECLARE_INPUT(Message,std::string);
00070 BBTK_DECLARE_INPUT(DefaultDir,std::string);
00071 BBTK_DECLARE_INPUT(DefaultFile,std::string);
00072 BBTK_DECLARE_INPUT(Wildcard,std::string);
00073 BBTK_DECLARE_INPUT(OpenSave,std::string);
00074 BBTK_DECLARE_OUTPUT(Out,std::string);
00075 BBTK_PROCESS(Process);
00076 void Process();
00077
00078 protected:
00079 virtual void bbUserConstructor();
00080
00081 };
00082
00083
00084
00085
00086
00087 BBTK_BEGIN_DESCRIBE_BLACK_BOX(FileSelector,bbtk::AtomicBlackBox);
00088 BBTK_NAME("FileSelector");
00089 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
00090 BBTK_CATEGORY("widget");
00091 BBTK_DESCRIPTION("Pops up a file selection dialog for reading or saving (wxFileDialog)");
00092 BBTK_INPUT(FileSelector,Title,"Title of the dialog",std::string,"");
00093 BBTK_INPUT(FileSelector,Message,"Message to show on the dialog",
00094 std::string,"");
00095 BBTK_INPUT(FileSelector,DefaultDir,"The default directory",std::string,"");
00096 BBTK_INPUT(FileSelector,DefaultFile,"The default filename",std::string,"file name");
00097 BBTK_INPUT(FileSelector,Wildcard,"A wildcard, such as \"*.*\" or \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"",std::string,"wildcard");
00098 BBTK_INPUT(FileSelector,OpenSave,"Open for an open dialog (default) / Save for a save dialog",std::string,"");
00099 BBTK_OUTPUT(FileSelector,Out,"The file selected by the user",std::string,"file name");
00100 BBTK_END_DESCRIBE_BLACK_BOX(FileSelector);
00101
00102
00103
00104
00105 }
00106
00107
00108
00109
00110 #endif //__bbtkWxFileSelector_h__
00111
00112 #endif //_USE_WXWIDGETS_