Documentation
¶
Index ¶
- func OpenFile(opts FileDialogOptions) ([]string, error)
- func SaveFile(opts FileDialogOptions) (string, error)
- func SelectFolder(opts FileDialogOptions) (string, error)
- func SetProvider(p Provider)
- func ShowMessage(opts MessageBoxOptions) (string, error)
- func ShowPrompt(opts PromptOptions) (string, error)
- type FileDialogOptions
- type FileFilter
- type MessageBoxOptions
- type PromptOptions
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenFile ¶
func OpenFile(opts FileDialogOptions) ([]string, error)
func SaveFile ¶
func SaveFile(opts FileDialogOptions) (string, error)
func SelectFolder ¶
func SelectFolder(opts FileDialogOptions) (string, error)
func SetProvider ¶
func SetProvider(p Provider)
func ShowMessage ¶
func ShowMessage(opts MessageBoxOptions) (string, error)
func ShowPrompt ¶
func ShowPrompt(opts PromptOptions) (string, error)
Types ¶
type FileDialogOptions ¶
type FileDialogOptions struct {
Title string `json:"title"`
DefaultPath string `json:"defaultPath,omitempty"`
Filters []FileFilter `json:"filters,omitempty"`
Multiple bool `json:"multiple,omitempty"`
}
type FileFilter ¶
type MessageBoxOptions ¶
type PromptOptions ¶
type Provider ¶
type Provider interface {
OpenFile(opts FileDialogOptions) ([]string, error)
SaveFile(opts FileDialogOptions) (string, error)
SelectFolder(opts FileDialogOptions) (string, error)
ShowMessage(opts MessageBoxOptions) (string, error)
ShowPrompt(opts PromptOptions) (string, error)
}
Provider is a native dialogs backend. On mobile the shell (Android Activity / iOS AppDelegate) registers one via SetProvider; on desktop the built-in platform implementations are used when no provider is set.
Click to show internal directories.
Click to hide internal directories.