miqt/qt/gen_qpagelayout.go

293 lines
8.9 KiB
Go
Raw Normal View History

package qt
/*
#include "gen_qpagelayout.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
2024-09-04 06:54:22 +00:00
type QPageLayout__Unit int
const (
QPageLayout__Unit__Millimeter QPageLayout__Unit = 0
QPageLayout__Unit__Point QPageLayout__Unit = 1
QPageLayout__Unit__Inch QPageLayout__Unit = 2
QPageLayout__Unit__Pica QPageLayout__Unit = 3
QPageLayout__Unit__Didot QPageLayout__Unit = 4
QPageLayout__Unit__Cicero QPageLayout__Unit = 5
)
type QPageLayout__Orientation int
const (
QPageLayout__Orientation__Portrait QPageLayout__Orientation = 0
QPageLayout__Orientation__Landscape QPageLayout__Orientation = 1
)
type QPageLayout__Mode int
const (
QPageLayout__Mode__StandardMode QPageLayout__Mode = 0
QPageLayout__Mode__FullPageMode QPageLayout__Mode = 1
)
type QPageLayout struct {
h *C.QPageLayout
}
func (this *QPageLayout) cPointer() *C.QPageLayout {
if this == nil {
return nil
}
return this.h
}
func newQPageLayout(h *C.QPageLayout) *QPageLayout {
2024-09-01 02:23:55 +00:00
if h == nil {
return nil
}
return &QPageLayout{h: h}
}
func newQPageLayout_U(h unsafe.Pointer) *QPageLayout {
return newQPageLayout((*C.QPageLayout)(h))
}
// NewQPageLayout constructs a new QPageLayout object.
func NewQPageLayout() *QPageLayout {
ret := C.QPageLayout_new()
return newQPageLayout(ret)
}
// NewQPageLayout2 constructs a new QPageLayout object.
2024-09-04 06:54:22 +00:00
func NewQPageLayout2(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF) *QPageLayout {
2024-08-29 07:01:51 +00:00
ret := C.QPageLayout_new2(pageSize.cPointer(), (C.uintptr_t)(orientation), margins.cPointer())
return newQPageLayout(ret)
}
// NewQPageLayout3 constructs a new QPageLayout object.
func NewQPageLayout3(other *QPageLayout) *QPageLayout {
ret := C.QPageLayout_new3(other.cPointer())
return newQPageLayout(ret)
}
// NewQPageLayout4 constructs a new QPageLayout object.
2024-09-04 06:54:22 +00:00
func NewQPageLayout4(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit) *QPageLayout {
2024-08-29 07:01:51 +00:00
ret := C.QPageLayout_new4(pageSize.cPointer(), (C.uintptr_t)(orientation), margins.cPointer(), (C.uintptr_t)(units))
return newQPageLayout(ret)
}
// NewQPageLayout5 constructs a new QPageLayout object.
2024-09-04 06:54:22 +00:00
func NewQPageLayout5(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit, minMargins *QMarginsF) *QPageLayout {
2024-08-29 07:01:51 +00:00
ret := C.QPageLayout_new5(pageSize.cPointer(), (C.uintptr_t)(orientation), margins.cPointer(), (C.uintptr_t)(units), minMargins.cPointer())
return newQPageLayout(ret)
}
func (this *QPageLayout) OperatorAssign(other *QPageLayout) {
C.QPageLayout_OperatorAssign(this.h, other.cPointer())
}
func (this *QPageLayout) Swap(other *QPageLayout) {
C.QPageLayout_Swap(this.h, other.cPointer())
}
func (this *QPageLayout) IsEquivalentTo(other *QPageLayout) bool {
_ret := C.QPageLayout_IsEquivalentTo(this.h, other.cPointer())
return (bool)(_ret)
}
func (this *QPageLayout) IsValid() bool {
_ret := C.QPageLayout_IsValid(this.h)
return (bool)(_ret)
}
2024-09-04 06:54:22 +00:00
func (this *QPageLayout) SetMode(mode QPageLayout__Mode) {
2024-08-29 07:01:51 +00:00
C.QPageLayout_SetMode(this.h, (C.uintptr_t)(mode))
}
2024-09-04 06:54:22 +00:00
func (this *QPageLayout) Mode() QPageLayout__Mode {
_ret := C.QPageLayout_Mode(this.h)
return (QPageLayout__Mode)(_ret)
2024-08-29 07:01:51 +00:00
}
func (this *QPageLayout) SetPageSize(pageSize *QPageSize) {
C.QPageLayout_SetPageSize(this.h, pageSize.cPointer())
}
func (this *QPageLayout) PageSize() *QPageSize {
_ret := C.QPageLayout_PageSize(this.h)
_goptr := newQPageSize(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
2024-09-04 06:54:22 +00:00
func (this *QPageLayout) SetOrientation(orientation QPageLayout__Orientation) {
2024-08-29 07:01:51 +00:00
C.QPageLayout_SetOrientation(this.h, (C.uintptr_t)(orientation))
}
2024-09-04 06:54:22 +00:00
func (this *QPageLayout) Orientation() QPageLayout__Orientation {
_ret := C.QPageLayout_Orientation(this.h)
return (QPageLayout__Orientation)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QPageLayout) SetUnits(units QPageLayout__Unit) {
2024-08-29 07:01:51 +00:00
C.QPageLayout_SetUnits(this.h, (C.uintptr_t)(units))
}
2024-09-04 06:54:22 +00:00
func (this *QPageLayout) Units() QPageLayout__Unit {
_ret := C.QPageLayout_Units(this.h)
return (QPageLayout__Unit)(_ret)
2024-08-29 07:01:51 +00:00
}
func (this *QPageLayout) SetMargins(margins *QMarginsF) bool {
_ret := C.QPageLayout_SetMargins(this.h, margins.cPointer())
return (bool)(_ret)
}
func (this *QPageLayout) SetLeftMargin(leftMargin float64) bool {
_ret := C.QPageLayout_SetLeftMargin(this.h, (C.double)(leftMargin))
return (bool)(_ret)
}
func (this *QPageLayout) SetRightMargin(rightMargin float64) bool {
_ret := C.QPageLayout_SetRightMargin(this.h, (C.double)(rightMargin))
return (bool)(_ret)
}
func (this *QPageLayout) SetTopMargin(topMargin float64) bool {
_ret := C.QPageLayout_SetTopMargin(this.h, (C.double)(topMargin))
return (bool)(_ret)
}
func (this *QPageLayout) SetBottomMargin(bottomMargin float64) bool {
_ret := C.QPageLayout_SetBottomMargin(this.h, (C.double)(bottomMargin))
return (bool)(_ret)
}
func (this *QPageLayout) Margins() *QMarginsF {
_ret := C.QPageLayout_Margins(this.h)
_goptr := newQMarginsF(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
2024-09-04 06:54:22 +00:00
func (this *QPageLayout) MarginsWithUnits(units QPageLayout__Unit) *QMarginsF {
_ret := C.QPageLayout_MarginsWithUnits(this.h, (C.uintptr_t)(units))
_goptr := newQMarginsF(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
func (this *QPageLayout) MarginsPoints() *QMargins {
_ret := C.QPageLayout_MarginsPoints(this.h)
_goptr := newQMargins(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) MarginsPixels(resolution int) *QMargins {
_ret := C.QPageLayout_MarginsPixels(this.h, (C.int)(resolution))
_goptr := newQMargins(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) SetMinimumMargins(minMargins *QMarginsF) {
C.QPageLayout_SetMinimumMargins(this.h, minMargins.cPointer())
}
func (this *QPageLayout) MinimumMargins() *QMarginsF {
_ret := C.QPageLayout_MinimumMargins(this.h)
_goptr := newQMarginsF(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) MaximumMargins() *QMarginsF {
_ret := C.QPageLayout_MaximumMargins(this.h)
_goptr := newQMarginsF(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) FullRect() *QRectF {
_ret := C.QPageLayout_FullRect(this.h)
_goptr := newQRectF(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
2024-09-04 06:54:22 +00:00
func (this *QPageLayout) FullRectWithUnits(units QPageLayout__Unit) *QRectF {
_ret := C.QPageLayout_FullRectWithUnits(this.h, (C.uintptr_t)(units))
_goptr := newQRectF(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
func (this *QPageLayout) FullRectPoints() *QRect {
_ret := C.QPageLayout_FullRectPoints(this.h)
_goptr := newQRect(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) FullRectPixels(resolution int) *QRect {
_ret := C.QPageLayout_FullRectPixels(this.h, (C.int)(resolution))
_goptr := newQRect(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) PaintRect() *QRectF {
_ret := C.QPageLayout_PaintRect(this.h)
_goptr := newQRectF(_ret)
_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-09-04 06:54:22 +00:00
func (this *QPageLayout) PaintRectWithUnits(units QPageLayout__Unit) *QRectF {
_ret := C.QPageLayout_PaintRectWithUnits(this.h, (C.uintptr_t)(units))
_goptr := newQRectF(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) PaintRectPoints() *QRect {
_ret := C.QPageLayout_PaintRectPoints(this.h)
_goptr := newQRect(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) PaintRectPixels(resolution int) *QRect {
_ret := C.QPageLayout_PaintRectPixels(this.h, (C.int)(resolution))
_goptr := newQRect(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPageLayout) SetPageSize2(pageSize *QPageSize, minMargins *QMarginsF) {
C.QPageLayout_SetPageSize2(this.h, pageSize.cPointer(), minMargins.cPointer())
}
// Delete this object from C++ memory.
func (this *QPageLayout) Delete() {
C.QPageLayout_Delete(this.h)
}
// 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 *QPageLayout) GoGC() {
runtime.SetFinalizer(this, func(this *QPageLayout) {
this.Delete()
runtime.KeepAlive(this.h)
})
}