Documentation ¶
Index ¶
- func Clickable(gtx layout.Context, button *widget.Clickable, w layout.Widget) layout.Dimensions
- type Button
- type C
- type Card
- type CheckBoxStyle
- type Collapsible
- type D
- type Editor
- type Icon
- type IconButton
- type Image
- type Label
- type Line
- type Modal
- type Outline
- type Password
- type Position
- type ProgressBarStyle
- type RadioButton
- type ReadClipboard
- type TabItem
- type Tabs
- type Theme
- func (t *Theme) Background(gtx layout.Context, w layout.Widget)
- func (t *Theme) Body1(txt string) Label
- func (t *Theme) Body2(txt string) Label
- func (t *Theme) Button(button *widget.Clickable, txt string) Button
- func (t *Theme) Caption(txt string) Label
- func (t *Theme) CheckBox(checkBox *widget.Bool, label string) CheckBoxStyle
- func (t *Theme) Collapsible() *Collapsible
- func (t *Theme) DangerButton(button *widget.Clickable, text string) Button
- func (t *Theme) Editor(editor *widget.Editor, hint string) Editor
- func (t *Theme) ErrorAlert(gtx layout.Context, txt string) layout.Dimensions
- func (t *Theme) ErrorLabel(txt string) Label
- func (t *Theme) H1(txt string) Label
- func (t *Theme) H2(txt string) Label
- func (t *Theme) H3(txt string) Label
- func (t *Theme) H4(txt string) Label
- func (t *Theme) H5(txt string) Label
- func (t *Theme) H6(txt string) Label
- func (t *Theme) IconButton(button *widget.Clickable, icon *widget.Icon) IconButton
- func (t *Theme) Image(img paint.ImageOp) Image
- func (t *Theme) ImageIcon(gtx layout.Context, icon image.Image, size int) layout.Dimensions
- func (t *Theme) Label(size unit.Value, txt string) Label
- func (t *Theme) Line() *Line
- func (t *Theme) Modal(title string) *Modal
- func (t *Theme) Outline() Outline
- func (t *Theme) Password() *Password
- func (t *Theme) PlainIconButton(button *widget.Clickable, icon *widget.Icon) IconButton
- func (t *Theme) ProgressBar(progress int) ProgressBarStyle
- func (t *Theme) RadioButton(group *widget.Enum, key, label string) RadioButton
- func (t *Theme) SuccessAlert(gtx layout.Context, txt string) layout.Dimensions
- func (t *Theme) Surface(gtx layout.Context, w layout.Widget) layout.Dimensions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Button ¶
type Button struct {
material.ButtonStyle
}
type CheckBoxStyle ¶
type CheckBoxStyle struct {
material.CheckBoxStyle
}
func (CheckBoxStyle) Layout ¶
func (c CheckBoxStyle) Layout(gtx layout.Context) layout.Dimensions
Layout updates the checkBox and displays it.
type Collapsible ¶
type Collapsible struct {
// contains filtered or unexported fields
}
type D ¶
type D = layout.Dimensions
type Editor ¶
type Editor struct { material.EditorStyle TitleLabel Label ErrorLabel Label LineColor color.RGBA //IsVisible if true, displays the paste and clear button. IsVisible bool //IsRequired if true, displays a required field text at the buttom of the editor. IsRequired bool //IsTitleLabel if true makes the title label visible. IsTitleLabel bool //Bordered if true makes the adds a border around the editor. Bordered bool // contains filtered or unexported fields }
func (*Editor) ClearError ¶
func (e *Editor) ClearError()
func (*Editor) SetRequiredErrorText ¶
type IconButton ¶
type IconButton struct {
material.IconButtonStyle
}
func (IconButton) Layout ¶
func (b IconButton) Layout(gtx layout.Context) layout.Dimensions
type Image ¶
type Image struct { // Src is the image to display. Src paint.ImageOp // Scale is the ratio of image pixels to // dps. Scale float32 }
Image is a widget that displays an image.
type Label ¶
type Label struct {
material.LabelStyle
}
type Modal ¶
type Modal struct {
// contains filtered or unexported fields
}
type Password ¶
type Password struct {
// contains filtered or unexported fields
}
func (*Password) Layout ¶
func (p *Password) Layout(gtx layout.Context, confirm func([]byte), cancel func()) layout.Dimensions
Layout renders the widget to screen. The confirm function passed by the calling page is called when the confirm button is clicked, and the form passes validation. The entered password is passed as an argument to the confirm func. The cancel func is called when the cancel button is clicked
type Position ¶
type Position int
Position determines what side of the page the tab would be laid out
type ProgressBarStyle ¶
type ProgressBarStyle struct {
material.ProgressBarStyle
}
type RadioButton ¶
type RadioButton struct {
material.RadioButtonStyle
}
type ReadClipboard ¶
type ReadClipboard struct{}
type Tabs ¶
type Tabs struct { Size float32 Selected int Position Position Separator bool // contains filtered or unexported fields }
Tabs displays succession of TabItems. Using the Position option, Tabs can be displayed on any four sides of a rendered page.
func (*Tabs) ChangeEvent ¶
ChangeEvent returns the last change event
type Theme ¶
type Theme struct { Shaper text.Shaper Base *material.Theme Color struct { Primary color.RGBA Secondary color.RGBA Text color.RGBA Hint color.RGBA Overlay color.RGBA InvText color.RGBA Success color.RGBA Danger color.RGBA Background color.RGBA Surface color.RGBA Gray color.RGBA Black color.RGBA } Icon struct { ContentCreate *widget.Icon ContentAdd *widget.Icon } TextSize unit.Value Clipboard chan string ReadClipboard chan interface{} // contains filtered or unexported fields }
func (*Theme) CheckBox ¶
func (t *Theme) CheckBox(checkBox *widget.Bool, label string) CheckBoxStyle
func (*Theme) Collapsible ¶
func (t *Theme) Collapsible() *Collapsible
func (*Theme) DangerButton ¶
DangerButton a button with the background set to theme.Danger
func (*Theme) ErrorAlert ¶
func (*Theme) ErrorLabel ¶
func (*Theme) IconButton ¶
func (*Theme) PlainIconButton ¶
func (*Theme) ProgressBar ¶
func (t *Theme) ProgressBar(progress int) ProgressBarStyle
func (*Theme) RadioButton ¶
func (t *Theme) RadioButton(group *widget.Enum, key, label string) RadioButton
RadioButton returns a RadioButton with a label. The key specifies the value for the Enum.