Documentation ¶
Index ¶
- func NewMessageBox(th *material.Theme, message string, okFunc func()) layout.Widget
- func NewYesNoMessageBox(th *material.Theme, message string, yesNoFunc func(bool)) layout.Widget
- type ButtonBar
- type C
- type D
- type Dialog
- type IconAndTextButtonStyle
- type Icons
- type ListWithScrollbar
- type MessageBox
- type ModalHandler
- type Page
- type PageHandler
- type RichTextCheckBoxStyle
- type Slider
- type Tabs
- type TextField
- func (in *TextField) Clear()
- func (in *TextField) ClearError()
- func (in TextField) IsActive() bool
- func (in *TextField) IsErrored() bool
- func (in *TextField) Layout(gtx C, th *material.Theme, label, hint string) D
- func (in *TextField) SetError(err string)
- func (in *TextField) TextTooLong() bool
- func (in *TextField) Update(gtx C, th *material.Theme, label string)
- type Tree
- type TreeLabel
- type Validator
- type YesNoMessageBox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMessageBox ¶
Types ¶
type ButtonBar ¶
type ButtonBar struct {
// contains filtered or unexported fields
}
func NewButtonBar ¶
type D ¶
type D = layout.Dimensions
type IconAndTextButtonStyle ¶
type IconAndTextButtonStyle struct { material.ButtonStyle Icon *widget.Icon // contains filtered or unexported fields }
func IconAndTextButton ¶
func (IconAndTextButtonStyle) Layout ¶
func (b IconAndTextButtonStyle) Layout(gtx C) D
type Icons ¶
type ListWithScrollbar ¶
type ListWithScrollbar struct { layout.List component.VisibilityAnimation FinalAlpha int VisibilityDuration time.Duration // contains filtered or unexported fields }
func NewListWithScrollbar ¶
func NewListWithScrollbar() ListWithScrollbar
func (*ListWithScrollbar) FitsScreen ¶
func (l *ListWithScrollbar) FitsScreen() bool
func (*ListWithScrollbar) Layout ¶
func (l *ListWithScrollbar) Layout(gtx C, th *material.Theme, len int, w layout.ListElement) D
type MessageBox ¶
type MessageBox struct { Dialog // contains filtered or unexported fields }
func (*MessageBox) Layout ¶
func (mbox *MessageBox) Layout(gtx C) D
type ModalHandler ¶
type PageHandler ¶
type PageHandler struct {
// contains filtered or unexported fields
}
func NewPageHandler ¶
func NewPageHandler(th *material.Theme) *PageHandler
func (*PageHandler) AddPage ¶
func (ph *PageHandler) AddPage(page Page) int
func (*PageHandler) Layout ¶
func (ph *PageHandler) Layout(gtx C) D
func (*PageHandler) ModalMessage ¶
func (ph *PageHandler) ModalMessage(msg string)
func (*PageHandler) ModalYesNo ¶
func (ph *PageHandler) ModalYesNo(msg string, yesFunc func())
func (*PageHandler) SwitchToPage ¶
func (ph *PageHandler) SwitchToPage(idx int)
type RichTextCheckBoxStyle ¶
type RichTextCheckBoxStyle struct { CheckBox *widget.Bool // contains filtered or unexported fields }
func RichTextCheckBox ¶
func (RichTextCheckBoxStyle) Layout ¶
func (c RichTextCheckBoxStyle) Layout(gtx layout.Context) layout.Dimensions
type Slider ¶
Slider implements sliding between old/new widget values.
type Tabs ¶
type Tabs struct {
// contains filtered or unexported fields
}
func (*Tabs) SetSelectFunc ¶
func (*Tabs) SwitchToTab ¶
type TextField ¶
type TextField struct { // Editor contains the edit buffer. widget.Editor // Hoverable detects mouse hovers. Hoverable component.Hoverable // Alignment specifies where to anchor the text. Alignment layout.Alignment // Helper text to give additional context to a field. Helper string // CharLimit specifies the maximum number of characters the text input // will allow. Zero means "no limit". CharLimit uint // Prefix appears before the content of the text input. Prefix layout.Widget // Suffix appears after the content of the text input. Suffix layout.Widget // contains filtered or unexported fields }
TextField implements the Material Design Text Field described here: https://material.io/components/text-fields
func (*TextField) Clear ¶
func (in *TextField) Clear()
Clear the input text and reset any error status.
func (*TextField) ClearError ¶
func (in *TextField) ClearError()
ClearError clears any errored status.
func (*TextField) IsErrored ¶
IsErrored if input is in an errored state. Typically this is when the validator has returned an error message.
func (*TextField) SetError ¶
SetError puts the input into an errored state with the specified error text.
func (*TextField) TextTooLong ¶
TextTooLong returns whether the current editor text exceeds the set character limit.
type Tree ¶
func (*Tree) ClearChildren ¶
func (tree *Tree) ClearChildren()
type Validator ¶
Validator validates text and returns a string describing the error. Error is displayed as helper text.
type YesNoMessageBox ¶
type YesNoMessageBox struct { Dialog // contains filtered or unexported fields }
func (*YesNoMessageBox) Layout ¶
func (mbox *YesNoMessageBox) Layout(gtx C) D
Click to show internal directories.
Click to hide internal directories.