widgets

package
v0.0.0-...-b45fbc0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionMenuWidget

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

func NewActionMenuWidget

func NewActionMenuWidget() *ActionMenuWidget

func (*ActionMenuWidget) Add

func (self *ActionMenuWidget) Add(action *MenuAction) *ActionMenuWidget

func (*ActionMenuWidget) Render

func (self *ActionMenuWidget) Render(w io.Writer) error

type BaseWidget

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

func NewBaseWidget

func NewBaseWidget() *BaseWidget

func (*BaseWidget) AddScript

func (self *BaseWidget) AddScript(script Script) *BaseWidget

func (*BaseWidget) AddStyle

func (self *BaseWidget) AddStyle(s Style) *BaseWidget

func (*BaseWidget) Render

func (self *BaseWidget) Render(w io.Writer) error

func (*BaseWidget) SetWidget

func (self *BaseWidget) SetWidget(widget IWidget)

type ByteBuilder

type ByteBuilder struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewByteBuilder

func NewByteBuilder() *ByteBuilder

func (*ByteBuilder) Append

func (self *ByteBuilder) Append(chunk []byte)

func (*ByteBuilder) AppendString

func (self *ByteBuilder) AppendString(str string)

func (ByteBuilder) Byte

func (self ByteBuilder) Byte() []byte

func (*ByteBuilder) Write

func (self *ByteBuilder) Write(p []byte) (int, error)

type DivWidget

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

func NewDivWidget

func NewDivWidget() *DivWidget

func (*DivWidget) AddWidget

func (self *DivWidget) AddWidget(w IWidget) *DivWidget

func (*DivWidget) Render

func (self *DivWidget) Render(w io.Writer) error

func (*DivWidget) SetClass

func (self *DivWidget) SetClass(s string) *DivWidget

func (*DivWidget) SetContent

func (self *DivWidget) SetContent(content string) *DivWidget

/ deprecate

func (*DivWidget) SetHeight

func (self *DivWidget) SetHeight(height string) *DivWidget

func (*DivWidget) SetStyle

func (self *DivWidget) SetStyle(row string) *DivWidget

func (*DivWidget) SetTitle

func (self *DivWidget) SetTitle(title string) *DivWidget

func (*DivWidget) SetWidth

func (self *DivWidget) SetWidth(width string) *DivWidget

type FlexWidget

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

func NewFlexWidget

func NewFlexWidget() *FlexWidget

func (*FlexWidget) AddWidget

func (self *FlexWidget) AddWidget(w IWidget) *FlexWidget

func (*FlexWidget) Render

func (self *FlexWidget) Render(w io.Writer) error

func (*FlexWidget) SetClass

func (self *FlexWidget) SetClass(className string) *FlexWidget

func (*FlexWidget) SetStyle

func (self *FlexWidget) SetStyle(row string) *FlexWidget

type FormButtonWidget

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

func NewFormButtonWidget

func NewFormButtonWidget() *FormButtonWidget

func (*FormButtonWidget) Render

func (self *FormButtonWidget) Render(w io.Writer) error

func (*FormButtonWidget) SetName

func (self *FormButtonWidget) SetName(name string) *FormButtonWidget

func (*FormButtonWidget) SetTitle

func (self *FormButtonWidget) SetTitle(s string) *FormButtonWidget

func (*FormButtonWidget) SetType

func (self *FormButtonWidget) SetType(s string) *FormButtonWidget

func (*FormButtonWidget) SetValue

func (self *FormButtonWidget) SetValue(value string) *FormButtonWidget

type FormFileInputWidget

type FormFileInputWidget struct {
	Title       string
	Name        string
	Placeholder string
	Value       string
	// contains filtered or unexported fields
}

func NewFormFileInputWidget

func NewFormFileInputWidget() *FormFileInputWidget

func (*FormFileInputWidget) Render

func (self *FormFileInputWidget) Render(w io.Writer) error

func (*FormFileInputWidget) SetClass

func (self *FormFileInputWidget) SetClass(class string) *FormFileInputWidget

func (*FormFileInputWidget) SetName

func (*FormFileInputWidget) SetPlaceholder

func (self *FormFileInputWidget) SetPlaceholder(s string) *FormFileInputWidget

func (*FormFileInputWidget) SetTitle

func (self *FormFileInputWidget) SetTitle(s string) *FormFileInputWidget

func (*FormFileInputWidget) SetValue

func (self *FormFileInputWidget) SetValue(value string) *FormFileInputWidget

type FormInputWidget

type FormInputWidget struct {
	Title       string
	Name        string
	Placeholder string
	Value       string
	// contains filtered or unexported fields
}

func NewFormInputWidget

func NewFormInputWidget() *FormInputWidget

func (*FormInputWidget) Render

func (self *FormInputWidget) Render(w io.Writer) error

func (*FormInputWidget) SetClass

func (self *FormInputWidget) SetClass(class string) *FormInputWidget

func (*FormInputWidget) SetDisable

func (self *FormInputWidget) SetDisable(yesno bool)

func (*FormInputWidget) SetName

func (self *FormInputWidget) SetName(s string) *FormInputWidget

func (*FormInputWidget) SetPlaceholder

func (self *FormInputWidget) SetPlaceholder(s string) *FormInputWidget

func (*FormInputWidget) SetTitle

func (self *FormInputWidget) SetTitle(s string) *FormInputWidget

func (*FormInputWidget) SetValue

func (self *FormInputWidget) SetValue(value string) *FormInputWidget

type FormSelectOptionWidget

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

func NewFormSelectOptionWidget

func NewFormSelectOptionWidget() *FormSelectOptionWidget

func (*FormSelectOptionWidget) SetName

func (*FormSelectOptionWidget) SetValue

func (self *FormSelectOptionWidget) SetValue(value string) *FormSelectOptionWidget

type FormSelectWidget

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

func NewFormSelectWidget

func NewFormSelectWidget() *FormSelectWidget

func (*FormSelectWidget) AddOption

func (self *FormSelectWidget) AddOption(name string, value string) *FormSelectWidget

func (*FormSelectWidget) Render

func (self *FormSelectWidget) Render(w io.Writer) error

func (*FormSelectWidget) SetName

func (self *FormSelectWidget) SetName(name string) *FormSelectWidget

type FormTextWidget

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

func NewFormTextWidget

func NewFormTextWidget() *FormTextWidget

func (*FormTextWidget) Render

func (self *FormTextWidget) Render(w io.Writer) error

func (*FormTextWidget) SetClass

func (self *FormTextWidget) SetClass(class string) *FormTextWidget

func (*FormTextWidget) SetName

func (self *FormTextWidget) SetName(s string) *FormTextWidget

func (*FormTextWidget) SetValue

func (self *FormTextWidget) SetValue(value string) *FormTextWidget

type FormWidget

type FormWidget struct {
	Action string
	Method string
	Widget IWidget
	// contains filtered or unexported fields
}

func NewFormWidget

func NewFormWidget() *FormWidget

func (*FormWidget) Render

func (self *FormWidget) Render(w io.Writer) error

func (*FormWidget) SetAction

func (self *FormWidget) SetAction(s string) *FormWidget

func (*FormWidget) SetEnctype

func (self *FormWidget) SetEnctype(enctype string) *FormWidget

func (*FormWidget) SetMethod

func (self *FormWidget) SetMethod(s string) *FormWidget

func (*FormWidget) SetWidget

func (self *FormWidget) SetWidget(w IWidget) *FormWidget

type HeaderWidget

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

func NewHeaderWidget

func NewHeaderWidget() *HeaderWidget

func (*HeaderWidget) Render

func (self *HeaderWidget) Render(w io.Writer) error

func (*HeaderWidget) SetTitle

func (self *HeaderWidget) SetTitle(title string) *HeaderWidget

type IWidget

type IWidget interface {
	Render(w io.Writer) error
}

type ImageWidget

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

func NewImageWidget

func NewImageWidget() *ImageWidget

func (*ImageWidget) Render

func (self *ImageWidget) Render(w io.Writer) error

func (*ImageWidget) SetClass

func (self *ImageWidget) SetClass(class string) *ImageWidget

func (*ImageWidget) SetSource

func (self *ImageWidget) SetSource(s string) *ImageWidget

type LinkWidget

type LinkWidget struct {
	Link string
	// contains filtered or unexported fields
}

func NewLinkWidget

func NewLinkWidget() *LinkWidget

func (*LinkWidget) AddWidget

func (self *LinkWidget) AddWidget(widget IWidget) *LinkWidget

func (*LinkWidget) Render

func (self *LinkWidget) Render(w io.Writer) error

func (*LinkWidget) SetClass

func (self *LinkWidget) SetClass(classNames string) *LinkWidget

func (*LinkWidget) SetContent

func (self *LinkWidget) SetContent(content string) *LinkWidget
func (self *LinkWidget) SetLink(link string) *LinkWidget

type ListWidget

type ListWidget struct {
	Class string
	Items []IWidget
}

func NewListWidget

func NewListWidget() *ListWidget

func (*ListWidget) AddItem

func (self *ListWidget) AddItem(item IWidget) *ListWidget

func (ListWidget) Render

func (self ListWidget) Render(w io.Writer) error

func (*ListWidget) SetClass

func (self *ListWidget) SetClass(s string) *ListWidget
type MainMenuWidget struct {
	// contains filtered or unexported fields
}

func NewMainMenuWidget

func NewMainMenuWidget() *MainMenuWidget
func (self *MainMenuWidget) InitMain(menuGroup *MenuGroup)
func (self *MainMenuWidget) InitSetup(menuGroup *MenuGroup)
func (self *MainMenuWidget) Render(w io.Writer) error
func (self *MainMenuWidget) SetParam(ID string, value int)
type MenuAction struct {
	Link   string
	Icon   string
	Label  string
	Metric int
	ID     string
	Class  string
}

func NewMenuAction

func NewMenuAction() *MenuAction
func (self *MenuAction) SetClass(s string) *MenuAction
func (self *MenuAction) SetIcon(s string) *MenuAction
func (self *MenuAction) SetLabel(s string) *MenuAction
func (self *MenuAction) SetLink(s string) *MenuAction
type MenuGroup struct {
	// contains filtered or unexported fields
}
func (self *MenuGroup) Add(manuAction *MenuAction)
type MenuWidget struct {
	// contains filtered or unexported fields
}

func NewMenuWidget

func NewMenuWidget() *MenuWidget
func (self *MenuWidget) Add(manuGroup *MenuGroup)
func (self *MenuWidget) Render(w io.Writer) error

type PreWidget

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

func NewPreWidget

func NewPreWidget() *PreWidget

func (*PreWidget) Render

func (self *PreWidget) Render(w io.Writer) error

func (*PreWidget) SetContent

func (self *PreWidget) SetContent(content string) *PreWidget

type Script

type Script struct {
	Src   string
	Async bool
	Defer bool
}

func NewScript

func NewScript() *Script

func (*Script) SetDefer

func (self *Script) SetDefer(b bool)

func (*Script) SetSrc

func (self *Script) SetSrc(s string)

func (Script) String

func (self Script) String() string

type SectionWidget

type SectionWidget struct {
	Title  string
	Widget IWidget
}

func NewSectionWidget

func NewSectionWidget() *SectionWidget

func (*SectionWidget) Render

func (self *SectionWidget) Render(w io.Writer) error

func (*SectionWidget) SetTitle

func (self *SectionWidget) SetTitle(s string) *SectionWidget

func (*SectionWidget) SetWidget

func (self *SectionWidget) SetWidget(w IWidget) *SectionWidget

type Style

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

func NewStyle

func NewStyle() *Style

func (*Style) SetHref

func (self *Style) SetHref(href string)

func (*Style) SetMedia

func (self *Style) SetMedia(media string)

func (Style) String

func (self Style) String() string

type TableCelWidget

type TableCelWidget struct {
	Widget  IWidget
	Content string
	// contains filtered or unexported fields
}

func NewTableCellWidget

func NewTableCellWidget() *TableCelWidget

func (*TableCelWidget) SetClass

func (self *TableCelWidget) SetClass(s string) *TableCelWidget

func (*TableCelWidget) SetWidget

func (self *TableCelWidget) SetWidget(w IWidget) *TableCelWidget

type TableHeaderWidget

type TableHeaderWidget struct {
}

type TableRowWidget

type TableRowWidget struct {
	Cells []*TableCelWidget
	// contains filtered or unexported fields
}

func NewTableRowWidget

func NewTableRowWidget() *TableRowWidget

func (*TableRowWidget) AddCell

func (self *TableRowWidget) AddCell(cell *TableCelWidget) *TableRowWidget

func (*TableRowWidget) SetClass

func (self *TableRowWidget) SetClass(s string) *TableRowWidget

func (*TableRowWidget) SetTitle

func (self *TableRowWidget) SetTitle(title string) *TableRowWidget

type TableWidget

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

func NewTableWidget

func NewTableWidget() *TableWidget

func (*TableWidget) AddRow

func (self *TableWidget) AddRow(row *TableRowWidget) *TableWidget

func (*TableWidget) Render

func (self *TableWidget) Render(w io.Writer) error

func (*TableWidget) SetClass

func (self *TableWidget) SetClass(s string) *TableWidget

type TextWidget

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

func NewTextWidget

func NewTextWidget() *TextWidget

func NewTextWidgetWithText

func NewTextWidgetWithText(content string) *TextWidget

func (*TextWidget) Render

func (self *TextWidget) Render(w io.Writer) error

func (*TextWidget) SetClass

func (self *TextWidget) SetClass(class string) *TextWidget

type VBoxWidget

type VBoxWidget struct {
	Items []IWidget
}

func NewVBoxWidget

func NewVBoxWidget() *VBoxWidget

func (*VBoxWidget) Add

func (self *VBoxWidget) Add(widget IWidget) *VBoxWidget

func (*VBoxWidget) Render

func (self *VBoxWidget) Render(w io.Writer) error

Jump to

Keyboard shortcuts

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