ui

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CopyIcon *widget.Icon = func() *widget.Icon {
	icon, _ := widget.NewIcon(icons.ContentContentCopy)
	return icon
}()
View Source
var PasteIcon *widget.Icon = func() *widget.Icon {
	icon, _ := widget.NewIcon(icons.ContentContentPaste)
	return icon
}()

Functions

func ColorBox

func ColorBox(gtx layout.Context, size image.Point, color color.NRGBA) layout.Dimensions

ColorBox creates a widget with the specified dimensions and color.

Types

type C

type C = layout.Context

type Copyable

type Copyable struct {
	widget.Label
	// contains filtered or unexported fields
}

RichEditor is an extension to widget.Editor with copy and paste buttons. This allows users of a mobile device to easily make use of copy and paste in the selected text.

func (*Copyable) Layout

func (r *Copyable) Layout(gtx C) D

Layout updates the internal state of the Copyable.

func (*Copyable) SetText

func (c *Copyable) SetText(s string)

func (*Copyable) Text

func (c *Copyable) Text() string

type CopyableStyle

type CopyableStyle struct {
	*material.Theme

	// Inset around each button
	layout.Inset
	// contains filtered or unexported fields
}

CopyableStyle defines how a Copyable is presented.

func CopyField

func CopyField(th *material.Theme, state *Copyable) CopyableStyle

func (CopyableStyle) Layout

func (r CopyableStyle) Layout(gtx C) D

Layout renders the editor into the provided gtx.

type D

type D = layout.Dimensions

type RichEditor

type RichEditor struct {
	widget.Editor
	// contains filtered or unexported fields
}

RichEditor is an extension to widget.Editor with copy and paste buttons. This allows users of a mobile device to easily make use of copy and paste in the selected text.

func (*RichEditor) Layout

func (r *RichEditor) Layout(gtx C) D

Layout updates the internal state of the RichEditor.

type RichEditorStyle

type RichEditorStyle struct {
	*material.Theme

	// Inset around each button
	layout.Inset
	// contains filtered or unexported fields
}

RichEditorStyle defines how a RichEditor is presented.

func PasteEditor

func PasteEditor(th *material.Theme, state *RichEditor, hint string) RichEditorStyle

func (RichEditorStyle) Layout

func (r RichEditorStyle) Layout(gtx C) D

Layout renders the editor into the provided gtx.

type Slider

type Slider struct {
	Duration time.Duration
	// contains filtered or unexported fields
}

Slider implements sliding between old/new widget values.

func (*Slider) Layout

func (s *Slider) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions

Layout lays out widget that can be pushed.

func (*Slider) PushLeft

func (s *Slider) PushLeft()

PushLeft pushes the existing widget to the left.

func (*Slider) PushRight

func (s *Slider) PushRight()

PushRight pushes the existing widget to the right.

type Tab

type Tab struct {
	Title string
	// contains filtered or unexported fields
}

type Tabs

type Tabs struct {
	// contains filtered or unexported fields
}

type UI

type UI struct {
	// contains filtered or unexported fields
}

func New

func New() *UI

func (*UI) Run

func (ui *UI) Run() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL