A popup window where used can browse folders and select a file.
More...
#include <filebox.h>
|
|
| filebox (gui &parent) |
| |
|
void | initDir (const std::string &dir) |
| |
|
void | initFile (const std::string &fname) |
| |
| void | filter (const char *fbuf) |
| | Set file filters. More...
|
| |
|
void | defaultExtension (const std::string &ext) |
| | default extension for saved file, appended to whatever user enters
|
| |
|
void | title (const std::string &fname) |
| |
| std::string | open () |
| | prompt user for one file to open More...
|
| |
| std::vector< std::string > | openMulti () |
| | prompt user for one or multiple files More...
|
| |
| std::string | save () |
| | prompt user for folder and filename to save More...
|
| |
|
std::string | path () const |
| | get filename entered by user
|
| |
A popup window where used can browse folders and select a file.
◆ filter()
| void wex::filebox::filter |
( |
const char * |
fbuf | ) |
|
|
inline |
Set file filters.
- Parameters
-
| [in] | buf | containing filter specifications |
example:
"Log Files\0*.log\0All\0*.*\0"
◆ open()
| std::string wex::filebox::open |
( |
| ) |
|
|
inline |
prompt user for one file to open
- Returns
- path to file to be opened, "" if cancelled If user selects multiple files, only the first will be returned
◆ openMulti()
| std::vector<std::string> wex::filebox::openMulti |
( |
| ) |
|
|
inline |
prompt user for one or multiple files
- Returns
- std::vector<std::string> filenames
◆ save()
| std::string wex::filebox::save |
( |
| ) |
|
|
inline |
prompt user for folder and filename to save
- Returns
- path to file to be saved, "" if cancelled
The documentation for this class was generated from the following file: