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