Beispiel #1
0
func (w *window) Sizer() Sizer {
	p := w.wxPtr()
	if p == nil {
		return nil
	}
	if s := NewObjectFromPtr(C.wxWindow_GetSizer(p), false); s != nil {
		return s.(Sizer)
	}
	return nil
}
Beispiel #2
0
func (w *window) Sizer() Sizer {
	p := w.ptr()
	if p == nil {
		return nil
	}
	if s := bindObject(C.wxWindow_GetSizer(p), false); s != nil {
		return s.(Sizer)
	}
	return nil
}
Beispiel #3
0
func (w *window) SetSizer2(sizer Sizer, deleteOld bool) {
	p := wxPtr(w)
	if p == nil {
		return
	}
	// if deleteOld is false, we need to hold the old sizer, if any.
	var oldSizer C.WxObjectPtr
	if !deleteOld {
		oldSizer = C.wxWindow_GetSizer(p) // Use C++ ptr directly.
	}
	sizer.unhold()
	C.wxWindow_SetSizer(p, sizer.wxPtr(), cBool(deleteOld))
	if oldSizer != nil {
		NewObjectFromPtr(oldSizer, true) // Hold it.
	}
}