Documentation ¶
Index ¶
- type Doc
- type Templ
- func (t *Templ) BeginSelect(id string) string
- func (t *Templ) Button(id string, value ...string) string
- func (t *Templ) CheckBox(id, text string, value bool) string
- func (t *Templ) Data() interface{}
- func (t *Templ) EndSelect() string
- func (t *Templ) ErrorBox() string
- func (t *Templ) Img(id string, value string) string
- func (t *Templ) IntBox(id string, value int) string
- func (t *Templ) JS() string
- func (t *Templ) NumBox(id string, value float64) string
- func (t *Templ) Option(value string) string
- func (t *Templ) Range(id string, min, max, value int) string
- func (t *Templ) Span(id string, value ...string) string
- func (t *Templ) TextBox(id string, value string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Doc ¶
type Doc struct {
// contains filtered or unexported fields
}
gui.Doc serves a GUI as a html document.
type Templ ¶
type Templ Doc
Provides methods to the html template code passed to NewDoc.
func (*Templ) BeginSelect ¶
func (*Templ) Button ¶
{{.Button id value}} adds a button to the document. value is text on the button.
func (*Templ) CheckBox ¶
{{.CheckBox id text value}} adds a checkbox to the document. text is displayed next to the textbox. value is true (checked) or false (unchecked)
func (*Templ) ErrorBox ¶
{{.ErrorBox}} should be embedded in the template where errors are to be shown. CSS rules for class ErrorBox may be set, e.g., to render errors in red.
func (*Templ) IntBox ¶
{{.IntBox id value}} adds a textbox for integer numbers to the document. value is the initial text in the box.
func (*Templ) JS ¶
{{.JS}} should always be embedded in the template <head>. Expands to needed JavaScript code.
func (*Templ) NumBox ¶
{{.Numbox id value}} adds a textbox for numbers to the document. value is the initial text in the box.