2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qlistview.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QListView__Movement int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QListView__Static QListView__Movement = 0
|
|
|
|
QListView__Free QListView__Movement = 1
|
|
|
|
QListView__Snap QListView__Movement = 2
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QListView__Flow int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QListView__LeftToRight QListView__Flow = 0
|
|
|
|
QListView__TopToBottom QListView__Flow = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QListView__ResizeMode int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QListView__Fixed QListView__ResizeMode = 0
|
|
|
|
QListView__Adjust QListView__ResizeMode = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QListView__LayoutMode int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QListView__SinglePass QListView__LayoutMode = 0
|
|
|
|
QListView__Batched QListView__LayoutMode = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QListView__ViewMode int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QListView__ListMode QListView__ViewMode = 0
|
|
|
|
QListView__IconMode QListView__ViewMode = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QListView struct {
|
|
|
|
h *C.QListView
|
|
|
|
*QAbstractItemView
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) cPointer() *C.QListView {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QListView) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQListView(h *C.QListView) *QListView {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QListView{h: h, QAbstractItemView: UnsafeNewQAbstractItemView(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQListView(h unsafe.Pointer) *QListView {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQListView((*C.QListView)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQListView constructs a new QListView object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQListView(parent *QWidget) *QListView {
|
|
|
|
ret := C.QListView_new(parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQListView(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQListView2 constructs a new QListView object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQListView2() *QListView {
|
|
|
|
ret := C.QListView_new2()
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQListView(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QListView_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QListView) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
return (unsafe.Pointer)(C.QListView_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QListView_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QListView_Tr(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QListView_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QListView_TrUtf8(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) SetMovement(movement QListView__Movement) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QListView_SetMovement(this.h, (C.int)(movement))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) Movement() QListView__Movement {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QListView__Movement)(C.QListView_Movement(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) SetFlow(flow QListView__Flow) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QListView_SetFlow(this.h, (C.int)(flow))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) Flow() QListView__Flow {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QListView__Flow)(C.QListView_Flow(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QListView) SetWrapping(enable bool) {
|
|
|
|
C.QListView_SetWrapping(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) IsWrapping() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QListView_IsWrapping(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) SetResizeMode(mode QListView__ResizeMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QListView_SetResizeMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) ResizeMode() QListView__ResizeMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QListView__ResizeMode)(C.QListView_ResizeMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) SetLayoutMode(mode QListView__LayoutMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QListView_SetLayoutMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) LayoutMode() QListView__LayoutMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QListView__LayoutMode)(C.QListView_LayoutMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QListView) SetSpacing(space int) {
|
|
|
|
C.QListView_SetSpacing(this.h, (C.int)(space))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) Spacing() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QListView_Spacing(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) SetBatchSize(batchSize int) {
|
|
|
|
C.QListView_SetBatchSize(this.h, (C.int)(batchSize))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) BatchSize() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QListView_BatchSize(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) SetGridSize(size *QSize) {
|
|
|
|
C.QListView_SetGridSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) GridSize() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QListView_GridSize(this.h)
|
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_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 *QListView) SetViewMode(mode QListView__ViewMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QListView_SetViewMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) ViewMode() QListView__ViewMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QListView__ViewMode)(C.QListView_ViewMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QListView) ClearPropertyFlags() {
|
|
|
|
C.QListView_ClearPropertyFlags(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) IsRowHidden(row int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QListView_IsRowHidden(this.h, (C.int)(row)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) SetRowHidden(row int, hide bool) {
|
|
|
|
C.QListView_SetRowHidden(this.h, (C.int)(row), (C.bool)(hide))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) SetModelColumn(column int) {
|
|
|
|
C.QListView_SetModelColumn(this.h, (C.int)(column))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) ModelColumn() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QListView_ModelColumn(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) SetUniformItemSizes(enable bool) {
|
|
|
|
C.QListView_SetUniformItemSizes(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) UniformItemSizes() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QListView_UniformItemSizes(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) SetWordWrap(on bool) {
|
|
|
|
C.QListView_SetWordWrap(this.h, (C.bool)(on))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) WordWrap() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QListView_WordWrap(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) SetSelectionRectVisible(show bool) {
|
|
|
|
C.QListView_SetSelectionRectVisible(this.h, (C.bool)(show))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) IsSelectionRectVisible() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QListView_IsSelectionRectVisible(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QListView) SetItemAlignment(alignment AlignmentFlag) {
|
2024-09-18 01:33:50 +00:00
|
|
|
C.QListView_SetItemAlignment(this.h, (C.int)(alignment))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QListView) ItemAlignment() AlignmentFlag {
|
|
|
|
return (AlignmentFlag)(C.QListView_ItemAlignment(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QListView) VisualRect(index *QModelIndex) *QRect {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QListView_VisualRect(this.h, index.cPointer())
|
|
|
|
_goptr := newQRect(_ret)
|
|
|
|
_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-08-29 07:01:51 +00:00
|
|
|
func (this *QListView) ScrollTo(index *QModelIndex) {
|
|
|
|
C.QListView_ScrollTo(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QListView) IndexAt(p *QPoint) *QModelIndex {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QListView_IndexAt(this.h, p.cPointer())
|
|
|
|
_goptr := newQModelIndex(_ret)
|
|
|
|
_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 *QListView) DoItemsLayout() {
|
|
|
|
C.QListView_DoItemsLayout(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) Reset() {
|
|
|
|
C.QListView_Reset(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) SetRootIndex(index *QModelIndex) {
|
|
|
|
C.QListView_SetRootIndex(this.h, index.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QListView) IndexesMoved(indexes []QModelIndex) {
|
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-01 05:51:28 +00:00
|
|
|
indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(indexes_CArray))
|
|
|
|
for i := range indexes {
|
|
|
|
indexes_CArray[i] = indexes[i].cPointer()
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
indexes_ma := &C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(indexes_ma))
|
|
|
|
C.QListView_IndexesMoved(this.h, indexes_ma)
|
|
|
|
}
|
|
|
|
func (this *QListView) OnIndexesMoved(slot func(indexes []QModelIndex)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QListView_connect_IndexesMoved(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QListView_IndexesMoved
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QListView_IndexesMoved(cb C.intptr_t, indexes *C.struct_miqt_array) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(indexes []QModelIndex))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
var indexes_ma *C.struct_miqt_array = indexes
|
|
|
|
indexes_ret := make([]QModelIndex, int(indexes_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(indexes_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
indexes_lv_ret := indexes_outCast[i]
|
|
|
|
indexes_lv_goptr := newQModelIndex(indexes_lv_ret)
|
|
|
|
indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
indexes_ret[i] = *indexes_lv_goptr
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
|
|
|
C.free(unsafe.Pointer(indexes_ma))
|
|
|
|
slotval1 := indexes_ret
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QListView_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QListView_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QListView_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QListView_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QListView_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QListView_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QListView_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QListView_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QListView) ScrollTo2(index *QModelIndex, hint QAbstractItemView__ScrollHint) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QListView_ScrollTo2(this.h, index.cPointer(), (C.int)(hint))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QListView) Delete() {
|
|
|
|
C.QListView_Delete(this.h)
|
|
|
|
}
|
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 *QListView) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QListView) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|