forked from google/gxui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
container.go
50 lines (43 loc) · 1.02 KB
/
container.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package base
import (
"github.com/google/gxui"
"github.com/google/gxui/mixins/outer"
"github.com/google/gxui/mixins/parts"
)
type ContainerNoControlOuter interface {
gxui.Container
outer.PaintChilder
outer.Painter
outer.LayoutChildren
}
type ContainerOuter interface {
ContainerNoControlOuter
gxui.Control
}
type Container struct {
parts.Attachable
parts.Container
parts.DrawPaint
parts.InputEventHandler
parts.Layoutable
parts.Paddable
parts.PaintChildren
parts.Parentable
parts.Visible
}
func (c *Container) Init(outer ContainerOuter, theme gxui.Theme) {
c.Attachable.Init(outer)
c.Container.Init(outer)
c.DrawPaint.Init(outer, theme)
c.InputEventHandler.Init(outer)
c.Layoutable.Init(outer)
c.Paddable.Init(outer)
c.PaintChildren.Init(outer)
c.Parentable.Init(outer)
c.Visible.Init(outer)
// Interface compliance test
_ = gxui.Container(c)
}