SDL 3.0
SDL_DialogFileFilter Struct Reference

#include <SDL_dialog.h>

Data Fields

const char * name
 
const char * pattern
 

Detailed Description

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. An entry for filters for file dialogs.

name is a user-readable label for the filter (for example, "Office document").

pattern is a semicolon-separated list of file extensions (for example, "doc;docx"). File extensions may only contain alphanumeric characters, hyphens, underscores and periods. Alternatively, the whole string can be a single asterisk ("*"), which serves as an "All files" filter.

Since
This struct is available since SDL 3.1.3.
See also
SDL_DialogFileCallback
SDL_ShowOpenFileDialog
SDL_ShowSaveFileDialog
SDL_ShowOpenFolderDialog
SDL_ShowFileDialogWithProperties

Definition at line 70 of file SDL_dialog.h.

Field Documentation

◆ name

const char* SDL_DialogFileFilter::name

Definition at line 72 of file SDL_dialog.h.

◆ pattern

const char* SDL_DialogFileFilter::pattern

Definition at line 73 of file SDL_dialog.h.


The documentation for this struct was generated from the following file: