elements

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package elements provides definitions for common DOM elements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	Element
}

func MakeButton

func MakeButton() Button

type Cell

type Cell struct {
	Element
}

A Cell wraps a DOM td

func MakeCell

func MakeCell() Cell

func (Cell) Index

func (x Cell) Index() int

func (Cell) Row

func (x Cell) Row() Row

func (Cell) SpanColSet

func (x Cell) SpanColSet(n int)

func (Cell) SpanRowSet

func (x Cell) SpanRowSet(n int)

type Checkbox added in v0.2.7

type Checkbox struct {
	Element
}

func MakeCheckbox added in v0.2.7

func MakeCheckbox() Checkbox

func (Checkbox) Checked added in v0.2.7

func (x Checkbox) Checked() bool

func (Checkbox) CheckedSet added in v0.2.7

func (x Checkbox) CheckedSet(v bool)

func (Checkbox) Default added in v0.2.7

func (x Checkbox) Default() bool

func (Checkbox) DefaultSet added in v0.2.7

func (x Checkbox) DefaultSet(v bool)

func (Checkbox) Explicit added in v0.2.7

func (x Checkbox) Explicit() bool

func (Checkbox) ExplicitSet added in v0.2.7

func (x Checkbox) ExplicitSet(v bool)

type Div

type Div struct {
	Element
}

func MakeDiv

func MakeDiv() Div

type Element

type Element = dom.Element

type Image

type Image struct {
	Element
}

func MakeImage

func MakeImage() Image

func (Image) Src

func (x Image) Src() string

func (Image) SrcSet

func (x Image) SrcSet(s string)

type Option

type Option struct {
	Element
}

func MakeOption

func MakeOption(val string) Option

func (Option) Value

func (x Option) Value() string

func (Option) ValueSet

func (x Option) ValueSet(val string)

type Para

type Para struct {
	Element
}

func MakePara

func MakePara() Para

type Row

type Row struct {
	Element
}

A Row wraps a DOM tr

func MakeRow

func MakeRow() Row

func (Row) Add

func (x Row) Add(pos int, cell ...Cell)

func (Row) Append

func (x Row) Append(cell ...Cell)

func (Row) Cell

func (x Row) Cell(i int) Cell

Cell returns the row's i-th cell, starting at 0.

func (Row) Delete

func (x Row) Delete(i int)

func (Row) Index

func (x Row) Index() int

Index returns the row's position in the table that contains it.

func (Row) Len

func (x Row) Len() int

Len returns the row's number of cells.

func (Row) Table

func (x Row) Table() Table

type Select

type Select struct {
	Element
}

func MakeSelect

func MakeSelect(opt ...Option) Select

func (Select) Add

func (x Select) Add(pos int, opt ...Option)

func (Select) Append

func (x Select) Append(opt ...Option)

func (Select) IndexSet

func (x Select) IndexSet(i int)

IndexSet sets the currently active option.

func (Select) Len

func (x Select) Len() int

func (Select) Value

func (x Select) Value() string

Get returns the value of the currently selected option.

func (Select) ValueSet

func (x Select) ValueSet(val string)

Set attempts to set the active selected option based on the given value. If no option has that value, the active option will be empty.

type Table

type Table struct {
	Element
}

func MakeTable

func MakeTable() Table

func (Table) Add

func (x Table) Add(i int, row ...Row)

func (Table) Append

func (x Table) Append(row ...Row)

func (Table) Clear

func (x Table) Clear()

Clear deletes all rows from the table.

func (Table) Delete

func (x Table) Delete(i int)

Delete removes the specified row from the table.

func (Table) Len

func (x Table) Len() int

Len returns the table's number of rows.

func (Table) Row

func (x Table) Row(i int) Row

Row returns the table's ith row, starting at 0.

type TextArea

type TextArea struct {
	Element
}

func MakeTextArea

func MakeTextArea() TextArea

func (TextArea) PlaceholderSet

func (x TextArea) PlaceholderSet(s string)

func (TextArea) RowsSet

func (x TextArea) RowsSet(n int)

func (TextArea) Text

func (x TextArea) Text() string

func (TextArea) TextSet

func (x TextArea) TextSet(s string)

type Video

type Video struct {
	Element
}

func MakeVideo

func MakeVideo() Video

func (Video) AutoPlay

func (x Video) AutoPlay() bool

func (Video) AutoPlaySet

func (x Video) AutoPlaySet(v bool)

func (Video) Muted

func (x Video) Muted() bool

func (Video) MutedSet

func (x Video) MutedSet(v bool)

func (Video) SourceStream

func (x Video) SourceStream() media.Stream

func (Video) SourceStreamSet

func (x Video) SourceStreamSet(stream media.Stream)

func (Video) SourceUrl

func (x Video) SourceUrl() string

func (Video) SourceUrlSet

func (x Video) SourceUrlSet(url string)

Jump to

Keyboard shortcuts

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