diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-01-16 01:44:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-16 21:33:29 +0100 |
| commit | 127bdaa2d8a869112fd6ec908cf115f391dbba24 (patch) | |
| tree | f1878f27421d80694e28b46f4d609ae51ebebc29 /src/wx/file_picker_ctrl.h | |
| parent | c64b6891f6e28c1a7f11871d3dcccdfe75944644 (diff) | |
Remember some more paths when selecting files (#2728).
* export subtitles
* export video
* debug log
* cinema database
* config file
Diffstat (limited to 'src/wx/file_picker_ctrl.h')
| -rw-r--r-- | src/wx/file_picker_ctrl.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/wx/file_picker_ctrl.h b/src/wx/file_picker_ctrl.h index 2411254fa..57363b0c7 100644 --- a/src/wx/file_picker_ctrl.h +++ b/src/wx/file_picker_ctrl.h @@ -24,25 +24,39 @@ 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, bool warn_overwrite); - - boost::filesystem::path path() const; - void set_path(boost::filesystem::path path); + 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; - boost::filesystem::path _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; }; |
