/
OpenDialogOptions.hx
56 lines (49 loc) · 1.37 KB
/
OpenDialogOptions.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package vscode;
/**
* Options to configure the behaviour of a file open dialog.
*
* * Note 1: On Windows and Linux, a file dialog cannot be both a file selector and a folder selector, so if you
* set both `canSelectFiles` and `canSelectFolders` to `true` on these platforms, a folder selector will be shown.
* * Note 2: Explicitly setting `canSelectFiles` and `canSelectFolders` to `false` is futile
* and the editor then silently adjusts the options to select files.
*/
typedef OpenDialogOptions = {
/**
* The resource the dialog shows when opened.
*/
var ?defaultUri:Uri;
/**
* A human-readable string for the open button.
*/
var ?openLabel:String;
/**
* Allow to select files, defaults to `true`.
*/
var ?canSelectFiles:Bool;
/**
* Allow to select folders, defaults to `false`.
*/
var ?canSelectFolders:Bool;
/**
* Allow to select many files or folders.
*/
var ?canSelectMany:Bool;
/**
* A set of file filters that are used by the dialog. Each entry is a human-readable label,
* like "TypeScript", and an array of extensions, e.g.
* ```ts
* {
* 'Images': ['png', 'jpg']
* 'TypeScript': ['ts', 'tsx']
* }
* ```
*/
var ?filters:DynamicAccess<Array<String>>;
/**
* Dialog title.
*
* This parameter might be ignored, as not all operating systems display a title on open dialogs
* (for example, macOS).
*/
var ?title:String;
}