diff options
Diffstat (limited to 'src/w32dlib/common.h')
-rw-r--r-- | src/w32dlib/common.h | 29 |
1 files changed, 18 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. |