Add ContainerHorizontal

This commit is contained in:
David Vogel 2023-05-28 13:52:21 +02:00
parent 9b07b21ab5
commit c5b642cdc8
6 changed files with 1061 additions and 827 deletions

View File

@ -0,0 +1,27 @@
<div vg-attr='utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-1685274222"}'>
<vg-comp expr="c.DefaultSlot"></vg-comp>
</div>
<style>
.d3c-1685274222 {
display: flex;
flex-wrap: wrap;
gap: 0.5em;
margin: 0.5em 0;
}
</style>
<script type="application/x-go">
import (
"git.d3nexus.de/Dadido3/D3vugu-components/utils"
"github.com/vugu/vugu"
)
// ContainerHorizonal arranges all contained elements in one row.
// This can be used to create a menu bar out of buttons.
type ContainerHorizontal struct {
AttrMap vugu.AttrMap
DefaultSlot vugu.Builder `vugu:"data"`
}
</script>

View File

@ -0,0 +1,62 @@
package layout
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
import (
"git.d3nexus.de/Dadido3/D3vugu-components/utils"
)
// ContainerHorizonal arranges all contained elements in one row.
// This can be used to create a menu bar out of buttons.
type ContainerHorizontal struct {
AttrMap vugu.AttrMap
DefaultSlot vugu.Builder `vugu:"data"`
}
func (c *ContainerHorizontal) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-1685274222"})
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.DefaultSlot
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
{
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1685274222 {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 0.5em;\n\t\tmargin: 0.5em 0;\n\t}\n", Attr: []vugu.VGAttribute(nil)})
}
vgout.AppendCSS(vgn)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

View File

@ -24,7 +24,7 @@
" <vg-slot name=\"DefaultSlot\">Successful action</vg-slot>\n" + " <vg-slot name=\"DefaultSlot\">Successful action</vg-slot>\n" +
"</input:Button>"' style="margin: 0;"></pre> "</input:Button>"' style="margin: 0;"></pre>
</view:Code> </view:Code>
<div class="flex-container"> <layout:ContainerHorizontal>
<input:Button class="d3c-color-success"> <input:Button class="d3c-color-success">
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot> <vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
<vg-slot name="DefaultSlot">Successful action</vg-slot> <vg-slot name="DefaultSlot">Successful action</vg-slot>
@ -41,8 +41,8 @@
<vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot> <vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot>
<vg-slot name="DefaultSlot">Dangerous action</vg-slot> <vg-slot name="DefaultSlot">Dangerous action</vg-slot>
</input:Button> </input:Button>
</div> </layout:ContainerHorizontal>
<div class="flex-container"> <layout:ContainerHorizontal>
<input:Button class="d3c-color-success-faded"> <input:Button class="d3c-color-success-faded">
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot> <vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
<vg-slot name="DefaultSlot">Successful action</vg-slot> <vg-slot name="DefaultSlot">Successful action</vg-slot>
@ -59,38 +59,39 @@
<vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot> <vg-slot name="IconSlot"><icons:LWarning></icons:LWarning></vg-slot>
<vg-slot name="DefaultSlot">Dangerous action</vg-slot> <vg-slot name="DefaultSlot">Dangerous action</vg-slot>
</input:Button> </input:Button>
</div> </layout:ContainerHorizontal>
<h2>Tags</h2> <h2>Tags</h2>
<view:Code> <view:Code>
<pre vg-content='"<view:Tag class=\"d3c-color-success\">This was a success</view:Tag>"' style="margin: 0;"></pre> <pre vg-content='"<view:Tag class=\"d3c-color-success\">This was a success</view:Tag>"' style="margin: 0;"></pre>
</view:Code> </view:Code>
<div class="flex-container"> <layout:ContainerHorizontal>
<view:Tag class="d3c-color-success">This was a success</view:Tag> <view:Tag class="d3c-color-success">This was a success</view:Tag>
<view:Tag class="d3c-color-attention">Attention needed</view:Tag> <view:Tag class="d3c-color-attention">Attention needed</view:Tag>
<view:Tag class="d3c-color-caution">Warning</view:Tag> <view:Tag class="d3c-color-caution">Warning</view:Tag>
<view:Tag class="d3c-color-critical">Something went wrong</view:Tag> <view:Tag class="d3c-color-critical">Something went wrong</view:Tag>
</div> </layout:ContainerHorizontal>
<div class="flex-container"> <layout:ContainerHorizontal>
<view:Tag class="d3c-color-success-faded">This was a success</view:Tag> <view:Tag class="d3c-color-success-faded">This was a success</view:Tag>
<view:Tag class="d3c-color-attention-faded">Attention needed</view:Tag> <view:Tag class="d3c-color-attention-faded">Attention needed</view:Tag>
<view:Tag class="d3c-color-caution-faded">Warning</view:Tag> <view:Tag class="d3c-color-caution-faded">Warning</view:Tag>
<view:Tag class="d3c-color-critical-faded">Something went wrong</view:Tag> <view:Tag class="d3c-color-critical-faded">Something went wrong</view:Tag>
</div> </layout:ContainerHorizontal>
<h2>Icons</h2> <h2>Icons</h2>
<p>Icons will use the text color by default, if you need to change their stroke/fill coloring, use the <view:CodeInline>d3c-icon-use-color</view:CodeInline> class.</p> <p>Icons will use the text color by default, if you need to change their stroke/fill coloring, use the <view:CodeInline>d3c-icon-use-color</view:CodeInline> class.</p>
<view:Code> <view:Code>
<pre vg-content='"<icons:LInfoCircle class=\"d3c-color-attention d3c-icon-use-color\"></icons:LInfoCircle>"' style="margin: 0;"></pre> <pre vg-content='"<icons:LInfoCircle class=\"d3c-color-attention d3c-icon-use-color\"></icons:LInfoCircle>"' style="margin: 0;"></pre>
</view:Code> </view:Code>
<div class="flex-container" style="font-size: 2em;"> <layout:ContainerHorizontal style="font-size: 2em;">
<icons:LInfoCircle class="d3c-color-attention d3c-icon-use-color"></icons:LInfoCircle> <icons:LInfoCircle class="d3c-color-attention d3c-icon-use-color"></icons:LInfoCircle>
<icons:LWarning class="d3c-color-critical d3c-icon-use-color"></icons:LWarning> <icons:LWarning class="d3c-color-critical d3c-icon-use-color"></icons:LWarning>
</div> </layout:ContainerHorizontal>
<h2>Containers</h2> <h2>Containers</h2>
<layout:LayerContainer class="d3c-color-layer-1"> <layout:LayerContainer class="d3c-color-layer-1">
<span>This container uses the <view:CodeInline class="d3c-color-layer-2">d3c-color-layer-1</view:CodeInline> class. All child elements inherit the color scheme.</span> <span>This container uses the <view:CodeInline class="d3c-color-layer-2">d3c-color-layer-1</view:CodeInline> class. All child elements inherit the color scheme.</span>
<layout:ContainerHorizontal>
<input:Button> <input:Button>
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot> <vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
<vg-slot name="DefaultSlot">Does inherit color</vg-slot> <vg-slot name="DefaultSlot">Does inherit color</vg-slot>
@ -99,6 +100,7 @@
<vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot> <vg-slot name="IconSlot"><icons:LPlus></icons:LPlus></vg-slot>
<vg-slot name="DefaultSlot">Doesn't inherit color</vg-slot> <vg-slot name="DefaultSlot">Doesn't inherit color</vg-slot>
</input:Button> </input:Button>
</layout:ContainerHorizontal>
</layout:LayerContainer> </layout:LayerContainer>
<layout:LayerContainer class="d3c-color-critical-faded"> <layout:LayerContainer class="d3c-color-critical-faded">
<icons:LWarning></icons:LWarning> <span>Something bad happened!</span> <icons:LWarning></icons:LWarning> <span>Something bad happened!</span>

View File

@ -32,7 +32,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xB4D5B4F8F5520F5E^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xF41E59924BE6FD91^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container)
if vgcomp == nil { if vgcomp == nil {
@ -73,7 +73,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x726BDE1C6E5CB75B^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x9D0696B00EDBF530^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -108,7 +108,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x6D73F9FAAA216E82^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x211B7B954237FF22^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -141,7 +141,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x8A726494AD3412F2^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x4996B936C053F53D^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -174,7 +174,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xB19ED2341B7E3900^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xD5FE255A145534BB^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -207,7 +207,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x4A899082DCE15CD1^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE86305EEF3A4E010^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -240,7 +240,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xB4C843DDC27EB99B^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x3ABE6D86D81D9D3C^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -273,7 +273,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xF658B7B75ED9B09A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xCDC495EB6028B33E^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -306,7 +306,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x38E1D69F942BF4F5^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE1D1229320D9673C^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -339,7 +339,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x13B142555424A64^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x619EFD08D8EA1ED3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -372,7 +372,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xDDA053F0A495AA39^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE692DC1B0E76404B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -405,7 +405,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xB95C9BD6E5CB94A7^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x53CB1C81C1932CF8^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -438,7 +438,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x62CFE288D87324DD^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xB5DDB4EAE7D2CDE3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -474,7 +474,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x3278113C09D4769^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x2B1E8662CF1E93E8^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -508,15 +508,27 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "flex-container"}}}
vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x5DE4C95C9A40D7C8^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x91733715AE37945B^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xC28D3923D598F36B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -535,7 +547,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x8E3597AFE21B49B7^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x6AAD8FB7B9FC35EF^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus)
if vgcomp == nil { if vgcomp == nil {
@ -568,7 +580,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x513DEE62A5798BF1^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE19C8E8F5837DB36^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -587,7 +599,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x7A26F693E3FFE34F^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE3FB67070015A334^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobe) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobe)
if vgcomp == nil { if vgcomp == nil {
@ -620,7 +632,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xC1A2B8821339AC18^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x6E6EFAB2AEB7C157^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -639,7 +651,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xAC4227AEE89CAD86^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x2B507DC684386063^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle)
if vgcomp == nil { if vgcomp == nil {
@ -672,7 +684,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xDD1FA8637F58D05A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xFC40A53893090555^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -691,7 +703,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xFF5A0EDD1425D63^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x78291F736572DAB0^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning)
if vgcomp == nil { if vgcomp == nil {
@ -723,18 +735,35 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "flex-container"}}}
vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x8F4CDD18BE0AD2E3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA5AE82272B512306^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x5529BBFDC747250B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -753,7 +782,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xCD5DC72EE69DD7A3^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x5AE0BE63C93E2C7B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus)
if vgcomp == nil { if vgcomp == nil {
@ -786,7 +815,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xAEA4CA9ADB14E178^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xCEE3CB30C1BDD4AA^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -805,7 +834,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xFAC889A4871F424^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x704F700B5F3357F0^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobe) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobe)
if vgcomp == nil { if vgcomp == nil {
@ -838,7 +867,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xB62FF2B8F91D76C0^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x47F71764A372944C^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -857,7 +886,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xE08A4FBB2F1A5E69^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xD4D3E8D474283976^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle)
if vgcomp == nil { if vgcomp == nil {
@ -890,7 +919,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x3B8F7CFB1345460^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE7BDD5882CBDE77F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -909,7 +938,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xDFF454628843CEC2^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x7A5E854662AC777C^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning)
if vgcomp == nil { if vgcomp == nil {
@ -941,6 +970,11 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
@ -950,7 +984,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA366DD341993239F^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x991477C432D5D527^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -981,15 +1015,27 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "flex-container"}}}
vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x2E6EFF62BA669CC^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA9A04D2DC5A16EF^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x5A82938894173F85^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag)
if vgcomp == nil { if vgcomp == nil {
@ -1018,7 +1064,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x42E173A066B597A8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x3E406298C545DCA3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag)
if vgcomp == nil { if vgcomp == nil {
@ -1047,7 +1093,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x8CB73063DE33C2C0^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x23E52DBD553055B3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag)
if vgcomp == nil { if vgcomp == nil {
@ -1076,7 +1122,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xAD0C7FC4731E29A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x21EDF299BE6ADBF^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag)
if vgcomp == nil { if vgcomp == nil {
@ -1104,18 +1150,35 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "flex-container"}}}
vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xBB0710E78B139E4E^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xF55E2FF13B2987C8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x8BE1B9B4EE81B5E3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag)
if vgcomp == nil { if vgcomp == nil {
@ -1144,7 +1207,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xE476C6F6FAE55C95^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x7C993861AF99E52^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag)
if vgcomp == nil { if vgcomp == nil {
@ -1173,7 +1236,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xC665C960272B9B76^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x9E049AC8E1123688^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag)
if vgcomp == nil { if vgcomp == nil {
@ -1202,7 +1265,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x99AA990FB3163A44^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xD3FCA56E07F59610^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Tag)
if vgcomp == nil { if vgcomp == nil {
@ -1230,6 +1293,11 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
@ -1246,7 +1314,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Icons will use the text color by default, if you need to change their stroke/fill coloring, use the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Icons will use the text color by default, if you need to change their stroke/fill coloring, use the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x4CD7E0BA598E7F42^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x3A606B67CCE518E1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -1276,7 +1344,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x6D5071A5C643C761^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x14798F0E0D631B7A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -1307,15 +1375,29 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "flex-container"}, vugu.VGAttribute{Namespace: "", Key: "style", Val: "font-size: 2em;"}}}
vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xEA4ECEF91969F1DD^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.AttrMap = make(map[string]interface{}, 8)
vgcomp.AttrMap["style"] = "font-size: 2em;"
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x8DC7C8ECE0946A25^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xF1A5F92AA07A79EF^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LInfoCircle)
if vgcomp == nil { if vgcomp == nil {
@ -1333,7 +1415,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xED1A5D808371F12D^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x70A3102B0923AA2B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning)
if vgcomp == nil { if vgcomp == nil {
@ -1350,6 +1432,11 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
@ -1359,7 +1446,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x9016DD367546B995^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE85DB21E57816EA6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.LayerContainer) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.LayerContainer)
if vgcomp == nil { if vgcomp == nil {
@ -1387,7 +1474,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "This container uses the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "This container uses the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xEF2406F7CF2D88ED^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xEC4B6953AFE00337^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -1419,7 +1506,26 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x4DAD1A887954458A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xDF915B423813A4D1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xD8E1EF7C96861286^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -1436,7 +1542,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x26BE840C64B7C017^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x4B81041E9DE45F6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus)
if vgcomp == nil { if vgcomp == nil {
@ -1466,10 +1572,10 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Component: vgcomp} vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x6FAD14D5C7AAD2A5^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xBD7CF9AB8D09385B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -1488,7 +1594,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xB66A064CE2439293^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x918BCE556FDF022E^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LPlus)
if vgcomp == nil { if vgcomp == nil {
@ -1518,6 +1624,14 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Component: vgcomp} vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
return return
@ -1529,7 +1643,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xF9324E23822798C2^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x7C51DB9F42B65C30^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.LayerContainer) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.LayerContainer)
if vgcomp == nil { if vgcomp == nil {
@ -1550,7 +1664,7 @@ func (c *PageColors) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x8AEBAD4025E7F988^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x141794B8A7DBDDAF^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LWarning)
if vgcomp == nil { if vgcomp == nil {

View File

@ -31,8 +31,10 @@
" })\n" + " })\n" +
"}"' style="margin: 0;"></pre> "}"' style="margin: 0;"></pre>
</view:Code> </view:Code>
<layout:ContainerHorizontal>
<input:Button @Click="c.handleSimpleToastButton(event)">Open simple toast</input:Button> <input:Button @Click="c.handleSimpleToastButton(event)">Open simple toast</input:Button>
<input:Button @Click="c.handleWarningToastButton(event)">Open warning toast</input:Button> <input:Button @Click="c.handleWarningToastButton(event)">Open warning toast</input:Button>
</layout:ContainerHorizontal>
<p>A shorter version of this is <view:CodeInline>overlay.ToastMessage</view:CodeInline> which only accepts a message text and a message type which is one of</p> <p>A shorter version of this is <view:CodeInline>overlay.ToastMessage</view:CodeInline> which only accepts a message text and a message type which is one of</p>
<ul> <ul>
<li><view:CodeInline>overlay.ToastMessageTypeSuccess</view:CodeInline></li> <li><view:CodeInline>overlay.ToastMessageTypeSuccess</view:CodeInline></li>

View File

@ -29,7 +29,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x194F4C7AF2E5A2B0^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x4259B5437ED85B00^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container)
if vgcomp == nil { if vgcomp == nil {
@ -60,7 +60,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Overlays are handled by the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Overlays are handled by the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x3757E78A1B64D645^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x847F13BFC8F180A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -97,7 +97,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Every page or component that creates overlays has to embed the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Every page or component that creates overlays has to embed the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xFA080C088DBCE9C9^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x11597539355F8078^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -124,7 +124,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: " structure. Your wiring function also needs to set the reference to your "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: " structure. Your wiring function also needs to set the reference to your "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x629A301362214872^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xE17ED7F11D89B9CE^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -164,7 +164,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x9A4385E0CAC8E985^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xDF14E85915FF331E^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -205,7 +205,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xC476BA53145BB281^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x91259EFC8AFAADC7^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -243,7 +243,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xA9AF18688A4172C^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x9E888D62321BFAB^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -281,7 +281,26 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x780A6C984431BEBF^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xF0ED0ED27EF42994^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil {
// create new one if needed
vgcomp = new(layout.ContainerHorizontal)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xB1222E40FFE80BA6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -306,10 +325,10 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Component: vgcomp} vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x35E3A47F92F1AAD7^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xB774FA1DAD6A06B1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -336,6 +355,14 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "p", Attr: []vugu.VGAttribute(nil)} vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "p", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
@ -344,7 +371,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "A shorter version of this is "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "A shorter version of this is "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xABF3E4A38937C760^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x2008FD3859753FBA^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -386,7 +413,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xCB89A1E68B20EA8A^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x4F0C4E3C8478E528^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -419,7 +446,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x4A0D1617B8C07161^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xFF67905442723348^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -452,7 +479,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x250710AB16D8A4A7^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x9191C8062B221604^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -485,7 +512,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xEDD5787DBA040BA8^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x7285F93CF5D54FFA^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -516,7 +543,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xECE61DAD54EC1354^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xB141CFD7553FCCCC^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -550,7 +577,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x50434B1AB4676FD5^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x5A0135D77FE2347F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {