package qt /* #include "gen_qabstractscrollarea.h" #include */ import "C" import ( "runtime" "unsafe" ) type QAbstractScrollArea__SizeAdjustPolicy int const ( QAbstractScrollArea__AdjustIgnored QAbstractScrollArea__SizeAdjustPolicy = 0 QAbstractScrollArea__AdjustToContentsOnFirstShow QAbstractScrollArea__SizeAdjustPolicy = 1 QAbstractScrollArea__AdjustToContents QAbstractScrollArea__SizeAdjustPolicy = 2 ) type QAbstractScrollArea struct { h *C.QAbstractScrollArea *QFrame } func (this *QAbstractScrollArea) cPointer() *C.QAbstractScrollArea { if this == nil { return nil } return this.h } func newQAbstractScrollArea(h *C.QAbstractScrollArea) *QAbstractScrollArea { if h == nil { return nil } return &QAbstractScrollArea{h: h, QFrame: newQFrame_U(unsafe.Pointer(h))} } func newQAbstractScrollArea_U(h unsafe.Pointer) *QAbstractScrollArea { return newQAbstractScrollArea((*C.QAbstractScrollArea)(h)) } // NewQAbstractScrollArea constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea() *QAbstractScrollArea { ret := C.QAbstractScrollArea_new() return newQAbstractScrollArea(ret) } // NewQAbstractScrollArea2 constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea2(parent *QWidget) *QAbstractScrollArea { ret := C.QAbstractScrollArea_new2(parent.cPointer()) return newQAbstractScrollArea(ret) } func (this *QAbstractScrollArea) MetaObject() *QMetaObject { return newQMetaObject_U(unsafe.Pointer(C.QAbstractScrollArea_MetaObject(this.h))) } func (this *QAbstractScrollArea) Metacast(param1 string) unsafe.Pointer { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) return C.QAbstractScrollArea_Metacast(this.h, param1_Cstring) } func QAbstractScrollArea_Tr(s string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) var _ms *C.struct_miqt_string = C.QAbstractScrollArea_Tr(s_Cstring) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QAbstractScrollArea_TrUtf8(s string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) var _ms *C.struct_miqt_string = C.QAbstractScrollArea_TrUtf8(s_Cstring) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func (this *QAbstractScrollArea) VerticalScrollBarPolicy() ScrollBarPolicy { return (ScrollBarPolicy)(C.QAbstractScrollArea_VerticalScrollBarPolicy(this.h)) } func (this *QAbstractScrollArea) SetVerticalScrollBarPolicy(verticalScrollBarPolicy ScrollBarPolicy) { C.QAbstractScrollArea_SetVerticalScrollBarPolicy(this.h, (C.int)(verticalScrollBarPolicy)) } func (this *QAbstractScrollArea) VerticalScrollBar() *QScrollBar { return newQScrollBar_U(unsafe.Pointer(C.QAbstractScrollArea_VerticalScrollBar(this.h))) } func (this *QAbstractScrollArea) SetVerticalScrollBar(scrollbar *QScrollBar) { C.QAbstractScrollArea_SetVerticalScrollBar(this.h, scrollbar.cPointer()) } func (this *QAbstractScrollArea) HorizontalScrollBarPolicy() ScrollBarPolicy { return (ScrollBarPolicy)(C.QAbstractScrollArea_HorizontalScrollBarPolicy(this.h)) } func (this *QAbstractScrollArea) SetHorizontalScrollBarPolicy(horizontalScrollBarPolicy ScrollBarPolicy) { C.QAbstractScrollArea_SetHorizontalScrollBarPolicy(this.h, (C.int)(horizontalScrollBarPolicy)) } func (this *QAbstractScrollArea) HorizontalScrollBar() *QScrollBar { return newQScrollBar_U(unsafe.Pointer(C.QAbstractScrollArea_HorizontalScrollBar(this.h))) } func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { C.QAbstractScrollArea_SetHorizontalScrollBar(this.h, scrollbar.cPointer()) } func (this *QAbstractScrollArea) CornerWidget() *QWidget { return newQWidget_U(unsafe.Pointer(C.QAbstractScrollArea_CornerWidget(this.h))) } func (this *QAbstractScrollArea) SetCornerWidget(widget *QWidget) { C.QAbstractScrollArea_SetCornerWidget(this.h, widget.cPointer()) } func (this *QAbstractScrollArea) AddScrollBarWidget(widget *QWidget, alignment AlignmentFlag) { C.QAbstractScrollArea_AddScrollBarWidget(this.h, widget.cPointer(), (C.int)(alignment)) } func (this *QAbstractScrollArea) ScrollBarWidgets(alignment AlignmentFlag) []*QWidget { var _ma *C.struct_miqt_array = C.QAbstractScrollArea_ScrollBarWidgets(this.h, (C.int)(alignment)) _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { _ret[i] = newQWidget_U(unsafe.Pointer(_outCast[i])) } C.free(unsafe.Pointer(_ma)) return _ret } func (this *QAbstractScrollArea) Viewport() *QWidget { return newQWidget_U(unsafe.Pointer(C.QAbstractScrollArea_Viewport(this.h))) } func (this *QAbstractScrollArea) SetViewport(widget *QWidget) { C.QAbstractScrollArea_SetViewport(this.h, widget.cPointer()) } func (this *QAbstractScrollArea) MaximumViewportSize() *QSize { _ret := C.QAbstractScrollArea_MaximumViewportSize(this.h) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QAbstractScrollArea) MinimumSizeHint() *QSize { _ret := C.QAbstractScrollArea_MinimumSizeHint(this.h) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QAbstractScrollArea) SizeHint() *QSize { _ret := C.QAbstractScrollArea_SizeHint(this.h) _goptr := newQSize(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QAbstractScrollArea) SetupViewport(viewport *QWidget) { C.QAbstractScrollArea_SetupViewport(this.h, viewport.cPointer()) } func (this *QAbstractScrollArea) SizeAdjustPolicy() QAbstractScrollArea__SizeAdjustPolicy { return (QAbstractScrollArea__SizeAdjustPolicy)(C.QAbstractScrollArea_SizeAdjustPolicy(this.h)) } func (this *QAbstractScrollArea) SetSizeAdjustPolicy(policy QAbstractScrollArea__SizeAdjustPolicy) { C.QAbstractScrollArea_SetSizeAdjustPolicy(this.h, (C.int)(policy)) } func QAbstractScrollArea_Tr2(s string, c string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms *C.struct_miqt_string = C.QAbstractScrollArea_Tr2(s_Cstring, c_Cstring) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QAbstractScrollArea_Tr3(s string, c string, n int) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms *C.struct_miqt_string = C.QAbstractScrollArea_Tr3(s_Cstring, c_Cstring, (C.int)(n)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QAbstractScrollArea_TrUtf82(s string, c string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms *C.struct_miqt_string = C.QAbstractScrollArea_TrUtf82(s_Cstring, c_Cstring) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QAbstractScrollArea_TrUtf83(s string, c string, n int) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms *C.struct_miqt_string = C.QAbstractScrollArea_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } // Delete this object from C++ memory. func (this *QAbstractScrollArea) Delete() { C.QAbstractScrollArea_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 *QAbstractScrollArea) GoGC() { runtime.SetFinalizer(this, func(this *QAbstractScrollArea) { this.Delete() runtime.KeepAlive(this.h) }) }