Documentation ¶
Index ¶
- func DefaultViewFactory(m IModel) vugu.Builder
- type Button
- type ButtonModel
- type Composite
- type Control
- type ControlConfig
- func (c *ControlConfig) CascadeViewFactory(viewfactory ViewFactory) *ControlConfig
- func (c *ControlConfig) OverrideViewFactory(viewfactory ViewFactory) *ControlConfig
- func (c *ControlConfig) WithModelSetUp(setup ModelSetupFunc) *ControlConfig
- func (c *ControlConfig) WithMountPoint(mountpoint string) *ControlConfig
- func (c *ControlConfig) WithSetUp(setup SetUpFunc) *ControlConfig
- type DynamicView
- type IButtonModel
- type ICell
- type IClassProvider
- type IDynamicView
- type IEventContext
- type IList
- type IModel
- type IRenderedTexteditModel
- type IRow
- type ITable
- type ITexteditModel
- type ITree
- type IView
- type Identifiable
- type KeyEvent
- type KeyEventKind
- type KeyFunc
- type KeyHandler
- type List
- type Model
- type ModelSetupFunc
- type Row
- type RowView
- type Selector
- type SelectorModel
- type SetUpFunc
- type Table
- type TableView
- type Textedit
- type TexteditModel
- type TreeView
- type View
- type ViewFactory
- type ViewFactoryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultViewFactory ¶
Types ¶
type Button ¶
type Button struct { View[IButtonModel] }
type ButtonModel ¶
type ButtonModel struct { Model Label string Action func(IEventContext) }
func (*ButtonModel) GetLabel ¶
func (m *ButtonModel) GetLabel() string
func (*ButtonModel) Pressed ¶
func (m *ButtonModel) Pressed(event IEventContext)
type Control ¶
type Control interface { /* Indicates that the given model is changed by a control */ Update(IModel, vugu.DOMEvent) Close() Run(root vugu.Builder) error }
func NewControl ¶
func NewControl[T IModel](config *ControlConfig, IModel T) Control
type ControlConfig ¶
type ControlConfig struct { MountPoint string ViewFactory ViewFactory SetUp []SetUpFunc ModelSetup []ModelSetupFunc }
func NewDefaultConfig ¶
func NewDefaultConfig() *ControlConfig
func (*ControlConfig) CascadeViewFactory ¶
func (c *ControlConfig) CascadeViewFactory(viewfactory ViewFactory) *ControlConfig
func (*ControlConfig) OverrideViewFactory ¶
func (c *ControlConfig) OverrideViewFactory(viewfactory ViewFactory) *ControlConfig
func (*ControlConfig) WithModelSetUp ¶
func (c *ControlConfig) WithModelSetUp(setup ModelSetupFunc) *ControlConfig
func (*ControlConfig) WithMountPoint ¶
func (c *ControlConfig) WithMountPoint(mountpoint string) *ControlConfig
func (*ControlConfig) WithSetUp ¶
func (c *ControlConfig) WithSetUp(setup SetUpFunc) *ControlConfig
type DynamicView ¶
type IButtonModel ¶
type IButtonModel interface { IModel GetLabel() string Pressed(IEventContext) }
type IClassProvider ¶
type IClassProvider interface {
GetClass() string
}
type IDynamicView ¶
type IDynamicView interface { IView // contains filtered or unexported methods }
type IEventContext ¶
type IEventContext interface {
TriggerChanged(IModel)
}
func WrapEvent ¶
func WrapEvent(event vugu.DOMEvent) IEventContext
type IRenderedTexteditModel ¶
type IRenderedTexteditModel interface { ITexteditModel GetRenderedContent() string }
type ITexteditModel ¶
type ITexteditModel interface { IModel GetContent() string SetContent(string, IEventContext) }
type Identifiable ¶
type Identifiable interface {
Identifier() string
}
type KeyEventKind ¶
type KeyEventKind int
const ( PRESS KeyEventKind = 0 DOWN KeyEventKind = 1 UP KeyEventKind = 2 )
type KeyHandler ¶
type KeyHandler interface {
HandleKey(KeyEvent)
}
type List ¶
func (*List) GetElements ¶
type ModelSetupFunc ¶
type ModelSetupFunc func(model IModel)
type Selector ¶
type Selector struct { View[*SelectorModel] }
type SelectorModel ¶
type Textedit ¶
type Textedit struct { View[ITexteditModel] Multiline bool DefaultValue string DatalistID string // contains filtered or unexported fields }
type TexteditModel ¶
func (*TexteditModel) GetContent ¶
func (m *TexteditModel) GetContent() string
func (*TexteditModel) SetContent ¶
func (m *TexteditModel) SetContent(updated string, _ IEventContext)
type View ¶
type View[M IModel] struct { Model M /* CSS Class */ Class string // contains filtered or unexported fields }
Base struct for every Component
type ViewFactory ¶
type ViewFactoryFunc ¶
func (ViewFactoryFunc) CreateView ¶
func (f ViewFactoryFunc) CreateView(v IModel) vugu.Builder
Source Files ¶
Click to show internal directories.
Click to hide internal directories.