-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,491 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
Thirdparty/ZWidget/include/zwidget/systemdialogs/folder_browse_dialog.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
#pragma once | ||
|
||
#include <memory> | ||
#include <string> | ||
|
||
class Widget; | ||
|
||
/// \brief Displays the system folder browsing dialog | ||
class BrowseFolderDialog | ||
{ | ||
public: | ||
/// \brief Constructs an browse folder dialog. | ||
static std::unique_ptr<BrowseFolderDialog> Create(Widget*owner); | ||
|
||
virtual ~BrowseFolderDialog() = default; | ||
|
||
/// \brief Get the full path of the directory selected. | ||
virtual std::string SelectedPath() const = 0; | ||
|
||
/// \brief Sets the initial directory that is displayed. | ||
virtual void SetInitialDirectory(const std::string& path) = 0; | ||
|
||
/// \brief Sets the text that appears in the title bar. | ||
virtual void SetTitle(const std::string& title) = 0; | ||
|
||
/// \brief Shows the file dialog. | ||
/// \return true if the user clicks the OK button of the dialog that is displayed, false otherwise. | ||
virtual bool Show() = 0; | ||
}; |
55 changes: 55 additions & 0 deletions
55
Thirdparty/ZWidget/include/zwidget/systemdialogs/open_file_dialog.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
#pragma once | ||
|
||
#include <memory> | ||
#include <string> | ||
#include <vector> | ||
|
||
class Widget; | ||
|
||
/// \brief Displays the system open file dialog. | ||
class OpenFileDialog | ||
{ | ||
public: | ||
/// \brief Constructs an open file dialog. | ||
static std::unique_ptr<OpenFileDialog> Create(Widget* owner); | ||
|
||
virtual ~OpenFileDialog() = default; | ||
|
||
/// \brief Get the full path of the file selected. | ||
/// | ||
/// If multiple files are selected, this returns the first file. | ||
virtual std::string Filename() const = 0; | ||
|
||
/// \brief Gets an array that contains one file name for each selected file. | ||
virtual std::vector<std::string> Filenames() const = 0; | ||
|
||
/// \brief Sets if multiple files can be selected or not. | ||
/// \param multiselect = When true, multiple items can be selected. | ||
virtual void SetMultiSelect(bool multiselect) = 0; | ||
|
||
/// \brief Sets a string containing the full path of the file selected. | ||
virtual void SetFilename(const std::string &filename) = 0; | ||
|
||
/// \brief Sets the default extension to use. | ||
virtual void SetDefaultExtension(const std::string& extension) = 0; | ||
|
||
/// \brief Add a filter that determines what types of files are displayed. | ||
virtual void AddFilter(const std::string &filter_description, const std::string &filter_extension) = 0; | ||
|
||
/// \brief Clears all filters. | ||
virtual void ClearFilters() = 0; | ||
|
||
/// \brief Sets a default filter, on a 0-based index. | ||
virtual void SetFilterIndex(int filter_index) = 0; | ||
|
||
/// \brief Sets the initial directory that is displayed. | ||
virtual void SetInitialDirectory(const std::string &path) = 0; | ||
|
||
/// \brief Sets the text that appears in the title bar. | ||
virtual void SetTitle(const std::string &title) = 0; | ||
|
||
/// \brief Shows the file dialog. | ||
/// \return true if the user clicks the OK button of the dialog that is displayed, false otherwise. | ||
virtual bool Show() = 0; | ||
}; |
46 changes: 46 additions & 0 deletions
46
Thirdparty/ZWidget/include/zwidget/systemdialogs/save_file_dialog.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
#pragma once | ||
|
||
#include <memory> | ||
#include <string> | ||
#include <vector> | ||
|
||
class Widget; | ||
|
||
/// \brief Displays the system save file dialog. | ||
class SaveFileDialog | ||
{ | ||
public: | ||
/// \brief Constructs a save file dialog. | ||
static std::unique_ptr<SaveFileDialog> Create(Widget *owner); | ||
|
||
virtual ~SaveFileDialog() = default; | ||
|
||
/// \brief Get the full path of the file selected. | ||
virtual std::string Filename() const = 0; | ||
|
||
/// \brief Sets a string containing the full path of the file selected. | ||
virtual void SetFilename(const std::string &filename) = 0; | ||
|
||
/// \brief Sets the default extension to use. | ||
virtual void SetDefaultExtension(const std::string& extension) = 0; | ||
|
||
/// \brief Add a filter that determines what types of files are displayed. | ||
virtual void AddFilter(const std::string &filter_description, const std::string &filter_extension) = 0; | ||
|
||
/// \brief Clears all filters. | ||
virtual void ClearFilters() = 0; | ||
|
||
/// \brief Sets a default filter, on a 0-based index. | ||
virtual void SetFilterIndex(int filter_index) = 0; | ||
|
||
/// \brief Sets the initial directory that is displayed. | ||
virtual void SetInitialDirectory(const std::string &path) = 0; | ||
|
||
/// \brief Sets the text that appears in the title bar. | ||
virtual void SetTitle(const std::string &title) = 0; | ||
|
||
/// \brief Shows the file dialog. | ||
/// \return true if the user clicks the OK button of the dialog that is displayed, false otherwise. | ||
virtual bool Show() = 0; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.