Beispiel #1
0
func newContainer(child Control) *container {
	c := new(container)
	c.id = C.newContainerView(unsafe.Pointer(c))
	c.child = child
	c.child.setParent(&controlParent{c.id})
	return c
}
Beispiel #2
0
// containerResized() gets called early so we have to do this in the constructor
func newContainer(resize func(x int, y int, width int, height int, d *sizing)) *container {
	c := new(container)
	c.resize = resize
	c.id = C.newContainerView(unsafe.Pointer(c))
	return c
}