// Start is called once at the start of the demo.
Start is called once at the start of the demo.
// Start is called once at the start of the demo .
func (t *GuiLayoutDock) Start(a *app.App) {
	a.DemoPanel().SetRenderable(true)
	a.DemoPanel().SetEnabled(true)
	dl := gui.NewDockLayout()
	a.DemoPanel().SetLayout(dl)
	top1 := gui.NewPanel(0, 50)
	top1.SetBorders(1, 1, 1, 1)
	top1.SetPaddings(4, 4, 4, 4)
	top1.SetColor(math32.NewColor("green"))
	top1.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockTop})
	a.DemoPanel().Add(top1)
	top2 := gui.NewPanel(0, 50)
	top2.SetBorders(1, 1, 1, 1)
	top2.SetPaddings(4, 4, 4, 4)
	top2.SetColor(math32.NewColor("blue"))
	top2.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockTop})
	a.DemoPanel().Add(top2)
	bot1 := gui.NewPanel(0, 32)
	bot1.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockBottom})
	bot1.SetColor(math32.NewColor("red"))
	bot1.SetBorders(1, 1, 1, 1)
	a.DemoPanel().Add(bot1)
	bot2 := gui.NewPanel(0, 32)
	bot2.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockBottom})
	bot2.SetColor(math32.NewColor("green"))
	bot2.SetBorders(1, 1, 1, 1)
	a.DemoPanel().Add(bot2)
	left1 := gui.NewPanel(40, 0)
	left1.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockLeft})
	left1.SetColor(math32.NewColor("black"))
	left1.SetBorders(1, 1, 1, 1)
	a.DemoPanel().Add(left1)
	left2 := gui.NewPanel(40, 0)
	left2.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockLeft})
	left2.SetColor(math32.NewColor("red"))
	left2.SetBorders(1, 1, 1, 1)
	a.DemoPanel().Add(left2)
	right1 := gui.NewPanel(40, 0)
	right1.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockRight})
	right1.SetColor(math32.NewColor("black"))
	right1.SetBorders(1, 1, 1, 1)
	a.DemoPanel().Add(right1)
	right2 := gui.NewPanel(40, 0)
	right2.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockRight})
	right2.SetColor(math32.NewColor("green"))
	right2.SetBorders(1, 1, 1, 1)
	a.DemoPanel().Add(right2)
	center := gui.NewPanel(0, 0)
	center.SetLayoutParams(&gui.DockLayoutParams{Edge: gui.DockCenter})
	a.DemoPanel().Add(center)
}
func ( t * GuiLayoutDock ) Start ( a * app . App ) { a . DemoPanel ( ) . SetRenderable ( true ) a . DemoPanel ( ) . SetEnabled ( true ) dl := gui . NewDockLayout ( ) a . DemoPanel ( ) . SetLayout ( dl ) top1 := gui . NewPanel ( 0 , 50 ) top1 . SetBorders ( 1 , 1 , 1 , 1 ) top1 . SetPaddings ( 4 , 4 , 4 , 4 ) top1 . SetColor ( math32 . NewColor ( " " ) ) top1 . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockTop } ) a . DemoPanel ( ) . Add ( top1 ) top2 := gui . NewPanel ( 0 , 50 ) top2 . SetBorders ( 1 , 1 , 1 , 1 ) top2 . SetPaddings ( 4 , 4 , 4 , 4 ) top2 . SetColor ( math32 . NewColor ( " " ) ) top2 . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockTop } ) a . DemoPanel ( ) . Add ( top2 ) bot1 := gui . NewPanel ( 0 , 32 ) bot1 . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockBottom } ) bot1 . SetColor ( math32 . NewColor ( " " ) ) bot1 . SetBorders ( 1 , 1 , 1 , 1 ) a . DemoPanel ( ) . Add ( bot1 ) bot2 := gui . NewPanel ( 0 , 32 ) bot2 . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockBottom } ) bot2 . SetColor ( math32 . NewColor ( " " ) ) bot2 . SetBorders ( 1 , 1 , 1 , 1 ) a . DemoPanel ( ) . Add ( bot2 ) left1 := gui . NewPanel ( 40 , 0 ) left1 . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockLeft } ) left1 . SetColor ( math32 . NewColor ( " " ) ) left1 . SetBorders ( 1 , 1 , 1 , 1 ) a . DemoPanel ( ) . Add ( left1 ) left2 := gui . NewPanel ( 40 , 0 ) left2 . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockLeft } ) left2 . SetColor ( math32 . NewColor ( " " ) ) left2 . SetBorders ( 1 , 1 , 1 , 1 ) a . DemoPanel ( ) . Add ( left2 ) right1 := gui . NewPanel ( 40 , 0 ) right1 . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockRight } ) right1 . SetColor ( math32 . NewColor ( " " ) ) right1 . SetBorders ( 1 , 1 , 1 , 1 ) a . DemoPanel ( ) . Add ( right1 ) right2 := gui . NewPanel ( 40 , 0 ) right2 . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockRight } ) right2 . SetColor ( math32 . NewColor ( " " ) ) right2 . SetBorders ( 1 , 1 , 1 , 1 ) a . DemoPanel ( ) . Add ( right2 ) center := gui . NewPanel ( 0 , 0 ) center . SetLayoutParams ( & gui . DockLayoutParams { Edge : gui . DockCenter } ) a . DemoPanel ( ) . Add ( center ) }
Start is called once at the start of the demo.
Start is called once at the start of the demo .
// Show and enable demo panel // First top panel // Second top panel // First bottom panel // Second bottom panel // First left panel // Second left panel // First right panel // Second right panel // Center panel