2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qgraphicslayoutitem.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
2024-11-23 06:34:52 +00:00
|
|
|
"runtime/cgo"
|
2024-08-25 04:08:24 +00:00
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QGraphicsLayoutItem struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QGraphicsLayoutItem
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) cPointer() *C.QGraphicsLayoutItem {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QGraphicsLayoutItem) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQGraphicsLayoutItem constructs the type using only CGO pointers.
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQGraphicsLayoutItem(h *C.QGraphicsLayoutItem) *QGraphicsLayoutItem {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QGraphicsLayoutItem{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQGraphicsLayoutItem constructs the type using only unsafe pointers.
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQGraphicsLayoutItem(h unsafe.Pointer) *QGraphicsLayoutItem {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQGraphicsLayoutItem((*C.QGraphicsLayoutItem)(h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-23 06:34:52 +00:00
|
|
|
// NewQGraphicsLayoutItem constructs a new QGraphicsLayoutItem object.
|
|
|
|
func NewQGraphicsLayoutItem() *QGraphicsLayoutItem {
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new())
|
2024-11-23 06:34:52 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsLayoutItem2 constructs a new QGraphicsLayoutItem object.
|
|
|
|
func NewQGraphicsLayoutItem2(parent *QGraphicsLayoutItem) *QGraphicsLayoutItem {
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new2(parent.cPointer()))
|
2024-11-23 06:34:52 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGraphicsLayoutItem3 constructs a new QGraphicsLayoutItem object.
|
|
|
|
func NewQGraphicsLayoutItem3(parent *QGraphicsLayoutItem, isLayout bool) *QGraphicsLayoutItem {
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new3(parent.cPointer(), (C.bool)(isLayout)))
|
2024-11-23 06:34:52 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLayoutItem) SetSizePolicy(policy *QSizePolicy) {
|
|
|
|
C.QGraphicsLayoutItem_SetSizePolicy(this.h, policy.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLayoutItem) SetSizePolicy2(hPolicy QSizePolicy__Policy, vPolicy QSizePolicy__Policy) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsLayoutItem_SetSizePolicy2(this.h, (C.int)(hPolicy), (C.int)(vPolicy))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLayoutItem) SizePolicy() *QSizePolicy {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQSizePolicy(C.QGraphicsLayoutItem_SizePolicy(this.h))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMinimumSize(size *QSizeF) {
|
|
|
|
C.QGraphicsLayoutItem_SetMinimumSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMinimumSize2(w float64, h float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMinimumSize2(this.h, (C.double)(w), (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MinimumSize() *QSizeF {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQSizeF(C.QGraphicsLayoutItem_MinimumSize(this.h))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMinimumWidth(width float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMinimumWidth(this.h, (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MinimumWidth() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_MinimumWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMinimumHeight(height float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMinimumHeight(this.h, (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MinimumHeight() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_MinimumHeight(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetPreferredSize(size *QSizeF) {
|
|
|
|
C.QGraphicsLayoutItem_SetPreferredSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetPreferredSize2(w float64, h float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetPreferredSize2(this.h, (C.double)(w), (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) PreferredSize() *QSizeF {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQSizeF(C.QGraphicsLayoutItem_PreferredSize(this.h))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetPreferredWidth(width float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetPreferredWidth(this.h, (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) PreferredWidth() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_PreferredWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetPreferredHeight(height float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetPreferredHeight(this.h, (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) PreferredHeight() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_PreferredHeight(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMaximumSize(size *QSizeF) {
|
|
|
|
C.QGraphicsLayoutItem_SetMaximumSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMaximumSize2(w float64, h float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMaximumSize2(this.h, (C.double)(w), (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MaximumSize() *QSizeF {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQSizeF(C.QGraphicsLayoutItem_MaximumSize(this.h))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMaximumWidth(width float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMaximumWidth(this.h, (C.double)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MaximumWidth() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_MaximumWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetMaximumHeight(height float64) {
|
|
|
|
C.QGraphicsLayoutItem_SetMaximumHeight(this.h, (C.double)(height))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) MaximumHeight() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGraphicsLayoutItem_MaximumHeight(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetGeometry(rect *QRectF) {
|
|
|
|
C.QGraphicsLayoutItem_SetGeometry(this.h, rect.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) Geometry() *QRectF {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQRectF(C.QGraphicsLayoutItem_Geometry(this.h))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) {
|
|
|
|
C.QGraphicsLayoutItem_GetContentsMargins(this.h, (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom)))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) ContentsRect() *QRectF {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQRectF(C.QGraphicsLayoutItem_ContentsRect(this.h))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLayoutItem) EffectiveSizeHint(which SizeHint) *QSizeF {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQSizeF(C.QGraphicsLayoutItem_EffectiveSizeHint(this.h, (C.int)(which)))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLayoutItem) UpdateGeometry() {
|
|
|
|
C.QGraphicsLayoutItem_UpdateGeometry(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) ParentLayoutItem() *QGraphicsLayoutItem {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQGraphicsLayoutItem(C.QGraphicsLayoutItem_ParentLayoutItem(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) SetParentLayoutItem(parent *QGraphicsLayoutItem) {
|
|
|
|
C.QGraphicsLayoutItem_SetParentLayoutItem(this.h, parent.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) IsLayout() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGraphicsLayoutItem_IsLayout(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) GraphicsItem() *QGraphicsItem {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQGraphicsItem(C.QGraphicsLayoutItem_GraphicsItem(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) OwnedByLayout() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGraphicsLayoutItem_OwnedByLayout(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLayoutItem) SetSizePolicy3(hPolicy QSizePolicy__Policy, vPolicy QSizePolicy__Policy, controlType QSizePolicy__ControlType) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGraphicsLayoutItem_SetSizePolicy3(this.h, (C.int)(hPolicy), (C.int)(vPolicy), (C.int)(controlType))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGraphicsLayoutItem) EffectiveSizeHint2(which SizeHint, constraint *QSizeF) *QSizeF {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQSizeF(C.QGraphicsLayoutItem_EffectiveSizeHint2(this.h, (C.int)(which), constraint.cPointer()))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-23 06:34:52 +00:00
|
|
|
func (this *QGraphicsLayoutItem) callVirtualBase_SetGeometry(rect *QRectF) {
|
|
|
|
|
|
|
|
C.QGraphicsLayoutItem_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QGraphicsLayoutItem) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-23 06:34:52 +00:00
|
|
|
C.QGraphicsLayoutItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGraphicsLayoutItem_SetGeometry
|
|
|
|
func miqt_exec_callback_QGraphicsLayoutItem_SetGeometry(self *C.QGraphicsLayoutItem, cb C.intptr_t, rect *C.QRectF) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *QRectF), rect *QRectF))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQRectF(rect)
|
2024-11-23 06:34:52 +00:00
|
|
|
|
|
|
|
gofunc((&QGraphicsLayoutItem{h: self}).callVirtualBase_SetGeometry, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) {
|
|
|
|
|
|
|
|
C.QGraphicsLayoutItem_virtualbase_GetContentsMargins(unsafe.Pointer(this.h), (*C.double)(unsafe.Pointer(left)), (*C.double)(unsafe.Pointer(top)), (*C.double)(unsafe.Pointer(right)), (*C.double)(unsafe.Pointer(bottom)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QGraphicsLayoutItem) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-23 06:34:52 +00:00
|
|
|
C.QGraphicsLayoutItem_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGraphicsLayoutItem_GetContentsMargins
|
|
|
|
func miqt_exec_callback_QGraphicsLayoutItem_GetContentsMargins(self *C.QGraphicsLayoutItem, cb C.intptr_t, left *C.double, top *C.double, right *C.double, bottom *C.double) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (*float64)(unsafe.Pointer(left))
|
|
|
|
|
|
|
|
slotval2 := (*float64)(unsafe.Pointer(top))
|
|
|
|
|
|
|
|
slotval3 := (*float64)(unsafe.Pointer(right))
|
|
|
|
|
|
|
|
slotval4 := (*float64)(unsafe.Pointer(bottom))
|
|
|
|
|
|
|
|
gofunc((&QGraphicsLayoutItem{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGraphicsLayoutItem) callVirtualBase_UpdateGeometry() {
|
|
|
|
|
|
|
|
C.QGraphicsLayoutItem_virtualbase_UpdateGeometry(unsafe.Pointer(this.h))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QGraphicsLayoutItem) OnUpdateGeometry(slot func(super func())) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-23 06:34:52 +00:00
|
|
|
C.QGraphicsLayoutItem_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGraphicsLayoutItem_UpdateGeometry
|
|
|
|
func miqt_exec_callback_QGraphicsLayoutItem_UpdateGeometry(self *C.QGraphicsLayoutItem, cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func()))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
gofunc((&QGraphicsLayoutItem{h: self}).callVirtualBase_UpdateGeometry)
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QGraphicsLayoutItem) OnSizeHint(slot func(which SizeHint, constraint *QSizeF) *QSizeF) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-23 06:34:52 +00:00
|
|
|
C.QGraphicsLayoutItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGraphicsLayoutItem_SizeHint
|
|
|
|
func miqt_exec_callback_QGraphicsLayoutItem_SizeHint(self *C.QGraphicsLayoutItem, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(which SizeHint, constraint *QSizeF) *QSizeF)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (SizeHint)(which)
|
|
|
|
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval2 := newQSizeF(constraint)
|
2024-11-23 06:34:52 +00:00
|
|
|
|
|
|
|
virtualReturn := gofunc(slotval1, slotval2)
|
|
|
|
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGraphicsLayoutItem) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QGraphicsLayoutItem_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QGraphicsLayoutItem) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QGraphicsLayoutItem) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|