X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffile_picker_ctrl.h;h=57363b0c737e4d2db61783a7b8f24d4ba622a8f2;hb=HEAD;hp=60858b665da55983d1a06fe83e9139dc53126833;hpb=94ace8e9fb2cbcf6f849edefd6b5e4c4a2d3ed7f;p=dcpomatic.git diff --git a/src/wx/file_picker_ctrl.h b/src/wx/file_picker_ctrl.h index 60858b665..57363b0c7 100644 --- a/src/wx/file_picker_ctrl.h +++ b/src/wx/file_picker_ctrl.h @@ -18,28 +18,45 @@ */ -#include "lib/warnings.h" -DCPOMATIC_DISABLE_WARNINGS + +#include +LIBDCP_DISABLE_WARNINGS #include -DCPOMATIC_ENABLE_WARNINGS +LIBDCP_ENABLE_WARNINGS +#include +#include + class FilePickerCtrl : public wxPanel { public: - FilePickerCtrl (wxWindow* parent, wxString prompt, wxString wildcard, bool open, bool warn_overwrite); - - 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 initial_filename = boost::optional(), + boost::optional override_path = boost::optional() + ); + + boost::optional path() const; + void set_path(boost::optional path); + void set_wildcard(wxString); private: void browse_clicked (); + void set_filename(boost::optional filename); wxButton* _file; - wxString _path; + boost::optional _path; wxSizer* _sizer; wxString _prompt; wxString _wildcard; bool _open; bool _warn_overwrite; + std::string _initial_path_key; + boost::optional _initial_filename; + boost::optional _override_path; };