ControlContext :: filePath - Provide a FileOpen dialog
The function provides a dialog that either opens an existing file or selects one for write actions. The text passed in sTitle will be displayed in the title bar of the dialog.
In order to initialize the file name area, a path (sFilePath) might be passed to the function. The string passed in sFileMask allows restricting the files to be displayed by a file mask. In order to create new files, true has to be passed in bWrite.
The function returns the file path for the file selected or an empty string, when the dialog has been canceled.
Implementation details
- sTitle - Title for window or control
- sFilePath
- Complete file path
The complete path includes file name and directory. It might, however, be defined as absolute path starting with the root device or folder or a relative path.
In order to pass no file path, an empty string ( String() ) may be passed.
- sFileMask
- File Mask
// following lists are equivalent:
"All C++ files (*.cpp *.cc *.C *.cxx *.c++)"
"*.cpp *.cc *.C *.cxx *.c++"
- bWrite
- Write mode
In order to open a file in write mode, this option should be passed as true.