openrndr / org.openrndr.dialogs / openFileDialog

openFileDialog

fun openFileDialog(programName: String = stackRootClassName(), contextID: String = "global", supportedExtensions: List<Pair<String, List<String>>>, function: (File) -> Unit): Unit (source)

Creates a file dialog that can be used to open a single file

Parameters

programName - optional name of the program, this is guessed from a stack trace by default

contextID - optional context identifier, default is "global"

supportedExtensions - a list with supported/allowed extensions sets. Usage: listOf("vector" to listOf("svg", "ai"), "bitmap" to listOf("jpg", "JPG"))

function - the function to be invoked when a file has been picked

See Also

openFilesDialog

saveFileDialog

@JvmName("openFileDialogSimple") fun openFileDialog(programName: String = stackRootClassName(), contextID: String = "global", supportedExtensions: List<String>, function: (File) -> Unit): Unit (source)

Creates a file dialog that can be used to open a single file

Parameters

programName - optional name of the program, this is guessed from a stack trace by default

contextID - optional context identifier, default is "global"

supportedExtensions - a supported/allowed file extension

function - the function to be invoked when a file has been picked

See Also

openFilesDialog

saveFileDialog

fun openFileDialog(programName: String = stackRootClassName(), contextID: String = "global", function: (File) -> Unit): Unit (source)

Creates a file dialog that can be used to open a single

Parameters

programName - optional name of the program, this is guessed from a stack trace by default

contextID - optional context identifier, default is "global"

See Also

openFilesDialog

saveFileDialog