ui

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: BSD-3-Clause Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Gone Visible = 0
	Show Visible = 1
	Hide Visible = 2

	Center = 0
	Left   = 1
	Top    = 2
	Right  = 3
	Bottom = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Align

type Align struct {
	Vertical   int
	Horizontal int
}

func NewAlign

func NewAlign(attr nux.Attr) *Align

TODO:: center|left

type Button

type Button interface {
	Label
}

func NewButton

func NewButton(attr nux.Attr) Button

type Check

type Check interface {
	Label
	Checkable
}

func NewCheck

func NewCheck(attr nux.Attr) Check

type CheckChangedCallback

type CheckChangedCallback func(widget CheckableWidget, checked bool, fromUser bool)

type Checkable

type Checkable interface {
	SetChecked(checked bool, fromUser bool)
	Checked() bool
	SetValue(value string)
	Value() string
	SetCheckChangedCallback(listener CheckChangedCallback)
}

type CheckableWidget

type CheckableWidget interface {
	nux.Widget
	Checkable
}

type ColorDrawable

type ColorDrawable interface {
	nux.Drawable
	Color() nux.Color
	SetColor(nux.Color)
}

func NewColorDrawable

func NewColorDrawable(attr nux.Attr) ColorDrawable

func NewColorDrawableWithColor

func NewColorDrawableWithColor(color nux.Color) ColorDrawable

type Column

type Column interface {
	nux.Parent
	nux.Size
	Visual
}

func NewColumn

func NewColumn(attr nux.Attr) Column

type Editor

type Editor interface {
	nux.Widget
	nux.Size
	Visual

	Text() string
	SetText(text string)
}

func NewEditor

func NewEditor(attr nux.Attr) Editor

type Image

type Image interface {
	nux.Widget
	nux.Size
	nux.Layout
	nux.Measure
	nux.Draw
	nux.Stateable
	Visual

	Src() string
	SetSrc(src string)
	ScaleType() ScaleType
	SetScaleType(scaleType ScaleType)
}

func NewImage

func NewImage(attr nux.Attr) Image

type ImageDrawable

type ImageDrawable interface {
	nux.Drawable
}

func NewImageDrawable

func NewImageDrawable(attr nux.Attr) ImageDrawable

TODO:: if src exised, get cached image

func NewImageDrawableWithResource

func NewImageDrawableWithResource(src string) ImageDrawable

type Label

type Label interface {
	nux.Widget
	nux.Size
	// nux.Stateable
	Visual

	Text() string
	SetText(text string)
}

func NewLabel

func NewLabel(attr nux.Attr) Label

type Layer

type Layer interface {
	nux.Parent
	nux.Size
	Visual
}

func NewLayer

func NewLayer(attr nux.Attr) Layer

type OnVisualChanged

type OnVisualChanged func(nux.Widget)

type Options

type Options interface {
	nux.Component
	Values() []string
	Selected() bool
	SetOnSelectionChanged(callback func(widget Options, fromUser bool))
}

func NewOptions

func NewOptions(attr nux.Attr) Options

type Radio

type Radio Check

func NewRadio

func NewRadio(attr nux.Attr) Radio

type Repeat

type Repeat int32

type Row

type Row interface {
	nux.Parent
	nux.Size
	Visual
}

func NewRow

func NewRow(attr nux.Attr) Row

type ScaleType

type ScaleType int32
const (
	ScaleType_Matrix ScaleType = iota
	ScaleType_Center
	ScaleType_CenterCrop
	ScaleType_CenterInside
	ScaleType_FitXY
	ScaleType_FitStart
	ScaleType_FitCenter
	ScaleType_FitEnd
)

type Scroll

type Scroll interface {
	nux.Parent
	nux.Size
	Visual
}

only one child

func NewScroll

func NewScroll(attr nux.Attr) Scroll

type Shape

type Shape struct {
	Name         string
	Solid        nux.Color
	Stroke       nux.Color
	StrokeWidth  float32
	CornerRadius float32
	Dash         []float32
	ShadowColor  nux.Color
	ShadowX      float32
	ShadowY      float32
	ShadowBlur   float32
}

func NewShape

func NewShape(attr nux.Attr) *Shape

type ShapeDrawable

type ShapeDrawable interface {
	nux.Drawable
	SetShape(shape Shape)
	Shape() Shape
}

func NewShapeDrawable

func NewShapeDrawable(attr nux.Attr) ShapeDrawable

type Switch

type Switch Check

func NewSwitch

func NewSwitch(attr nux.Attr) Switch

type Text

type Text interface {
	nux.Widget
	nux.Size
	Visual

	Text() string
	SetText(text string)
	SetTextColor(nux.Color)
	TextColor() nux.Color
}

func NewText

func NewText(attr nux.Attr) Text

type Visible

type Visible byte

type Visual

type Visual interface {
	Background() nux.Drawable
	SetBackground(nux.Drawable)
	SetBackgroundColor(nux.Color)
	Foreground() nux.Drawable
	SetForeground(nux.Drawable)
	SetForegroundColor(nux.Color)
	Visible() Visible
	SetVisible(visible Visible)
	Disable() bool
	SetDisable(bool)
	Translucent() bool // TODO:: Can the event penetrate ?
	SetTranslucent(bool)
}

type WidgetVisual

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

func NewWidgetVisual

func NewWidgetVisual(owner nux.Widget, attr nux.Attr) *WidgetVisual

func (*WidgetVisual) Background

func (me *WidgetVisual) Background() nux.Drawable

func (*WidgetVisual) Disable

func (me *WidgetVisual) Disable() bool

func (*WidgetVisual) Foreground

func (me *WidgetVisual) Foreground() nux.Drawable

func (*WidgetVisual) SetBackground

func (me *WidgetVisual) SetBackground(background nux.Drawable)

func (*WidgetVisual) SetBackgroundColor

func (me *WidgetVisual) SetBackgroundColor(background nux.Color)

func (*WidgetVisual) SetDisable

func (me *WidgetVisual) SetDisable(disable bool)

func (*WidgetVisual) SetForeground

func (me *WidgetVisual) SetForeground(foreground nux.Drawable)

func (*WidgetVisual) SetForegroundColor

func (me *WidgetVisual) SetForegroundColor(foreground nux.Color)

func (*WidgetVisual) SetTranslucent

func (me *WidgetVisual) SetTranslucent(translucent bool)

func (*WidgetVisual) SetVisible

func (me *WidgetVisual) SetVisible(visible Visible)

func (*WidgetVisual) Translucent

func (me *WidgetVisual) Translucent() bool

func (*WidgetVisual) Visible

func (me *WidgetVisual) Visible() Visible

Jump to

Keyboard shortcuts

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