checkbox

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 4 Imported by: 3

Documentation

Overview

Package checkbox provides a widget which can be checked or unchecked.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(w IChecked, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

Types

type Decoration

type Decoration struct {
	button.Decoration
	Middle string
}

func (*Decoration) MiddleDec

func (b *Decoration) MiddleDec() string

func (*Decoration) SetMiddleDec

func (w *Decoration) SetMiddleDec(dec string, app gowid.IApp)

type IChecked

type IChecked interface {
	button.IDecoratedAround
	button.IDecoratedMiddle
	IsChecked() bool
}

type IWidget

type IWidget interface {
	gowid.IWidget
	IChecked
}

type Widget

type Widget struct {
	Callbacks *gowid.Callbacks
	gowid.ClickCallbacks
	Decoration
	gowid.AddressProvidesID
	gowid.IsSelectable
	// contains filtered or unexported fields
}

func New

func New(isChecked bool) *Widget

func NewDecorated

func NewDecorated(isChecked bool, decoration Decoration) *Widget

func (*Widget) Click

func (w *Widget) Click(app gowid.IApp)

func (*Widget) IsChecked

func (w *Widget) IsChecked() bool

func (*Widget) Render

func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

func (*Widget) RenderSize

func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

func (*Widget) SetChecked

func (w *Widget) SetChecked(app gowid.IApp, val bool)

func (*Widget) String

func (w *Widget) String() string

func (*Widget) UserInput

func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool

Jump to

Keyboard shortcuts

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