0.2.0
Loading...
Searching...
No Matches
FileDialog.hpp File Reference

File Chooser. More...

Go to the source code of this file.

Functions

bool NAV::gui::widgets::FileDialogLoad (std::string &path, const char *vName, const char *vFilters, const std::vector< std::string > &extensions, const std::filesystem::path &startPath, size_t id, const std::string &nameId, const char *buttonText="Choose")
 Shows an InputText and a button which opens a file dialog to select a path to load a file to.
 
bool NAV::gui::widgets::FileDialogSave (std::string &path, const char *vName, const char *vFilters, const std::vector< std::string > &extensions, const std::filesystem::path &startPath, size_t id, const std::string &nameId, const char *buttonText="Choose")
 Shows an InputText and a button which opens a file dialog to select a path to save a file to.
 

Detailed Description

File Chooser.

Author
T. Topp (topp@.nosp@m.ins..nosp@m.uni-s.nosp@m.tutt.nosp@m.gart..nosp@m.de)
Date
2021-01-18

Function Documentation

◆ FileDialogLoad()

bool NAV::gui::widgets::FileDialogLoad ( std::string & path,
const char * vName,
const char * vFilters,
const std::vector< std::string > & extensions,
const std::filesystem::path & startPath,
size_t id,
const std::string & nameId,
const char * buttonText = "Choose" )

Shows an InputText and a button which opens a file dialog to select a path to load a file to.

Parameters
[in,out]pathString to store the path in
[in]vNameWindow title
[in]vFiltersFilter to apply for file names
[in]extensionsExtensions to filter
[in]startPathPath to the directory to display initially
[in]idUnique id for creating the dialog uid
[in]nameIdName of the node triggering the window used for logging
[in]buttonTextText to display on the button
Returns
True if the filepath was changed

◆ FileDialogSave()

bool NAV::gui::widgets::FileDialogSave ( std::string & path,
const char * vName,
const char * vFilters,
const std::vector< std::string > & extensions,
const std::filesystem::path & startPath,
size_t id,
const std::string & nameId,
const char * buttonText = "Choose" )

Shows an InputText and a button which opens a file dialog to select a path to save a file to.

Parameters
[in,out]pathString to store the path in
[in]vNameWindow title
[in]vFiltersFilter to apply for file names
[in]extensionsExtensions to filter
[in]startPathPath to the directory to display initially
[in]idUnique id for creating the dialog uid
[in]nameIdName of the node triggering the window used for logging
[in]buttonTextText to display on the button
Returns
True if the filepath was changed