Emit no audio from DCPs if none is mapped
[dcpomatic.git] / src / wx / file_picker_ctrl.h
index d0c4d56c86f789ff50a8edb3856a1d370e1d8e16..57363b0c737e4d2db61783a7b8f24d4ba622a8f2 100644 (file)
 
 */
 
+
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/wx.h>
+LIBDCP_ENABLE_WARNINGS
+#include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
+
 
 class FilePickerCtrl : public wxPanel
 {
 public:
-       FilePickerCtrl (wxWindow* parent, wxString prompt, wxString wildcard, bool open);
-
-       wxString GetPath () const;
-       void SetPath (wxString);
-       void SetWildcard (wxString);
+       FilePickerCtrl(
+               wxWindow* parent,
+               wxString prompt,
+               wxString wildcard,
+               bool open,
+               bool warn_overwrite,
+               std::string initial_path_key,
+               boost::optional<std::string> initial_filename = boost::optional<std::string>(),
+               boost::optional<boost::filesystem::path> override_path = boost::optional<boost::filesystem::path>()
+               );
+
+       boost::optional<boost::filesystem::path> path() const;
+       void set_path(boost::optional<boost::filesystem::path> path);
+       void set_wildcard(wxString);
 
 private:
        void browse_clicked ();
+       void set_filename(boost::optional<std::string> filename);
 
        wxButton* _file;
-       wxString _path;
+       boost::optional<boost::filesystem::path> _path;
        wxSizer* _sizer;
        wxString _prompt;
        wxString _wildcard;
        bool _open;
+       bool _warn_overwrite;
+       std::string _initial_path_key;
+       boost::optional<std::string> _initial_filename;
+       boost::optional<boost::filesystem::path> _override_path;
 };