Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

filedialog_generic.h

Go to the documentation of this file.
00001 /*
00002         ClanGUI, copyrights by various people. Have a look in the CREDITS file.
00003         
00004         This sourcecode is distributed using the Library GNU Public Licence,
00005         version 2 or (at your option) any later version. Please read LICENSE
00006         for details.
00007 */
00008 
00009 #ifndef header_file_dialog_generic
00010 #define header_file_dialog_generic
00011 
00012 #include "API/GUI/filedialog.h"
00013 #include "API/GUI/button.h"
00014 #include "API/GUI/inputbox.h"
00015 #include "API/GUI/listbox.h"
00016 #include "API/Core/System/clanstring.h"
00017 
00018 class CL_FileDialog_Generic
00019 {
00020 public:
00021         static CL_ComponentOptions create_options(
00022                 const std::string &path,
00023                 const std::string &filter);
00024 
00025         CL_FileDialog_Generic(CL_FileDialog *self, const CL_ComponentOptions &options, CL_StyleManager *style);
00026         ~CL_FileDialog_Generic() {};
00027 
00028         void set_path(const std::string &path);
00029         void set_filter(const std::string &filter);
00030 
00031         CL_Signal_v1<const std::string &> sig_ok;
00032         CL_Signal_v0 sig_cancel;        
00033 
00034 private:
00035         void update_files();
00036         int select_files(const struct dirent *);
00037 
00038         void on_ok();
00039         void on_cancel();
00040         void on_list(int index);
00041 
00042         CL_Slot slot_ok;
00043         CL_Slot slot_cancel;
00044         CL_Slot slot_list;
00045 
00046         CL_String filename;
00047         CL_String path;
00048         CL_String filter;
00049         
00050         bool must_exist;
00051 
00052         CL_FileDialog *filedialog;
00053 
00054         CL_Button *button_ok;
00055         CL_Button *button_cancel;
00056         CL_InputBox *input_file;
00057         CL_ListBox *list_dir;
00058 };
00059 
00060 #endif

Generated at Wed Apr 4 19:54:00 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001