-
Notifications
You must be signed in to change notification settings - Fork 0
/
choose-folder-dialog.go
39 lines (34 loc) · 1009 Bytes
/
choose-folder-dialog.go
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
package osas
type ChooseFolderDialog struct {
Prompt string
DefaultLocation string
InvisiblesFlag bool
MultipleSelectionsAllowed bool
ShowingPackageContents bool
}
func NewChooseFolderDialog() *ChooseFolderDialog {
return &ChooseFolderDialog{}
}
func (c *ChooseFolderDialog) SetPrompt(text string) *ChooseFolderDialog {
c.Prompt = text
return c
}
func (c *ChooseFolderDialog) SetDefaultLocation(text string) *ChooseFolderDialog {
c.DefaultLocation = text
return c
}
func (c *ChooseFolderDialog) SetInvisiblesFlag(b bool) *ChooseFolderDialog {
c.InvisiblesFlag = b
return c
}
func (c *ChooseFolderDialog) SetMultipleSelectionsAllowed(b bool) *ChooseFolderDialog {
c.MultipleSelectionsAllowed = b
return c
}
func (c *ChooseFolderDialog) SetShowingPackageContents(b bool) *ChooseFolderDialog {
c.ShowingPackageContents = b
return c
}
func (c *ChooseFolderDialog) Run() (result Result, err error) {
return RunOSAScript(chooseFolderDialogTmpl, c)
}