control

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ButtonStylePrimary   ButtonStyle = "btn-primary"
	ButtonStyleSecondary             = "btn-secondary"
	ButtonStyleSuccess               = "btn-success"
	ButtonStyleInfo                  = "btn-info"
	ButtonStyleWarning               = "btn-warning"
	ButtonStyleDanger                = "btn-danger"
	ButtonStyleLight                 = "btn-light"
	ButtonStyleDark                  = "btn-dark"
	ButtonStyleLink                  = "btn-link"

	ButtonStyleOutlinePrimary   = "btn-outline-primary"
	ButtonStyleOutlineSecondary = "btn-outline-secondary"
	ButtonStyleOutlineSuccess   = "btn-outline-success"
	ButtonStyleOutlineInfo      = "btn-outline-info"
	ButtonStyleOutlineWarning   = "btn-outline-warning"
	ButtonStyleOutlineDanger    = "btn-outline-danger"
	ButtonStyleOutlineLight     = "btn-outline-light"
	ButtonStyleOutlineDark      = "btn-outline-dark"
)
View Source
const (
	ButtonSizeLarge  ButtonSize = "btn-lg"
	ButtonSizeMedium            = ""
	ButtonSizeSmall             = "btn-sm"
)
View Source
const (
	Container      ContainerClass = "container"
	ContainerFluid                = "container-fluid"
	FormGroup                     = "form-group"
)
View Source
const (
	TextColorPrimary   TextColorClass = "text-primary"
	TextColorSecondary                = "text-secondary"
	TextColorDanger                   = "text-danger"
	TextColorWarning                  = "text-warning"
	TextColorInfo                     = "text-info"
	TextColorLight                    = "text-light"
	TextColorDark                     = "text-dark"
	TextColorBody                     = "text-body"
	TextColorMuted                    = "text-muted"
	TextColorWhite                    = "text-white"
	TextColorWhite50                  = "text-white-50"
	TextColorBlack50                  = "text-black-50"
)
View Source
const (
	BackgroundColorPrimary     BackgroundColorClass = "bg-primary"
	BackgroundColorSecondary                        = "bg-secondary"
	BackgroundColorSuccess                          = "bg-danger"
	BackgroundColorDanger                           = "bg-danger"
	BackgroundColorWarning                          = "bg-warning"
	BackgroundColorInfo                             = "bg-info"
	BackgroundColorLight                            = "bg-light"
	BackgroundColorDark                             = "bg-dark"
	BackgroundColorWhite                            = "bg-white"
	BackgroundColorTransparent                      = "bg-transparent"
	BackgroundColorNone                             = "" // utility to allow custom background colors for components
)
View Source
const (
	ButtonClick = iota + 3000
	DialogClosing
	DialogClosed
)

event codes

View Source
const (
	NavTabs      = "nav-tabs"
	NavPills     = "nav-pills"
	NavJustified = "nav-justified"

	NavbarHeader   = "navbar-header"
	NavbarCollapse = "navbar-collapse"
	NavbarBrand    = "navbar-brand"
	NavbarToggle   = "navbar-toggle"
	NavbarNav      = "navbar-nav"
	NavbarLeft     = "navbar-left"
	NavbarRight    = "navbar-right"
	NavbarForm     = "navbar-form"
)
View Source
const (
	NavbarExpandExtraLarge NavbarExpandClass = "navbar-expand-xl"
	NavbarExpandLarge                        = "navbar-expand-lg"
	NavbarExpandMedium                       = "navbar-expand-md"
	NavbarExpandSmall                        = "navbar-expand-sm"
	// NavbarExpandNone will always show the navbar as collapsed at any size
	NavbarExpandNone = ""
)
View Source
const (
	DivWrapper       = "bootstrap.Div"
	FormGroupWrapper = "bootstrap.FormGroup"
	FieldsetWrapper  = "bootstrap.Fieldset"
)
View Source
const ButtonBlock = "btn-block"

Add ButtonBlock as a class to a button to make it span a full block

View Source
const ButtonClass = "btn"

Variables

This section is empty.

Functions

func BootstrapAlert

func BootstrapAlert(form page.FormI, message string, buttons interface{}) control.DialogI

* Alert creates a message dialog.

If you specify no buttons, a close box in the corner will be created that will just close the dialog. If you specify just a string in buttons, or just one string as a slice of strings, one button will be shown that will just close the message.

If you specify more than one button, the first button will be the default button (the one pressed if the user presses the return key). In this case, you will need to detect the button by adding a On(event.DialogButton(), action) to the dialog returned. You will also be responsible for calling "Close()" on the dialog after detecting a button in this case.

func FieldsetTmpl

func FieldsetTmpl(ctx context.Context, wrapper *FieldsetWrapperType, ctrl page.ControlI, h string, buf *bytes.Buffer)

FieldsetTmpl is the template for special situations where you want to wrap a group of controls with a fieldset This is useful for groups of related controls, like a group of radio buttons. If you want the entire group to be a row, give the wrapper a "row" class. This will automatically pull out the row class and add an independent div wrapper with a row class, which is a special requirement for this kind of object.

func FormGroupTmpl

func FormGroupTmpl(ctx context.Context, wrapper *DivWrapperType, ctrl page.ControlI, h string, buf *bytes.Buffer)

The FormGroupTmpl function is a wrapper template that draws form objects using bootstrap styling. To use it, call the .With() function on your control and pass it the result of the NewFormGroupTmpl() function

func NavbarSelectEvent() page.EventI

Types

type BackgroundColorClass

type BackgroundColorClass string

type Button

type Button struct {
	grctl.Button
	// contains filtered or unexported fields
}

func NewButton

func NewButton(parent page.ControlI, id string) *Button

Creates a new standard html button

func (*Button) Deserialize

func (b *Button) Deserialize(d page.Decoder, p *page.Page) (err error)

func (*Button) Init

func (b *Button) Init(self page.ControlI, parent page.ControlI, id string)

func (*Button) Serialize

func (b *Button) Serialize(e page.Encoder) (err error)

func (*Button) SetButtonSize

func (b *Button) SetButtonSize(size ButtonSize)

SetButtonsSize sets the size class of the button.

func (*Button) SetButtonStyle

func (b *Button) SetButtonStyle(style ButtonStyle) ButtonI

SetButtonStyle will set the button's style to one of the predefined bootstrap styles.

func (*Button) SetIsPrimary

func (b *Button) SetIsPrimary(isPrimary bool) ButtonI

func (*Button) ΩDrawingAttributes added in v0.0.3

func (b *Button) ΩDrawingAttributes() *html.Attributes

func (*Button) ΩisSerializer

func (b *Button) ΩisSerializer(i page.ControlI) bool

ΩisSerializer is used by the automated control serializer to determine how far down the control chain the control has to go before just calling serialize and deserialize

type ButtonI

type ButtonI interface {
	grctl.ButtonI
}

type ButtonSize

type ButtonSize string

type ButtonStyle

type ButtonStyle string

type Checkbox

type Checkbox struct {
	control.Checkbox
	// contains filtered or unexported fields
}

func NewCheckbox

func NewCheckbox(parent page.ControlI, id string) *Checkbox

func (*Checkbox) Deserialize

func (c *Checkbox) Deserialize(d page.Decoder, p *page.Page) (err error)

func (*Checkbox) Serialize

func (c *Checkbox) Serialize(e page.Encoder) (err error)

func (*Checkbox) SetInline added in v0.0.4

func (c *Checkbox) SetInline(v bool) *Checkbox

func (*Checkbox) ΩDrawTag added in v0.0.3

func (c *Checkbox) ΩDrawTag(ctx context.Context) (ctrl string)

func (*Checkbox) ΩDrawingAttributes added in v0.0.3

func (c *Checkbox) ΩDrawingAttributes() *html.Attributes

func (*Checkbox) ΩGetDrawingLabelAttributes added in v0.0.3

func (c *Checkbox) ΩGetDrawingLabelAttributes() *html.Attributes

func (*Checkbox) ΩisSerializer

func (c *Checkbox) ΩisSerializer(i page.ControlI) bool

ΩisSerializer is used by the automated control serializer to determine how far down the control chain the control has to go before just calling serialize and deserialize

type CheckboxList

type CheckboxList struct {
	control.CheckboxList
	// contains filtered or unexported fields
}

CheckboxList is a multi-select control that presents its choices as a list of checkboxes. Styling is provided by divs and spans that you can provide css for in your style sheets. The goradd.css file has default styling to handle the basics. It wraps the whole thing in a div that can be set to scroll as well, so that the final structure can be styled like a multi-table table, or a single-table scrolling list much like a standard html select list.

func NewCheckboxList

func NewCheckboxList(parent page.ControlI, id string) *CheckboxList

func (*CheckboxList) Init

func (l *CheckboxList) Init(self CheckboxListI, parent page.ControlI, id string)

func (*CheckboxList) SetIsInline

func (l *CheckboxList) SetIsInline(i bool)

func (*CheckboxList) ΩDrawInnerHtml added in v0.0.3

func (l *CheckboxList) ΩDrawInnerHtml(ctx context.Context, buf *bytes.Buffer) (err error)

func (*CheckboxList) ΩDrawingAttributes added in v0.0.3

func (l *CheckboxList) ΩDrawingAttributes() *html.Attributes

ΩDrawingAttributes retrieves the tag's attributes at draw time. You should not normally need to call this, and the attributes are disposed of after drawing, so they are essentially read-only.

type CheckboxListI

type CheckboxListI interface {
	control.CheckboxListI
	// contains filtered or unexported methods
}

type ContainerClass

type ContainerClass string

type DataPager

type DataPager struct {
	control.DataPager
	ButtonStyle    ButtonStyle
	HighlightStyle ButtonStyle
}

DataPager is a toolbar designed to aid scrolling through a large set of data. It is implemented using Aria design best practices. It is designed to be paired with a Table or DataRepeater to aid in navigating through the data. It is similar to a Paginator, but a paginator is for navigating through a whole series of pages and not just for data on one override.

func NewDataPager

func NewDataPager(parent page.ControlI, id string, paginatedControl control.PaginatedControlI) *DataPager

func (*DataPager) Deserialize

func (d *DataPager) Deserialize(dec page.Decoder, p *page.Page) (err error)

func (*DataPager) Init

func (d *DataPager) Init(self page.ControlI, parent page.ControlI, id string, paginatedControl control.PaginatedControlI)

func (*DataPager) NextButtonsHtml

func (d *DataPager) NextButtonsHtml() string

func (*DataPager) PageButtonsHtml

func (d *DataPager) PageButtonsHtml(i int) string

func (*DataPager) PreviousButtonsHtml

func (d *DataPager) PreviousButtonsHtml() string

func (*DataPager) Serialize

func (d *DataPager) Serialize(e page.Encoder) (err error)

func (*DataPager) ΩDrawingAttributes added in v0.0.3

func (l *DataPager) ΩDrawingAttributes() *html.Attributes

func (*DataPager) ΩisSerializer

func (d *DataPager) ΩisSerializer(i page.ControlI) bool

ΩisSerializer is used by the automated control serializer to determine how far down the control chain the control has to go before just calling serialize and deserialize

type DataPagerI

type DataPagerI interface {
	control.DataPagerI
}

type DateTextbox

type DateTextbox struct {
	control.DateTextbox
}

func NewDateTextbox

func NewDateTextbox(parent page.ControlI, id string) *DateTextbox

func (*DateTextbox) ΩDrawingAttributes added in v0.0.3

func (t *DateTextbox) ΩDrawingAttributes() *html.Attributes

type DivWrapperType

type DivWrapperType struct {
	page.LabelWrapperType
	ΩinnerDivAttr *html.Attributes
	UseTooltips   bool // uses tooltips for the error class
}

DivWrapperType is a wrapper similar to a form group, but simply without the FormGroup class added. Use this for wrapping inline elements and other special situations listed in the Bootstrap doc under the Forms component. https://getbootstrap.com/docs/4.1/components/forms/ as of this writing

func NewDivWrapper

func NewDivWrapper() *DivWrapperType

func (*DivWrapperType) HasInnerDivAttributes

func (w *DivWrapperType) HasInnerDivAttributes() bool

HasInnerDivAttributes returns true if the wrapper has attributes on the inner div.

func (*DivWrapperType) InnerDivAttributes

func (w *DivWrapperType) InnerDivAttributes() *html.Attributes

InnerDivAttributes returns attributes for the innerDiv. Changes will be remembered, but only drawn if you redraw the control. If you set these, the control itself will be wrapped with a div with these attributes. This is useful for layouts that have the label next to the control.

func (*DivWrapperType) SetUseTooltips

func (w *DivWrapperType) SetUseTooltips(t bool) *DivWrapperType

SetUseTooltips sets whether to use tooltips to display validation messages.

func (DivWrapperType) TypeName

func (w DivWrapperType) TypeName() string

func (*DivWrapperType) ΩAjaxRender

func (w *DivWrapperType) ΩAjaxRender(ctx context.Context, response *page.Response, c page.ControlI)

ΩAjaxRender is called by the framework to draw any changes to the wrapper that we have recorded. This has to work closely with the wrapper template so that it would create the same effect as if that entire control had been redrawn

func (*DivWrapperType) ΩModifyDrawingAttributes

func (w *DivWrapperType) ΩModifyDrawingAttributes(c page.ControlI, attr *html.Attributes)

func (*DivWrapperType) ΩNewI

func (w *DivWrapperType) ΩNewI() page.WrapperI

func (*DivWrapperType) ΩWrap

func (w *DivWrapperType) ΩWrap(ctx context.Context, ctrl page.ControlI, html string, buf *bytes.Buffer)

type EmailTextbox

type EmailTextbox struct {
	control.EmailTextbox
}

func NewEmailTextbox

func NewEmailTextbox(parent page.ControlI, id string) *EmailTextbox

func (*EmailTextbox) ΩDrawingAttributes added in v0.0.3

func (t *EmailTextbox) ΩDrawingAttributes() *html.Attributes

type FieldsetWrapperType

type FieldsetWrapperType struct {
	page.LabelWrapperType
	UseTooltips bool // uses tooltips for the error class
}

func (*FieldsetWrapperType) SetUseTooltips

func (w *FieldsetWrapperType) SetUseTooltips(t bool) *FieldsetWrapperType

func (*FieldsetWrapperType) TypeName

func (w *FieldsetWrapperType) TypeName() string

func (*FieldsetWrapperType) ΩNewI

func (w *FieldsetWrapperType) ΩNewI() page.WrapperI

func (*FieldsetWrapperType) ΩWrap

func (w *FieldsetWrapperType) ΩWrap(ctx context.Context, ctrl page.ControlI, html string, buf *bytes.Buffer)

type FloatTextbox

type FloatTextbox struct {
	control.FloatTextbox
}

func NewFloatTextbox

func NewFloatTextbox(parent page.ControlI, id string) *FloatTextbox

func (*FloatTextbox) ΩDrawingAttributes added in v0.0.3

func (t *FloatTextbox) ΩDrawingAttributes() *html.Attributes

type FormGroupWrapperType

type FormGroupWrapperType struct {
	DivWrapperType
}

func NewFormGroupWrapper

func NewFormGroupWrapper() *FormGroupWrapperType

func (FormGroupWrapperType) TypeName

func (w FormGroupWrapperType) TypeName() string

func (*FormGroupWrapperType) ΩNewI

func (w *FormGroupWrapperType) ΩNewI() page.WrapperI

func (*FormGroupWrapperType) ΩWrap

func (w *FormGroupWrapperType) ΩWrap(ctx context.Context, ctrl page.ControlI, html string, buf *bytes.Buffer)

type IntegerTextbox

type IntegerTextbox struct {
	control.IntegerTextbox
}

func NewIntegerTextbox

func NewIntegerTextbox(parent page.ControlI, id string) *IntegerTextbox

func (*IntegerTextbox) ΩDrawingAttributes added in v0.0.3

func (t *IntegerTextbox) ΩDrawingAttributes() *html.Attributes

type ItemDirection

type ItemDirection int
const (
	HorizontalItemDirection ItemDirection = 0
	VerticalItemDirection                 = 1
)

type ListGroup

type ListGroup struct {
	control.UnorderedList
}

A ListGroup implements the Bootstrap ListGroup control. Since just a static list isn't all that interesting, this is a dynamic list whose individual items are considered clickable. To conform with the html standard and accessibility rules, items should appear as anchors if they link to another page, but as buttons if they cause a different action, like popping up a dialog.

Use the data provider to AddItems to the list, assigning attributes as needed to produce the items you want. You can also use a proxy control to create the attributes.

func NewListGroup

func NewListGroup(parent page.ControlI, id string) *ListGroup

func (*ListGroup) GetItemsHtml

func (l *ListGroup) GetItemsHtml(items []control.ListItemI) string

func (*ListGroup) Init

func (l *ListGroup) Init(self page.ControlI, parent page.ControlI, id string)
type Modal struct {
	control.Panel
	// contains filtered or unexported fields
}

Modal is a bootstrap modal dialog. To use a custom template in a bootstrap modal, add a Panel child element or subclass of a panel child element. To use the grid system, add the container-fluid class to that embedded panel.

func NewModal

func NewModal(parent page.ControlI, id string) *Modal

func (*Modal) AddButton

func (d *Modal) AddButton(
	label string,
	id string,
	options *control.DialogButtonOptions,
)

AddButton adds a button to the modal. Buttons should be added in the order to appear. Styling options you can include in options.Options:

style - ButtonStyle value
size - ButtonSize value

func (*Modal) AddCloseButton

func (d *Modal) AddCloseButton(label string) ModalI

AddCloseButton adds a button to the list of buttons with the given label, but this button will trigger the DialogCloseEvent instead of the DialogButtonEvent. The button will also close the dialog (by hiding it).

func (*Modal) AddTitlebarClass

func (d *Modal) AddTitlebarClass(class string)

func (*Modal) Close

func (d *Modal) Close()

func (*Modal) DrawTemplate

func (d *Modal) DrawTemplate(ctx context.Context, buf *bytes.Buffer) (err error)

func (*Modal) Init

func (d *Modal) Init(self page.ControlI, parent page.ControlI, id string)

func (*Modal) Open

func (d *Modal) Open()

func (*Modal) PrivateAction

func (d *Modal) PrivateAction(ctx context.Context, a page.ActionParams)

func (*Modal) RemoveAllButtons

func (d *Modal) RemoveAllButtons()

func (*Modal) RemoveButton

func (d *Modal) RemoveButton(id string)

func (*Modal) SetBackdrop

func (d *Modal) SetBackdrop(b ModalBackdropType)

func (*Modal) SetButtonStyle

func (d *Modal) SetButtonStyle(id string, a *html.Style) ModalI

SetButtonStyle sets css styles on a button that is already in the dialog

func (*Modal) SetButtonVisible

func (d *Modal) SetButtonVisible(id string, visible bool) ModalI

func (*Modal) SetDialogStyle added in v0.0.3

func (d *Modal) SetDialogStyle(style control.DialogStyle)

func (*Modal) SetHasCloseBox

func (d *Modal) SetHasCloseBox(h bool)

func (*Modal) SetTitle

func (d *Modal) SetTitle(t string)

func (*Modal) Title

func (d *Modal) Title() string

func (*Modal) ΩDrawingAttributes added in v0.0.3

func (d *Modal) ΩDrawingAttributes() *html.Attributes

func (*Modal) ΩPutCustomScript added in v0.0.3

func (d *Modal) ΩPutCustomScript(ctx context.Context, response *page.Response)

type ModalBackdropType

type ModalBackdropType int
const (
	ModalBackdrop ModalBackdropType = iota
	ModalNoBackdrop
	ModalStaticBackdrop
)

type ModalI

type ModalI interface {
	control.DialogI
}
type Navbar struct {
	page.Control
	// contains filtered or unexported fields
}

Navbar is a bootstrap navbar object. Use SetText() to set the logo text of the navbar, and SetEscapeText() to false to turn off encoding if needed. Add child controls to populate it.

func NewNavbar

func NewNavbar(parent page.ControlI, id string) *Navbar

NewNavbar returns a newly created Bootstrap Navbar object

func (b *Navbar) DrawTemplate(ctx context.Context, buf *bytes.Buffer) (err error)
func (b *Navbar) Init(self page.ControlI, parent page.ControlI, id string)
func (b *Navbar) SetBackgroundClass(c BackgroundColorClass) NavbarI
func (b *Navbar) SetBrandPlacement(p NavbarCollapsedBrandPlacement) NavbarI

SetBrandPlacement places the brand left, right, or hidden (meaning inside the collapse area). The expand button location will be affected by the placement

func (b *Navbar) SetHeaderAnchor(a string) NavbarI
func (b *Navbar) SetNavbarStyle(style NavbarStyle) NavbarI
func (b *Navbar) ΩDrawingAttributes() *html.Attributes
type NavbarCollapsedBrandPlacement int

NavbarCollapsedBrandPlacement controls the location of the brand when the navbar is collapsed

const (
	// NavbarCollapsedBrandLeft will place the brand on the left and the toggle button on the right when collapsed
	NavbarCollapsedBrandLeft NavbarCollapsedBrandPlacement = iota
	// NavbarCollapsedBrandRight will place the brand on the right and the toggle button on the left when collapsed
	NavbarCollapsedBrandRight
	// NavbarCollapsedBrandHidden means the brand will be hidden when collapsed, and shown when expanded
	NavbarCollapsedBrandHidden
)
type NavbarExpandClass string
type NavbarI interface {
	page.ControlI
}
type NavbarList struct {
	page.Control
	control.ItemList

	data.DataManager
	Proxy *control.Proxy
	// contains filtered or unexported fields
}

func NewNavbarList

func NewNavbarList(parent page.ControlI, id string) *NavbarList
func (l *NavbarList) Init(self NavbarListI, parent page.ControlI, id string)
func (l *NavbarList) ΩDrawInnerHtml(ctx context.Context, buf *bytes.Buffer) (err error)
func (l *NavbarList) ΩDrawTag(ctx context.Context) string
func (l *NavbarList) ΩDrawingAttributes() *html.Attributes

ΩDrawingAttributes retrieves the tag's attributes at draw time. You should not normally need to call this, and the attributes are disposed of after drawing, so they are essentially read-only.

type NavbarListI interface {
	page.ControlI
}
type NavbarStyle string
const (
	NavbarDark  NavbarStyle = "navbar-dark" // black on white
	NavbarLight             = "navbar-light"
)

type RadioButton

type RadioButton struct {
	control.RadioButton
	// contains filtered or unexported fields
}

func NewRadioButton

func NewRadioButton(parent page.ControlI, id string) *RadioButton

func (*RadioButton) SetInline added in v0.0.4

func (c *RadioButton) SetInline(v bool) *RadioButton

func (*RadioButton) ΩDrawTag added in v0.0.3

func (c *RadioButton) ΩDrawTag(ctx context.Context) (ctrl string)

func (*RadioButton) ΩDrawingAttributes added in v0.0.3

func (c *RadioButton) ΩDrawingAttributes() *html.Attributes

func (*RadioButton) ΩGetDrawingLabelAttributes added in v0.0.3

func (c *RadioButton) ΩGetDrawingLabelAttributes() *html.Attributes

type RadioButtonI

type RadioButtonI interface {
	control.RadioButtonI
}

type RadioList

type RadioList struct {
	CheckboxList
}

RadioList is a multi-select control that presents its choices as a list of checkboxes. Styling is provided by divs and spans that you can provide css for in your style sheets. The goradd.css file has default styling to handle the basics. It wraps the whole thing in a div that can be set to scroll as well, so that the final structure can be styled like a multi-table table, or a single-table scrolling list much like a standard html select list.

func NewRadioList

func NewRadioList(parent page.ControlI, id string) *RadioList

func (*RadioList) Init

func (l *RadioList) Init(self RadioListI, parent page.ControlI, id string)

func (*RadioList) SelectedLabel

func (l *RadioList) SelectedLabel() string

func (*RadioList) SelectedValue

func (l *RadioList) SelectedValue() string

func (*RadioList) SetSelectedID

func (l *RadioList) SetSelectedID(id string)

func (*RadioList) SetSelectedValue

func (l *RadioList) SetSelectedValue(v interface{})

func (*RadioList) SetValue

func (l *RadioList) SetValue(v interface{})

func (*RadioList) Value

func (l *RadioList) Value() interface{}

func (*RadioList) ΩUpdateFormValues added in v0.0.3

func (l *RadioList) ΩUpdateFormValues(ctx *page.Context)

type RadioListI

type RadioListI interface {
	CheckboxListI
}

type SelectList

type SelectList struct {
	control.SelectList
}

func NewSelectList

func NewSelectList(parent page.ControlI, id string) *SelectList

func (*SelectList) ΩDrawingAttributes added in v0.0.3

func (t *SelectList) ΩDrawingAttributes() *html.Attributes

type Tabs

type Tabs struct {
	control.Panel
	// contains filtered or unexported fields
}

A Tabs pane draws its child controls as a set of tabs. The labels of the children serve as the tab labels. This currently draws everything at once, with the current panel visible, but everything else has hidden html.

func NewTabs

func NewTabs(parent page.ControlI, id string) *Tabs

func (*Tabs) DrawTemplate

func (t *Tabs) DrawTemplate(ctx context.Context, buf *bytes.Buffer) (err error)

func (*Tabs) Init

func (l *Tabs) Init(self page.ControlI, parent page.ControlI, id string)

func (*Tabs) ΩDrawingAttributes added in v0.0.3

func (c *Tabs) ΩDrawingAttributes() *html.Attributes

type TextColorClass

type TextColorClass string

type Textbox

type Textbox struct {
	control.Textbox
}

func NewTextbox

func NewTextbox(parent page.ControlI, id string) *Textbox

func (*Textbox) ΩDrawingAttributes added in v0.0.3

func (t *Textbox) ΩDrawingAttributes() *html.Attributes

type TitleBar

type TitleBar struct {
	control.Panel
	// contains filtered or unexported fields
}

func NewTitleBar

func NewTitleBar(parent page.ControlI, id string) *TitleBar

func (*TitleBar) DrawTemplate

func (d *TitleBar) DrawTemplate(ctx context.Context, buf *bytes.Buffer) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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