Documentation
¶
Index ¶
- Variables
- type BaseWidget
- type Event
- type Widget
- func (w Widget) AddClass(class string)
- func (w Widget) AppendChild(child Widget)
- func (w Widget) Call(m string, args ...any) Widget
- func (w Widget) ChildAt(index int) Widget
- func (w Widget) Equal(other BaseWidget) bool
- func (w Widget) Get(p string) js.Value
- func (w Widget) ID() string
- func (w Widget) IsNull() bool
- func (w Widget) Parent() Widget
- func (w Widget) Remove()
- func (w Widget) RemoveClass(class string)
- func (w Widget) ReplaceWith(widget Widget)
- func (w Widget) Set(p string, v any)
- func (w Widget) SetAttribute(p string, v any)
- func (w Widget) SetAttributeNS(namespace string, p string, v any)
- func (w Widget) SetClass(class string)
- func (w Widget) SetID(id string)
- func (w Widget) SetOnClick(onClick func(this BaseWidget, e Event))
- func (w Widget) SetStyle(style string)
- func (w Widget) SetText(text string)
- func (w Widget) ToggleClass(class string)
- func (w Widget) UpdateStyleProperty(property string, value string)
- type WidgetContext
- func (c *WidgetContext) AppendChild(child BaseWidget)
- func (c *WidgetContext) ClientHeight() int
- func (c *WidgetContext) ClientWidth() int
- func (c *WidgetContext) CreateElement(tag string) Widget
- func (c *WidgetContext) CreateElementNS(namespace string, tag string) Widget
- func (c *WidgetContext) CreateElementWithOptions(tag string, options map[string]any) Widget
- func (c *WidgetContext) CurrentPath() string
- func (c *WidgetContext) GetElementByID(id string) *Widget
- func (c *WidgetContext) GoBack()
- func (c *WidgetContext) Navigate(path string)
- func (c *WidgetContext) OnNavigate(callback func(path string))
- func (c *WidgetContext) OnResize(callback func())
- func (c *WidgetContext) OpenLink(href string)
- func (c *WidgetContext) PushState(state any, title string, url string)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Nil = BaseWidget{Widget: Widget(js.Value{})}
)
Functions ¶
This section is empty.
Types ¶
type BaseWidget ¶
type BaseWidget struct {
Widget
ColumnCount *breakpoint.BreakpointValue[int]
Height *breakpoint.BreakpointValue[int]
Margin *breakpoint.BreakpointValue[spacing.Spacing]
MaxWidth *breakpoint.BreakpointValue[int]
Padding *breakpoint.BreakpointValue[spacing.Spacing]
Visible *breakpoint.BreakpointValue[bool]
Width *breakpoint.BreakpointValue[int]
WidthP *breakpoint.BreakpointValue[float64]
}
func New ¶
func New(htmlTag string) BaseWidget
func NewNS ¶
func NewNS(namespace string, htmlTag string) BaseWidget
func NewWithOptions ¶
func NewWithOptions(htmlTag string, options map[string]any) BaseWidget
type Event ¶
func (Event) PreventDefault ¶
func (e Event) PreventDefault()
func (Event) StopPropagation ¶
func (e Event) StopPropagation()
type Widget ¶
func (Widget) AppendChild ¶
func (Widget) Equal ¶
func (w Widget) Equal(other BaseWidget) bool
func (Widget) RemoveClass ¶
func (Widget) ReplaceWith ¶
func (Widget) SetAttribute ¶
func (Widget) SetOnClick ¶
func (w Widget) SetOnClick(onClick func(this BaseWidget, e Event))
func (Widget) ToggleClass ¶
func (Widget) UpdateStyleProperty ¶
type WidgetContext ¶
func Context ¶
func Context() *WidgetContext
func NewContext ¶
func NewContext() *WidgetContext
func (*WidgetContext) AppendChild ¶
func (c *WidgetContext) AppendChild(child BaseWidget)
func (*WidgetContext) ClientHeight ¶
func (c *WidgetContext) ClientHeight() int
func (*WidgetContext) ClientWidth ¶
func (c *WidgetContext) ClientWidth() int
func (*WidgetContext) CreateElement ¶
func (c *WidgetContext) CreateElement(tag string) Widget
func (*WidgetContext) CreateElementNS ¶
func (c *WidgetContext) CreateElementNS(namespace string, tag string) Widget
func (*WidgetContext) CreateElementWithOptions ¶
func (c *WidgetContext) CreateElementWithOptions(tag string, options map[string]any) Widget
func (*WidgetContext) CurrentPath ¶
func (c *WidgetContext) CurrentPath() string
func (*WidgetContext) GetElementByID ¶
func (c *WidgetContext) GetElementByID(id string) *Widget
func (*WidgetContext) GoBack ¶
func (c *WidgetContext) GoBack()
func (*WidgetContext) Navigate ¶
func (c *WidgetContext) Navigate(path string)
func (*WidgetContext) OnNavigate ¶
func (c *WidgetContext) OnNavigate(callback func(path string))
func (*WidgetContext) OnResize ¶
func (c *WidgetContext) OnResize(callback func())
func (*WidgetContext) OpenLink ¶
func (c *WidgetContext) OpenLink(href string)
Click to show internal directories.
Click to hide internal directories.