summaryrefslogtreecommitdiff
path: root/src/w32dlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32dlib')
-rw-r--r--src/w32dlib/common.h29
-rw-r--r--src/w32dlib/w32dlib.h1
2 files changed, 19 insertions, 11 deletions
diff --git a/src/w32dlib/common.h b/src/w32dlib/common.h
index bb9547f..357297f 100644
--- a/src/w32dlib/common.h
+++ b/src/w32dlib/common.h
@@ -62,25 +62,32 @@ namespace W32DLib
/// \brief Requests a file to open.
///
+ /// \param parent The parent window.
+ /// \param title Title for the selector.
+ /// \param path The current filename. This will hold the selected name
+ /// on return if a file is selected.
/// \param filter The file selector filter.
- /// \return The path, or an empty string if non selected.
+ /// \return True if a file was selected and path updated.
///
- static std::string OpenFile(const char *filter);
+ static bool OpenFile(HWND parent,
+ const char *title,
+ std::string& path,
+ const char *filter);
/// \brief Requests a file to save.
///
+ /// \param parent The parent window.
+ /// \param title Title for the selector.
+ /// \param path The current filename. This will hold the selected name
+ /// on return if a file is selected.
/// \param filter The file selector filter.
- /// \return The path, or an empty string if non selected.
+ /// \return True if a file was selected and path updated.
///
- static std::string SaveFile(const char *filter);
-
-
- /// \brief Selects a directory
- ///
- /// \return The path, or an empty string if non selected.
- ///
- static std::string SelectDirectory();
+ static bool SaveFile(HWND parent,
+ const char *title,
+ std::string& path,
+ const char *filter);
/// \brief Returns the last error as a readable string.
diff --git a/src/w32dlib/w32dlib.h b/src/w32dlib/w32dlib.h
index 914179e..b1b813c 100644
--- a/src/w32dlib/w32dlib.h
+++ b/src/w32dlib/w32dlib.h
@@ -29,6 +29,7 @@
#include <w32dlib/text.h>
#include <w32dlib/static.h>
#include <w32dlib/autocheck.h>
+#include <w32dlib/common.h>
#endif // W32DLIB_H