xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::native::file_dialog Class Referencefinal
Inheritance diagram for xtd::forms::native::file_dialog:
xtd::static_object

Definition

Contains file dialog native API.

Namespace
xtd::forms::native
Library
xtd.forms.native
Warning
Internal use only
Todo:
Split file_dialog into open_file_dialog and save_file_dialog.

Protected Static Methods

static bool run_open_dialog (intptr hwnd, const xtd::string &default_ext, xtd::string &file_name, std::vector< xtd::string > &file_names, const xtd::string &filter, size_t filter_index, const xtd::string &initial_directory, size_t options, bool support_multi_dotted_extensions, const xtd::string &title)
 Shows open file dialog.
 
static void run_open_sheet (xtd::delegate< void(bool)> on_dialog_closed, intptr hwnd, const xtd::string &default_ext, xtd::string &file_name, std::vector< xtd::string > &file_names, const xtd::string &filter, size_t filter_index, const xtd::string &initial_directory, size_t options, bool support_multi_dotted_extensions, const xtd::string &title)
 Shows async open file dialog as sheet.
 
static bool run_save_dialog (intptr hwnd, const xtd::string &default_ext, xtd::string &file_name, std::vector< xtd::string > &file_names, const xtd::string &filter, size_t filter_index, const xtd::string &initial_directory, size_t options, bool support_multi_dotted_extensions, const xtd::string &title)
 Shows save file dialog.
 
static void run_save_sheet (xtd::delegate< void(bool)> on_dialog_closed, intptr hwnd, const xtd::string &default_ext, xtd::string &file_name, std::vector< xtd::string > &file_names, const xtd::string &filter, size_t filter_index, const xtd::string &initial_directory, size_t options, bool support_multi_dotted_extensions, const xtd::string &title)
 Shows async save file dialog as sheet.
 

Member Function Documentation

◆ run_open_dialog()

static bool xtd::forms::native::file_dialog::run_open_dialog ( intptr  hwnd,
const xtd::string default_ext,
xtd::string file_name,
std::vector< xtd::string > &  file_names,
const xtd::string filter,
size_t  filter_index,
const xtd::string initial_directory,
size_t  options,
bool  support_multi_dotted_extensions,
const xtd::string title 
)
staticprotected

Shows open file dialog.

Parameters
hwndParent window handle.
default_extThe default file name extension. The returned string does not include the period.
file_nameThe file name selected in the file dialog box.
file_namesAn array of type string, containing the file names of all selected files in the dialog box.
filterThe file filtering options available in the dialog box.
filter_indexA value containing the index of the filter currently selected in the file dialog box.
initial_directoryThe initial directory displayed by the file dialog box.
optionsA bitwise file dialog flags value.
support_multi_dotted_extensionstrue if the dialog box supports multiple file name extensions; otherwise, false. The default is false.
titleThe file dialog box title.
Returns
true if the user clicks OK in the dialog box; otherwise, false.
Remarks
If result is true, the file_name parameter contains the new chosen file name and if option contains OFN_ALLOWMULTISELECT flags, the file_names parameter contains the new chosen file names.
Warning
Internal use only

◆ run_open_sheet()

static void xtd::forms::native::file_dialog::run_open_sheet ( xtd::delegate< void(bool)>  on_dialog_closed,
intptr  hwnd,
const xtd::string default_ext,
xtd::string file_name,
std::vector< xtd::string > &  file_names,
const xtd::string filter,
size_t  filter_index,
const xtd::string initial_directory,
size_t  options,
bool  support_multi_dotted_extensions,
const xtd::string title 
)
staticprotected

Shows async open file dialog as sheet.

Parameters
on_dialog_closeda dialog close delegate to call when the dialog is closed.
hwndParent window handle.
default_extThe default file name extension. The returned string does not include the period.
file_nameThe file name selected in the file dialog box.
file_namesAn array of type string, containing the file names of all selected files in the dialog box.
filterThe file filtering options available in the dialog box.
filter_indexA value containing the index of the filter currently selected in the file dialog box.
initial_directoryThe initial directory displayed by the file dialog box.
optionsA bitwise file dialog flags value.
support_multi_dotted_extensionstrue if the dialog box supports multiple file name extensions; otherwise, false. The default is false.
titleThe file dialog box title.
Returns
true if the user clicks OK in the dialog box; otherwise, false.
Remarks
When dialog closed and if result is true, the file_name parameter contains the new chosen file name and if option contains OFN_ALLOWMULTISELECT flags, the file_names parameter contains the new chosen file names.
Warning
Internal use only

◆ run_save_dialog()

static bool xtd::forms::native::file_dialog::run_save_dialog ( intptr  hwnd,
const xtd::string default_ext,
xtd::string file_name,
std::vector< xtd::string > &  file_names,
const xtd::string filter,
size_t  filter_index,
const xtd::string initial_directory,
size_t  options,
bool  support_multi_dotted_extensions,
const xtd::string title 
)
staticprotected

Shows save file dialog.

Parameters
hwndParent window handle.
default_extThe default file name extension. The returned string does not include the period.
file_nameThe file name selected in the file dialog box.
file_namesAn array of type string, containing the file names of all selected files in the dialog box.
filterThe file filtering options available in the dialog box.
filter_indexA value containing the index of the filter currently selected in the file dialog box.
initial_directoryThe initial directory displayed by the file dialog box.
optionsA bitwise file dialog flags value.
support_multi_dotted_extensionstrue if the dialog box supports multiple file name extensions; otherwise, false. The default is false.
titleThe file dialog box title.
Returns
true if the user clicks OK in the dialog box; otherwise, false.
Remarks
If result is true, the file_name parameter contains the new chosen file name and if option contains OFN_ALLOWMULTISELECT flags, the file_names parameter contains the new chosen file names.
Warning
Internal use only

◆ run_save_sheet()

static void xtd::forms::native::file_dialog::run_save_sheet ( xtd::delegate< void(bool)>  on_dialog_closed,
intptr  hwnd,
const xtd::string default_ext,
xtd::string file_name,
std::vector< xtd::string > &  file_names,
const xtd::string filter,
size_t  filter_index,
const xtd::string initial_directory,
size_t  options,
bool  support_multi_dotted_extensions,
const xtd::string title 
)
staticprotected

Shows async save file dialog as sheet.

Parameters
on_dialog_closeda dialog close delegate to call when the dialog is closed.
hwndParent window handle.
default_extThe default file name extension. The returned string does not include the period.
file_nameThe file name selected in the file dialog box.
file_namesAn array of type string, containing the file names of all selected files in the dialog box.
filterThe file filtering options available in the dialog box.
filter_indexA value containing the index of the filter currently selected in the file dialog box.
initial_directoryThe initial directory displayed by the file dialog box.
optionsA bitwise file dialog flags value.
support_multi_dotted_extensionstrue if the dialog box supports multiple file name extensions; otherwise, false. The default is false.
titleThe file dialog box title.
Returns
true if the user clicks OK in the dialog box; otherwise, false.
Remarks
When dialog closed and if result is true, the file_name parameter contains the new chosen file name and if option contains OFN_ALLOWMULTISELECT flags, the file_names parameter contains the new chosen file names.
Warning
Internal use only

The documentation for this class was generated from the following file: