Exemplo n.º 1
0
func newContainer(child Control) *container {
	c := new(container)
	widget := C.newContainer(unsafe.Pointer(c))
	c.layoutwidget = widget
	c.layoutcontainer = (*C.GtkContainer)(unsafe.Pointer(widget))
	c.child = child
	c.child.setParent(&controlParent{c.layoutcontainer})
	return c
}
Exemplo n.º 2
0
func newContainer(control Control) *container {
	c := new(container)
	hwnd := C.newContainer(unsafe.Pointer(c))
	if hwnd != c.hwnd {
		panic(fmt.Errorf("inconsistency: hwnd returned by CreateWindowEx() (%p) and hwnd stored in container (%p) differ", hwnd, c.hwnd))
	}
	c.child = control
	c.child.setParent(&controlParent{c})
	return c
}
Exemplo n.º 3
0
func newContainer() *container {
	c := new(container)
	c.widget = C.newContainer(unsafe.Pointer(c))
	c.container = (*C.GtkContainer)(unsafe.Pointer(c.widget))
	return c
}