dialog topic

CategoryDialog

File dialog support.

SDL offers file dialogs, to let users select files with native GUI interfaces. There are "open" dialogs, "save" dialogs, and folder selection dialogs. The app can control some details, such as filtering to specific files, or whether multiple files can be selected by the user.

Note that launching a file dialog is a non-blocking operation; control returns to the app immediately, and a callback is called later (possibly in another thread) when the user makes a choice.

Functions

sdlShowFileDialogWithProperties(int type, Pointer<NativeFunction<SdlDialogFileCallback>> callback, Pointer<NativeType> userdata, int props) → void dialog
Create and launch a file dialog with the specified properties.
sdlShowOpenFileDialog(Pointer<NativeFunction<SdlDialogFileCallback>> callback, Pointer<NativeType> userdata, Pointer<SdlWindow> window, Pointer<SdlDialogFileFilter> filters, int nfilters, String? defaultLocation, bool allowMany) → void dialog
Displays a dialog that lets the user select a file on their filesystem.
sdlShowOpenFolderDialog(Pointer<NativeFunction<SdlDialogFileCallback>> callback, Pointer<NativeType> userdata, Pointer<SdlWindow> window, String? defaultLocation, bool allowMany) → void dialog
Displays a dialog that lets the user select a folder on their filesystem.
sdlShowSaveFileDialog(Pointer<NativeFunction<SdlDialogFileCallback>> callback, Pointer<NativeType> userdata, Pointer<SdlWindow> window, Pointer<SdlDialogFileFilter> filters, int nfilters, String? defaultLocation) → void dialog
Displays a dialog that lets the user choose a new or existing file on their filesystem.