Beispiel #1
0
func NewButton2(parent Window, id int, label string, pos *Point, size *Size, style int, validator Validator, name string) Button {
	var pValidator C.WxObjectPtr
	if validator != nil {
		pValidator = validator.ptr()
	}
	// It has a parent, do not hold it.
	return globalObjectTable.bindObject(C.wxButton_New(parent.ptr(), C.int(id), cString(&label), (*C.Point)(pos), (*C.Size)(size), C.long(style), pValidator, cString(&name)), false).(Button)
}
Beispiel #2
0
func NewButton2(parent Window, id int, label string, pos *Point, size *Size, style int, validator Validator, name string) Button {
	b := &button{}
	var pValidator C.WxObjectPtr
	if validator != nil {
		pValidator = validator.wxPtr()
	}
	// It has a parent, do not hold it.
	b.bindWxPtr(C.wxButton_New(parent.wxPtr(), C.int(id), cString(&label), (*C.Point)(pos), (*C.Size)(size), C.long(style), pValidator, cString(&name)), false)
	return b
}