miqt/qt/gen_qgraphicslinearlayout.go

191 lines
5.8 KiB
Go

package qt
/*
#include "gen_qgraphicslinearlayout.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QGraphicsLinearLayout struct {
h *C.QGraphicsLinearLayout
*QGraphicsLayout
}
func (this *QGraphicsLinearLayout) cPointer() *C.QGraphicsLinearLayout {
if this == nil {
return nil
}
return this.h
}
func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout) *QGraphicsLinearLayout {
if h == nil {
return nil
}
return &QGraphicsLinearLayout{h: h, QGraphicsLayout: newQGraphicsLayout_U(unsafe.Pointer(h))}
}
func newQGraphicsLinearLayout_U(h unsafe.Pointer) *QGraphicsLinearLayout {
return newQGraphicsLinearLayout((*C.QGraphicsLinearLayout)(h))
}
// NewQGraphicsLinearLayout constructs a new QGraphicsLinearLayout object.
func NewQGraphicsLinearLayout() *QGraphicsLinearLayout {
ret := C.QGraphicsLinearLayout_new()
return newQGraphicsLinearLayout(ret)
}
// NewQGraphicsLinearLayout2 constructs a new QGraphicsLinearLayout object.
func NewQGraphicsLinearLayout2(orientation uintptr) *QGraphicsLinearLayout {
ret := C.QGraphicsLinearLayout_new2((C.uintptr_t)(orientation))
return newQGraphicsLinearLayout(ret)
}
// NewQGraphicsLinearLayout3 constructs a new QGraphicsLinearLayout object.
func NewQGraphicsLinearLayout3(parent *QGraphicsLayoutItem) *QGraphicsLinearLayout {
ret := C.QGraphicsLinearLayout_new3(parent.cPointer())
return newQGraphicsLinearLayout(ret)
}
// NewQGraphicsLinearLayout4 constructs a new QGraphicsLinearLayout object.
func NewQGraphicsLinearLayout4(orientation uintptr, parent *QGraphicsLayoutItem) *QGraphicsLinearLayout {
ret := C.QGraphicsLinearLayout_new4((C.uintptr_t)(orientation), parent.cPointer())
return newQGraphicsLinearLayout(ret)
}
func (this *QGraphicsLinearLayout) SetOrientation(orientation uintptr) {
C.QGraphicsLinearLayout_SetOrientation(this.h, (C.uintptr_t)(orientation))
}
func (this *QGraphicsLinearLayout) Orientation() uintptr {
ret := C.QGraphicsLinearLayout_Orientation(this.h)
return (uintptr)(ret)
}
func (this *QGraphicsLinearLayout) AddItem(item *QGraphicsLayoutItem) {
C.QGraphicsLinearLayout_AddItem(this.h, item.cPointer())
}
func (this *QGraphicsLinearLayout) AddStretch() {
C.QGraphicsLinearLayout_AddStretch(this.h)
}
func (this *QGraphicsLinearLayout) InsertItem(index int, item *QGraphicsLayoutItem) {
C.QGraphicsLinearLayout_InsertItem(this.h, (C.int)(index), item.cPointer())
}
func (this *QGraphicsLinearLayout) InsertStretch(index int) {
C.QGraphicsLinearLayout_InsertStretch(this.h, (C.int)(index))
}
func (this *QGraphicsLinearLayout) RemoveItem(item *QGraphicsLayoutItem) {
C.QGraphicsLinearLayout_RemoveItem(this.h, item.cPointer())
}
func (this *QGraphicsLinearLayout) RemoveAt(index int) {
C.QGraphicsLinearLayout_RemoveAt(this.h, (C.int)(index))
}
func (this *QGraphicsLinearLayout) SetSpacing(spacing float64) {
C.QGraphicsLinearLayout_SetSpacing(this.h, (C.double)(spacing))
}
func (this *QGraphicsLinearLayout) Spacing() float64 {
ret := C.QGraphicsLinearLayout_Spacing(this.h)
return (float64)(ret)
}
func (this *QGraphicsLinearLayout) SetItemSpacing(index int, spacing float64) {
C.QGraphicsLinearLayout_SetItemSpacing(this.h, (C.int)(index), (C.double)(spacing))
}
func (this *QGraphicsLinearLayout) ItemSpacing(index int) float64 {
ret := C.QGraphicsLinearLayout_ItemSpacing(this.h, (C.int)(index))
return (float64)(ret)
}
func (this *QGraphicsLinearLayout) SetStretchFactor(item *QGraphicsLayoutItem, stretch int) {
C.QGraphicsLinearLayout_SetStretchFactor(this.h, item.cPointer(), (C.int)(stretch))
}
func (this *QGraphicsLinearLayout) StretchFactor(item *QGraphicsLayoutItem) int {
ret := C.QGraphicsLinearLayout_StretchFactor(this.h, item.cPointer())
return (int)(ret)
}
func (this *QGraphicsLinearLayout) SetAlignment(item *QGraphicsLayoutItem, alignment int) {
C.QGraphicsLinearLayout_SetAlignment(this.h, item.cPointer(), (C.int)(alignment))
}
func (this *QGraphicsLinearLayout) Alignment(item *QGraphicsLayoutItem) int {
ret := C.QGraphicsLinearLayout_Alignment(this.h, item.cPointer())
return (int)(ret)
}
func (this *QGraphicsLinearLayout) SetGeometry(rect *QRectF) {
C.QGraphicsLinearLayout_SetGeometry(this.h, rect.cPointer())
}
func (this *QGraphicsLinearLayout) Count() int {
ret := C.QGraphicsLinearLayout_Count(this.h)
return (int)(ret)
}
func (this *QGraphicsLinearLayout) ItemAt(index int) *QGraphicsLayoutItem {
ret := C.QGraphicsLinearLayout_ItemAt(this.h, (C.int)(index))
return newQGraphicsLayoutItem_U(unsafe.Pointer(ret))
}
func (this *QGraphicsLinearLayout) Invalidate() {
C.QGraphicsLinearLayout_Invalidate(this.h)
}
func (this *QGraphicsLinearLayout) SizeHint(which uintptr) *QSizeF {
ret := C.QGraphicsLinearLayout_SizeHint(this.h, (C.uintptr_t)(which))
// Qt uses pass-by-value semantics for this type. Mimic with finalizer
ret1 := newQSizeF(ret)
runtime.SetFinalizer(ret1, func(ret2 *QSizeF) {
ret2.Delete()
runtime.KeepAlive(ret2.h)
})
return ret1
}
func (this *QGraphicsLinearLayout) Dump() {
C.QGraphicsLinearLayout_Dump(this.h)
}
func (this *QGraphicsLinearLayout) AddStretch1(stretch int) {
C.QGraphicsLinearLayout_AddStretch1(this.h, (C.int)(stretch))
}
func (this *QGraphicsLinearLayout) InsertStretch2(index int, stretch int) {
C.QGraphicsLinearLayout_InsertStretch2(this.h, (C.int)(index), (C.int)(stretch))
}
func (this *QGraphicsLinearLayout) SizeHint2(which uintptr, constraint *QSizeF) *QSizeF {
ret := C.QGraphicsLinearLayout_SizeHint2(this.h, (C.uintptr_t)(which), constraint.cPointer())
// Qt uses pass-by-value semantics for this type. Mimic with finalizer
ret1 := newQSizeF(ret)
runtime.SetFinalizer(ret1, func(ret2 *QSizeF) {
ret2.Delete()
runtime.KeepAlive(ret2.h)
})
return ret1
}
func (this *QGraphicsLinearLayout) Dump1(indent int) {
C.QGraphicsLinearLayout_Dump1(this.h, (C.int)(indent))
}
func (this *QGraphicsLinearLayout) Delete() {
C.QGraphicsLinearLayout_Delete(this.h)
}