00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #if !defined(_XRB_FILEDIALOG_HPP_)
00012 #define _XRB_FILEDIALOG_HPP_
00013
00014 #include "xrb.hpp"
00015
00016 #include "xrb_dialog.hpp"
00017 #include "xrb_filepanel.hpp"
00018
00019 namespace Xrb
00020 {
00021
00022 class FileDialog : public Dialog
00023 {
00024 public:
00025
00026 FileDialog (
00027 std::string const &title_text,
00028 FilePanel::Operation file_operation,
00029 ContainerWidget *parent,
00030 std::string const &name = "FileDialog");
00031 virtual ~FileDialog () { }
00032
00033 inline FilePanel::Operation FileOperation () const { return m_file_panel->FileOperation(); }
00034 inline std::string const &Path () const { return m_file_panel->Path(); }
00035
00036 inline SignalSender1<std::string const &> const *SenderSubmitPath () { return &m_sender_submit_path; }
00037 inline SignalSender1<std::string> const *SenderSubmitPathV () { return &m_sender_submit_path_v; }
00038
00039 protected:
00040
00041 virtual void OKButtonActivated ();
00042
00043 private:
00044
00045 void InternalPathSubmitted (std::string const &path);
00046
00047 FilePanel *m_file_panel;
00048
00049 SignalSender1<std::string const &> m_sender_submit_path;
00050 SignalSender1<std::string> m_sender_submit_path_v;
00051
00052 SignalReceiver1<std::string const &> m_internal_receiver_path_submitted;
00053 };
00054
00055 }
00056
00057 #endif // !defined(_XRB_FILEDIALOG_HPP_)