/
InputBox.hx
55 lines (46 loc) · 1.25 KB
/
InputBox.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
package vscode;
/**
* A concrete {@link QuickInput} to let the user input a text value.
*
* Note that in many cases the more convenient {@link window.showInputBox}
* is easier to use. {@link window.createInputBox} should be used
* when {@link window.showInputBox} does not offer the required flexibility.
*/
typedef InputBox = QuickInput & {
/**
* Current input value.
*/
var value:String;
/**
* Optional placeholder in the filter text.
*/
var ?placeholder:String;
/**
* If the input value should be hidden. Defaults to false.
*/
var password:Bool;
/**
* An event signaling when the value has changed.
*/
var onDidChangeValue(default, null):Event<String>;
/**
* An event signaling when the user indicated acceptance of the input value.
*/
var onDidAccept(default, null):Event<Void>;
/**
* Buttons for actions in the UI.
*/
var buttons:ReadOnlyArray<QuickInputButton>;
/**
* An event signaling when a button was triggered.
*/
var onDidTriggerButton(default, null):Event<QuickInputButton>;
/**
* An optional prompt text providing some ask or explanation to the user.
*/
var ?prompt:String;
/**
* An optional validation message indicating a problem with the current input value.
*/
var ?validationMessage:String;
}