LavaUI docs

enum FileDialog

Swift

enum FileDialog

Native "open"/"save" file picker.

Linux only, backed by zenity (GTK's own file chooser, invoked as a subprocess — the common approach for a GLFW/Vulkan app that has no GTK event loop of its own to host a real widget in). Blocks the calling thread until the user picks a file or cancels, same as any native modal dialog; call it from the main loop between frames, not from a paint closure. Returns nil on cancel, on a platform with no backend here, or if zenity isn't installed — callers should treat all three the same way ("no file chosen"), not surface them as distinct errors.

Sources/LavaUI/FileDialog.swift:13

Methods

static func openFile(title: String = "Open File", filters: [Filter] = []) -> URL?

Not documented.

Sources/LavaUI/FileDialog.swift:24

static func openFiles(title: String = "Open Files", filters: [Filter] = []) -> [URL]

Not documented.

Sources/LavaUI/FileDialog.swift:30

static func saveFile(title: String = "Save File", filters: [Filter] = [], defaultName: String? = nil) -> URL?

Not documented.

Sources/LavaUI/FileDialog.swift:40

Types