tinyfd_openFileDialog

extern (C) nothrow @nogc
tinyfd_openFileDialog

Parameters

title c_str

C-string or null

defaultPathAndFile c_str

C-string or null

filters TFD_Filter[]

list of file type patterns

allowMultipleSelects bool

does not work on console

Return Value

Type: c_str

Selected file full name, null on cancel. In case of multiple files, the separator is |.

Examples

const TFD_Filter[] filters = [
    { ["*.c" ], "C source code" },
    { ["*.cpp", "*.cc", "*.C", "*.cxx", "*.c++"], "C++ source code" }
];
c_str filename = tinyfd_openFileDialog("Open a C/C++ File", null, filters, false);
if (filename)
    tinyfd_messageBox("Chosen file is", filename, "ok", "info", 1);

Meta