Documentation
¶
Index ¶
- Variables
- func AddPageLoadedListener(listener PageLoadedCallback)
- func Run(app BaseWidget)
- type AppContext
- func (c *AppContext) AppendChild(child BaseWidget)
- func (c *AppContext) ClientHeight() int
- func (c *AppContext) ClientWidth() int
- func (c *AppContext) CreateElement(tag string) Widget
- func (c *AppContext) CreateElementNS(namespace string, tag string) Widget
- func (c *AppContext) CreateElementWithOptions(tag string, options map[string]any) Widget
- func (c *AppContext) CurrentPath() string
- func (c *AppContext) GetElementByID(id string) *Widget
- func (c *AppContext) GoBack()
- func (c *AppContext) Navigate(path string)
- func (c *AppContext) OnNavigate(callback func(path string))
- func (c *AppContext) OnResize(callback func())
- func (c *AppContext) OpenLink(href string)
- func (c *AppContext) PushState(state any, title string, url string)
- type BaseWidget
- type Event
- type PageLoadedCallback
- type PageLoadedListeners
- 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) SetDraggable(draggable bool)
- func (w Widget) SetID(id string)
- func (w Widget) SetOnClick(onClick func(this BaseWidget, e Event))
- func (w Widget) SetOnDrag(onDrag func(this BaseWidget, e Event))
- func (w Widget) SetOnDragEnd(onDragEnd func(this BaseWidget, e Event))
- func (w Widget) SetOnDragStart(onDragStart 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)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Nil = BaseWidget{Widget: Widget(js.Value{})}
)
Functions ¶
func AddPageLoadedListener ¶ added in v0.0.4
func AddPageLoadedListener(listener PageLoadedCallback)
func Run ¶
func Run(app BaseWidget)
Types ¶
type AppContext ¶ added in v0.0.4
type AppContext struct {
Current js.Value
Doc js.Value
Root Widget
Scaffold any // scaffold.Scaffold
}
func Context ¶ added in v0.0.4
func Context() *AppContext
func NewContext ¶ added in v0.0.4
func NewContext() *AppContext
func (*AppContext) AppendChild ¶ added in v0.0.4
func (c *AppContext) AppendChild(child BaseWidget)
func (*AppContext) ClientHeight ¶ added in v0.0.4
func (c *AppContext) ClientHeight() int
func (*AppContext) ClientWidth ¶ added in v0.0.4
func (c *AppContext) ClientWidth() int
func (*AppContext) CreateElement ¶ added in v0.0.4
func (c *AppContext) CreateElement(tag string) Widget
func (*AppContext) CreateElementNS ¶ added in v0.0.4
func (c *AppContext) CreateElementNS(namespace string, tag string) Widget
func (*AppContext) CreateElementWithOptions ¶ added in v0.0.4
func (c *AppContext) CreateElementWithOptions(tag string, options map[string]any) Widget
func (*AppContext) CurrentPath ¶ added in v0.0.4
func (c *AppContext) CurrentPath() string
func (*AppContext) GetElementByID ¶ added in v0.0.4
func (c *AppContext) GetElementByID(id string) *Widget
func (*AppContext) GoBack ¶ added in v0.0.4
func (c *AppContext) GoBack()
func (*AppContext) Navigate ¶ added in v0.0.4
func (c *AppContext) Navigate(path string)
func (*AppContext) OnNavigate ¶ added in v0.0.4
func (c *AppContext) OnNavigate(callback func(path string))
func (*AppContext) OnResize ¶ added in v0.0.4
func (c *AppContext) OnResize(callback func())
func (*AppContext) OpenLink ¶ added in v0.0.4
func (c *AppContext) OpenLink(href string)
type BaseWidget ¶ added in v0.0.4
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 ¶ added in v0.0.4
func New(htmlTag string) BaseWidget
func NewNS ¶ added in v0.0.4
func NewNS(namespace string, htmlTag string) BaseWidget
func NewWithOptions ¶ added in v0.0.4
func NewWithOptions(htmlTag string, options map[string]any) BaseWidget
type Event ¶ added in v0.0.4
func (Event) PreventDefault ¶ added in v0.0.4
func (e Event) PreventDefault()
func (Event) StopPropagation ¶ added in v0.0.4
func (e Event) StopPropagation()
type PageLoadedCallback ¶ added in v0.0.4
type PageLoadedCallback func()
type PageLoadedListeners ¶ added in v0.0.4
type PageLoadedListeners struct {
// contains filtered or unexported fields
}
type Widget ¶ added in v0.0.4
func (Widget) AppendChild ¶ added in v0.0.4
func (Widget) Equal ¶ added in v0.0.4
func (w Widget) Equal(other BaseWidget) bool
func (Widget) RemoveClass ¶ added in v0.0.4
func (Widget) ReplaceWith ¶ added in v0.0.4
func (Widget) SetAttribute ¶ added in v0.0.4
func (Widget) SetAttributeNS ¶ added in v0.0.4
func (Widget) SetDraggable ¶ added in v0.0.6
func (Widget) SetOnClick ¶ added in v0.0.4
func (w Widget) SetOnClick(onClick func(this BaseWidget, e Event))
func (Widget) SetOnDrag ¶ added in v0.0.6
func (w Widget) SetOnDrag(onDrag func(this BaseWidget, e Event))
func (Widget) SetOnDragEnd ¶ added in v0.0.6
func (w Widget) SetOnDragEnd(onDragEnd func(this BaseWidget, e Event))
func (Widget) SetOnDragStart ¶ added in v0.0.6
func (w Widget) SetOnDragStart(onDragStart func(this BaseWidget, e Event))
func (Widget) ToggleClass ¶ added in v0.0.4
func (Widget) UpdateStyleProperty ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.