2024-10-20 05:21:03 +00:00
|
|
|
package qt6
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qmargins.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QMargins struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QMargins
|
|
|
|
isSubclass bool
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) cPointer() *C.QMargins {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQMargins constructs the type using only CGO pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func newQMargins(h *C.QMargins) *QMargins {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
|
2024-10-20 05:21:03 +00:00
|
|
|
return &QMargins{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQMargins constructs the type using only unsafe pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func UnsafeNewQMargins(h unsafe.Pointer) *QMargins {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQMargins((*C.QMargins)(h))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQMargins constructs a new QMargins object.
|
|
|
|
func NewQMargins() *QMargins {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQMargins(C.QMargins_new())
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQMargins2 constructs a new QMargins object.
|
|
|
|
func NewQMargins2(left int, top int, right int, bottom int) *QMargins {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQMargins(C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom)))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQMargins3 constructs a new QMargins object.
|
|
|
|
func NewQMargins3(param1 *QMargins) *QMargins {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQMargins(C.QMargins_new3(param1.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) IsNull() bool {
|
|
|
|
return (bool)(C.QMargins_IsNull(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) Left() int {
|
|
|
|
return (int)(C.QMargins_Left(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) Top() int {
|
|
|
|
return (int)(C.QMargins_Top(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) Right() int {
|
|
|
|
return (int)(C.QMargins_Right(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) Bottom() int {
|
|
|
|
return (int)(C.QMargins_Bottom(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) SetLeft(left int) {
|
|
|
|
C.QMargins_SetLeft(this.h, (C.int)(left))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) SetTop(top int) {
|
|
|
|
C.QMargins_SetTop(this.h, (C.int)(top))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) SetRight(right int) {
|
|
|
|
C.QMargins_SetRight(this.h, (C.int)(right))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) SetBottom(bottom int) {
|
|
|
|
C.QMargins_SetBottom(this.h, (C.int)(bottom))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) OperatorPlusAssign(margins *QMargins) *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMargins(C.QMargins_OperatorPlusAssign(this.h, margins.cPointer()))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) OperatorMinusAssign(margins *QMargins) *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMargins(C.QMargins_OperatorMinusAssign(this.h, margins.cPointer()))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) OperatorPlusAssignWithInt(param1 int) *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMargins(C.QMargins_OperatorPlusAssignWithInt(this.h, (C.int)(param1)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) OperatorMinusAssignWithInt(param1 int) *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMargins(C.QMargins_OperatorMinusAssignWithInt(this.h, (C.int)(param1)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) OperatorMultiplyAssign(param1 int) *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMargins(C.QMargins_OperatorMultiplyAssign(this.h, (C.int)(param1)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) OperatorDivideAssign(param1 int) *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMargins(C.QMargins_OperatorDivideAssign(this.h, (C.int)(param1)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) OperatorMultiplyAssignWithQreal(param1 float64) *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMargins(C.QMargins_OperatorMultiplyAssignWithQreal(this.h, (C.double)(param1)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) OperatorDivideAssignWithQreal(param1 float64) *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMargins(C.QMargins_OperatorDivideAssignWithQreal(this.h, (C.double)(param1)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMargins) ToMarginsF() *QMarginsF {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQMarginsF(C.QMargins_ToMarginsF(this.h))
|
2024-10-20 05:21:03 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QMargins) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMargins_Delete(this.h, C.bool(this.isSubclass))
|
2024-10-20 05:21:03 +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 *QMargins) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QMargins) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
type QMarginsF struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QMarginsF
|
|
|
|
isSubclass bool
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) cPointer() *C.QMarginsF {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQMarginsF constructs the type using only CGO pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func newQMarginsF(h *C.QMarginsF) *QMarginsF {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
|
2024-10-20 05:21:03 +00:00
|
|
|
return &QMarginsF{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQMarginsF constructs the type using only unsafe pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func UnsafeNewQMarginsF(h unsafe.Pointer) *QMarginsF {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQMarginsF((*C.QMarginsF)(h))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQMarginsF constructs a new QMarginsF object.
|
|
|
|
func NewQMarginsF() *QMarginsF {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQMarginsF(C.QMarginsF_new())
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQMarginsF2 constructs a new QMarginsF object.
|
|
|
|
func NewQMarginsF2(left float64, top float64, right float64, bottom float64) *QMarginsF {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQMarginsF(C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom)))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQMarginsF3 constructs a new QMarginsF object.
|
|
|
|
func NewQMarginsF3(margins *QMargins) *QMarginsF {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQMarginsF(C.QMarginsF_new3(margins.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQMarginsF4 constructs a new QMarginsF object.
|
|
|
|
func NewQMarginsF4(param1 *QMarginsF) *QMarginsF {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQMarginsF(C.QMarginsF_new4(param1.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) IsNull() bool {
|
|
|
|
return (bool)(C.QMarginsF_IsNull(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) Left() float64 {
|
|
|
|
return (float64)(C.QMarginsF_Left(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) Top() float64 {
|
|
|
|
return (float64)(C.QMarginsF_Top(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) Right() float64 {
|
|
|
|
return (float64)(C.QMarginsF_Right(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) Bottom() float64 {
|
|
|
|
return (float64)(C.QMarginsF_Bottom(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) SetLeft(aleft float64) {
|
|
|
|
C.QMarginsF_SetLeft(this.h, (C.double)(aleft))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) SetTop(atop float64) {
|
|
|
|
C.QMarginsF_SetTop(this.h, (C.double)(atop))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) SetRight(aright float64) {
|
|
|
|
C.QMarginsF_SetRight(this.h, (C.double)(aright))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) SetBottom(abottom float64) {
|
|
|
|
C.QMarginsF_SetBottom(this.h, (C.double)(abottom))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) OperatorPlusAssign(margins *QMarginsF) *QMarginsF {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMarginsF(C.QMarginsF_OperatorPlusAssign(this.h, margins.cPointer()))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) OperatorMinusAssign(margins *QMarginsF) *QMarginsF {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMarginsF(C.QMarginsF_OperatorMinusAssign(this.h, margins.cPointer()))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) OperatorPlusAssignWithAddend(addend float64) *QMarginsF {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMarginsF(C.QMarginsF_OperatorPlusAssignWithAddend(this.h, (C.double)(addend)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) OperatorMinusAssignWithSubtrahend(subtrahend float64) *QMarginsF {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMarginsF(C.QMarginsF_OperatorMinusAssignWithSubtrahend(this.h, (C.double)(subtrahend)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) OperatorMultiplyAssign(factor float64) *QMarginsF {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMarginsF(C.QMarginsF_OperatorMultiplyAssign(this.h, (C.double)(factor)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) OperatorDivideAssign(divisor float64) *QMarginsF {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMarginsF(C.QMarginsF_OperatorDivideAssign(this.h, (C.double)(divisor)))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMarginsF) ToMargins() *QMargins {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQMargins(C.QMarginsF_ToMargins(this.h))
|
2024-10-20 05:21:03 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QMarginsF) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMarginsF_Delete(this.h, C.bool(this.isSubclass))
|
2024-10-20 05:21:03 +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 *QMarginsF) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QMarginsF) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|