00001
00002 #ifndef INCLUDED_FileInputControl_h_
00003 #define INCLUDED_FileInputControl_h_
00004
00005 #include "FileBrowserControl.h"
00006 #include <string>
00007
00008
00009 class FileInputControl : public FileBrowserControl {
00010 public:
00011
00012 FileInputControl()
00013 : FileBrowserControl("Select file","Select a file","/ms"), file(NULL), myfile()
00014 {}
00015
00016
00017 FileInputControl(const std::string& nm, const std::string& desc, const std::string& path, std::string* store=NULL)
00018 : FileBrowserControl(nm,desc,path), file(store), myfile()
00019 {}
00020
00021
00022 const std::string& getLastInput() { return myfile; }
00023
00024
00025 void setStore(std::string* store) { file=store; }
00026
00027 protected:
00028 virtual ControlBase* selectedFile(const std::string& f) {
00029 myfile=f;
00030 if(file!=NULL)
00031 *file=f;
00032 return NULL;
00033 }
00034
00035 std::string* file;
00036 std::string myfile;
00037
00038 private:
00039 FileInputControl(const FileInputControl& );
00040 FileInputControl& operator=(const FileInputControl& );
00041 };
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #endif