Documentation
¶
Overview ¶
Package renderdiff holds components that use every part of the template language, for the test that compares RenderHTML with the document a mount builds.
Index ¶
- type Card
- func (c *Card) Build(parent, before oneui.NodeID)
- func (c *Card) NotifyLevelChanged()
- func (c *Card) NotifyMarkChanged()
- func (c *Card) NotifyNotesChanged()
- func (c *Card) NotifyTitleChanged()
- func (c *Card) RenderHTML(w io.Writer) error
- func (c *Card) SetLevel(v int)
- func (c *Card) SetMark(v string)
- func (c *Card) SetNotes(v string)
- func (c *Card) SetTitle(v string)
- func (c *Card) Update(dirty uint64)
- type Item
- type Page
- func (c *Page) Build(parent, before oneui.NodeID)
- func (p *Page) Level() int
- func (c *Page) NotifyBigChanged()
- func (c *Page) NotifyColorChanged()
- func (c *Page) NotifyCountChanged()
- func (c *Page) NotifyExtraChanged()
- func (c *Page) NotifyItemsChanged()
- func (c *Page) NotifyNamesChanged()
- func (c *Page) NotifyOnChanged()
- func (c *Page) NotifyOpenChanged()
- func (c *Page) NotifyRatioChanged()
- func (c *Page) NotifyTitleChanged()
- func (c *Page) RenderHTML(w io.Writer) error
- func (c *Page) SetBig(v int64)
- func (c *Page) SetColor(v string)
- func (c *Page) SetCount(v int)
- func (c *Page) SetExtra(v string)
- func (c *Page) SetItems(v []Item)
- func (c *Page) SetNames(v []string)
- func (c *Page) SetOn(v bool)
- func (c *Page) SetOpen(v bool)
- func (c *Page) SetRatio(v float64)
- func (c *Page) SetTitle(v string)
- func (c *Page) Update(dirty uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Card ¶
type Card struct {
oneui.Base
Title string `oneui:"param,required"`
Level int `oneui:"param"`
Mark string `oneui:"param"`
Notes string `oneui:"state"`
}
Card is a child with a default and a named slot and a fallback.
func (*Card) NotifyLevelChanged ¶
func (c *Card) NotifyLevelChanged()
NotifyLevelChanged updates the nodes bound to Level after it was changed in place.
func (*Card) NotifyMarkChanged ¶
func (c *Card) NotifyMarkChanged()
NotifyMarkChanged updates the nodes bound to Mark after it was changed in place.
func (*Card) NotifyNotesChanged ¶
func (c *Card) NotifyNotesChanged()
NotifyNotesChanged updates the nodes bound to Notes after it was changed in place.
func (*Card) NotifyTitleChanged ¶
func (c *Card) NotifyTitleChanged()
NotifyTitleChanged updates the nodes bound to Title after it was changed in place.
func (*Card) RenderHTML ¶
RenderHTML writes the markup of Card for its current state to w, without creating nodes or change sets: first paint and server-side rendering. It is the primary way to render; the root function RenderHTML(w, c) of package oneui does the same for a Component held as an interface. See HTMLRenderer in that package for what the markup contains and when to mount instead. On error the output is incomplete and the error is the first one w returned. It must not run while a setter of the same component runs.
func (*Card) SetLevel ¶
SetLevel sets Level and updates the nodes bound to it when the value changed.
func (*Card) SetNotes ¶
SetNotes sets Notes and updates the nodes bound to it when the value changed.
type Page ¶
type Page struct {
oneui.Base
Title string `oneui:"state"`
Count int `oneui:"state"`
Ratio float64 `oneui:"state"`
Big int64 `oneui:"state"`
Open bool `oneui:"state"`
On bool `oneui:"state"`
Color string `oneui:"state"`
Extra string `oneui:"state"`
Items []Item `oneui:"state"`
Names []string `oneui:"state"`
}
Page uses classes, bound and optional attributes, inline style, two-way bindings, if chains, nested each blocks, a child with slots, void elements and SVG.
func (*Page) NotifyBigChanged ¶
func (c *Page) NotifyBigChanged()
NotifyBigChanged updates the nodes bound to Big after it was changed in place.
func (*Page) NotifyColorChanged ¶
func (c *Page) NotifyColorChanged()
NotifyColorChanged updates the nodes bound to Color after it was changed in place.
func (*Page) NotifyCountChanged ¶
func (c *Page) NotifyCountChanged()
NotifyCountChanged updates the nodes bound to Count after it was changed in place.
func (*Page) NotifyExtraChanged ¶
func (c *Page) NotifyExtraChanged()
NotifyExtraChanged updates the nodes bound to Extra after it was changed in place.
func (*Page) NotifyItemsChanged ¶
func (c *Page) NotifyItemsChanged()
NotifyItemsChanged updates the nodes bound to Items after it was changed in place.
func (*Page) NotifyNamesChanged ¶
func (c *Page) NotifyNamesChanged()
NotifyNamesChanged updates the nodes bound to Names after it was changed in place.
func (*Page) NotifyOnChanged ¶
func (c *Page) NotifyOnChanged()
NotifyOnChanged updates the nodes bound to On after it was changed in place.
func (*Page) NotifyOpenChanged ¶
func (c *Page) NotifyOpenChanged()
NotifyOpenChanged updates the nodes bound to Open after it was changed in place.
func (*Page) NotifyRatioChanged ¶
func (c *Page) NotifyRatioChanged()
NotifyRatioChanged updates the nodes bound to Ratio after it was changed in place.
func (*Page) NotifyTitleChanged ¶
func (c *Page) NotifyTitleChanged()
NotifyTitleChanged updates the nodes bound to Title after it was changed in place.
func (*Page) RenderHTML ¶
RenderHTML writes the markup of Page for its current state to w, without creating nodes or change sets: first paint and server-side rendering. It is the primary way to render; the root function RenderHTML(w, c) of package oneui does the same for a Component held as an interface. See HTMLRenderer in that package for what the markup contains and when to mount instead. On error the output is incomplete and the error is the first one w returned. It must not run while a setter of the same component runs.
func (*Page) SetColor ¶
SetColor sets Color and updates the nodes bound to it when the value changed.
func (*Page) SetCount ¶
SetCount sets Count and updates the nodes bound to it when the value changed.
func (*Page) SetExtra ¶
SetExtra sets Extra and updates the nodes bound to it when the value changed.
func (*Page) SetItems ¶
SetItems sets Items and always updates the nodes bound to it, because values of its type cannot be compared. Use NotifyItemsChanged after changing it in place.
func (*Page) SetNames ¶
SetNames sets Names and always updates the nodes bound to it, because values of its type cannot be compared. Use NotifyNamesChanged after changing it in place.
func (*Page) SetRatio ¶
SetRatio sets Ratio and updates the nodes bound to it when the value changed.