Documentation ¶
Index ¶
- func ShowConfirmDialog(state *ui.State, title, message, ok, cancel string, action func(*ui.State))
- func ShowErrorDialog(state *ui.State, title, message, button string)
- func ShowInputDialog(state *ui.State, title, message, button, cancel string, ...)
- func ShowMessageDialog(state *ui.State, title, message, button string)
- func ShowOpenDialog(state *ui.State, fc *FileChooser, title, open, cancel string, ...)
- func ShowOpenFolderDialog(state *ui.State, fc *FileChooser, title, open, enter, cancel string, ...)
- func ShowSaveDialog(state *ui.State, fc *FileChooser, title, save, cancel string, ...)
- func ShowYesNoDialog(state *ui.State, title, message, yes, no, cancel string, ...)
- type Bar
- type Button
- type CheckBox
- type Container
- type Divider
- type Dropdown
- func (d *Dropdown) AddItem(text string)
- func (d *Dropdown) AddItemIcon(icon, text string)
- func (d *Dropdown) Items() []ListItem
- func (d *Dropdown) PreferredSize(state *ui.State) (float64, float64)
- func (d *Dropdown) Selected() int
- func (d *Dropdown) SetItems(it []ListItem)
- func (d *Dropdown) SetSelected(s int)
- func (d *Dropdown) TriggerChanged(state *ui.State)
- func (d *Dropdown) Update(state *ui.State)
- type FileChooser
- func (f *FileChooser) PreferredSize(state *ui.State) (float64, float64)
- func (f *FileChooser) SetPath(path string)
- func (f *FileChooser) Setup(action, cancel string)
- func (f *FileChooser) SetupFolder(action, enter, cancel string)
- func (f *FileChooser) SetupOpen(action, cancel string)
- func (f *FileChooser) Update(state *ui.State)
- type FixedSize
- type Form
- type FormField
- type Frame
- type Icon
- type Label
- type List
- func (l *List) AddItem(text string)
- func (l *List) AddItemIcon(icon, text string)
- func (l *List) InsertItem(i int, text string)
- func (l *List) InsertItemIcon(i int, icon, text string)
- func (l *List) PreferredSize(state *ui.State) (float64, float64)
- func (l *List) RemoveItem(i int)
- func (l *List) SwapItems(i, j int)
- func (l *List) Update(state *ui.State)
- type ListItem
- type Menu
- func (m *Menu) AddItem(text string, action func(*ui.State)) *MenuItem
- func (m *Menu) AddItemIcon(icon, text string, action func(*ui.State)) *MenuItem
- func (m *Menu) AddMenu(text string) *Menu
- func (m *Menu) OpenPopupMenu(x, y float64, state *ui.State)
- func (m *Menu) PreferredSize(state *ui.State) (float64, float64)
- func (m *Menu) Update(state *ui.State)
- type MenuBar
- type MenuItem
- type Padding
- type Root
- func (r *Root) CloseDialog()
- func (r *Root) ClosePopups()
- func (r *Root) HasPopups() bool
- func (r *Root) OpenDialog(dialog ui.Component)
- func (r *Root) OpenPopup(bounds draw.Rect, p ui.Component) ui.Popup
- func (r *Root) PreferredSize(state *ui.State) (float64, float64)
- func (r *Root) Update(state *ui.State)
- type ScrollView
- type Shadow
- type Stack
- type TextArea
- func (t *TextArea) Append(text string)
- func (t *TextArea) AppendFromReader(r io.Reader) error
- func (t *TextArea) Changed() bool
- func (t *TextArea) Copy(state *ui.State)
- func (t *TextArea) Cut(state *ui.State)
- func (t *TextArea) Lines() []string
- func (t *TextArea) Paste(state *ui.State)
- func (t *TextArea) PreferredSize(state *ui.State) (float64, float64)
- func (t *TextArea) Reader() io.Reader
- func (t *TextArea) ReplaceSelection(text string)
- func (t *TextArea) SelectAll(state *ui.State)
- func (t *TextArea) SelectedText() string
- func (t *TextArea) SetLines(l []string)
- func (t *TextArea) SetText(text string)
- func (t *TextArea) SetTextFromReader(r io.Reader) error
- func (t *TextArea) Text() string
- func (t *TextArea) Update(state *ui.State)
- func (t *TextArea) WriteTextTo(w io.Writer) error
- type TextField
- func (t *TextField) Copy(state *ui.State)
- func (t *TextField) Cut(state *ui.State)
- func (t *TextField) Paste(state *ui.State)
- func (t *TextField) PreferredSize(state *ui.State) (float64, float64)
- func (t *TextField) SelectAll(state *ui.State)
- func (t *TextField) SelectedText() string
- func (t *TextField) TriggerAction(state *ui.State)
- func (t *TextField) Update(state *ui.State)
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShowConfirmDialog ¶
func ShowErrorDialog ¶
func ShowInputDialog ¶
func ShowMessageDialog ¶
func ShowOpenDialog ¶
func ShowOpenFolderDialog ¶
func ShowSaveDialog ¶
Types ¶
type Container ¶
func (*Container) PreferredSize ¶
type Divider ¶
type Divider struct {
First, Second ui.Component
Vertical bool
// contains filtered or unexported fields
}
func NewHorizontalDivider ¶
func NewVerticalDivider ¶
type Dropdown ¶
type Dropdown struct { Changed func(*ui.State, int, ListItem) // contains filtered or unexported fields }
func NewDropdown ¶
func NewDropdown() *Dropdown
func (*Dropdown) AddItemIcon ¶
func (*Dropdown) PreferredSize ¶
func (*Dropdown) SetSelected ¶
func (*Dropdown) TriggerChanged ¶
type FileChooser ¶
type FileChooser struct { Action func(*ui.State, string) FileIcon func(fs.FileInfo) string // contains filtered or unexported fields }
func NewFileChooser ¶
func NewFileChooser() *FileChooser
func (*FileChooser) PreferredSize ¶
func (f *FileChooser) PreferredSize(state *ui.State) (float64, float64)
func (*FileChooser) SetPath ¶
func (f *FileChooser) SetPath(path string)
func (*FileChooser) Setup ¶
func (f *FileChooser) Setup(action, cancel string)
func (*FileChooser) SetupFolder ¶
func (f *FileChooser) SetupFolder(action, enter, cancel string)
func (*FileChooser) SetupOpen ¶
func (f *FileChooser) SetupOpen(action, cancel string)
func (*FileChooser) Update ¶
func (f *FileChooser) Update(state *ui.State)
type FixedSize ¶
func (*FixedSize) PreferredSize ¶
type List ¶
type List struct { Items []ListItem Selected int Changed func(*ui.State, int, ListItem) Action func(*ui.State, int, ListItem) ActionOnClick bool // contains filtered or unexported fields }
func (*List) AddItemIcon ¶
func (*List) InsertItem ¶
func (*List) InsertItemIcon ¶
func (*List) RemoveItem ¶
type MenuBar ¶
type MenuBar struct {
// contains filtered or unexported fields
}
func NewMenuBar ¶
func NewMenuBar() *MenuBar
type MenuItem ¶
type MenuItem struct { Text string Icon string Action func(*ui.State) // contains filtered or unexported fields }
func (*MenuItem) PreferredSize ¶
type Root ¶
type Root struct { Content ui.Component Dialog ui.Component // contains filtered or unexported fields }
func (*Root) CloseDialog ¶
func (r *Root) CloseDialog()
func (*Root) ClosePopups ¶
func (r *Root) ClosePopups()
func (*Root) OpenDialog ¶
type ScrollView ¶
type ScrollView struct {
// contains filtered or unexported fields
}
func NewScrollView ¶
func NewScrollView(content ui.Component) *ScrollView
func (*ScrollView) PreferredSize ¶
func (s *ScrollView) PreferredSize(state *ui.State) (float64, float64)
func (*ScrollView) Update ¶
func (s *ScrollView) Update(state *ui.State)
type TextArea ¶
type TextArea struct { Editable bool // contains filtered or unexported fields }
func NewTextArea ¶
func NewTextArea() *TextArea
func (*TextArea) PreferredSize ¶
func (*TextArea) Reader ¶
Reader returns an io.Reader that will read from the contents of the text area. Changes to the text area's content after this method is called will not affect the returned Reader.
func (*TextArea) ReplaceSelection ¶
func (*TextArea) SelectedText ¶
type TextField ¶
type TextField struct { Editable bool Action func(*ui.State, string) Width float64 Text string Placeholder string // contains filtered or unexported fields }
func NewTextField ¶
func (*TextField) PreferredSize ¶
func (*TextField) SelectedText ¶
func (*TextField) TriggerAction ¶
type Theme ¶
func DefaultTheme ¶
func DefaultTheme() *Theme
Click to show internal directories.
Click to hide internal directories.