2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qtabbar.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QTabBar__Shape int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QTabBar__RoundedNorth QTabBar__Shape = 0
|
|
|
|
QTabBar__RoundedSouth QTabBar__Shape = 1
|
|
|
|
QTabBar__RoundedWest QTabBar__Shape = 2
|
|
|
|
QTabBar__RoundedEast QTabBar__Shape = 3
|
|
|
|
QTabBar__TriangularNorth QTabBar__Shape = 4
|
|
|
|
QTabBar__TriangularSouth QTabBar__Shape = 5
|
|
|
|
QTabBar__TriangularWest QTabBar__Shape = 6
|
|
|
|
QTabBar__TriangularEast QTabBar__Shape = 7
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QTabBar__ButtonPosition int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QTabBar__LeftSide QTabBar__ButtonPosition = 0
|
|
|
|
QTabBar__RightSide QTabBar__ButtonPosition = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QTabBar__SelectionBehavior int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QTabBar__SelectLeftTab QTabBar__SelectionBehavior = 0
|
|
|
|
QTabBar__SelectRightTab QTabBar__SelectionBehavior = 1
|
|
|
|
QTabBar__SelectPreviousTab QTabBar__SelectionBehavior = 2
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QTabBar struct {
|
|
|
|
h *C.QTabBar
|
|
|
|
*QWidget
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) cPointer() *C.QTabBar {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QTabBar) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQTabBar(h *C.QTabBar) *QTabBar {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QTabBar{h: h, QWidget: UnsafeNewQWidget(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQTabBar(h unsafe.Pointer) *QTabBar {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQTabBar((*C.QTabBar)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTabBar constructs a new QTabBar object.
|
|
|
|
func NewQTabBar() *QTabBar {
|
|
|
|
ret := C.QTabBar_new()
|
|
|
|
return newQTabBar(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQTabBar2 constructs a new QTabBar object.
|
|
|
|
func NewQTabBar2(parent *QWidget) *QTabBar {
|
|
|
|
ret := C.QTabBar_new2(parent.cPointer())
|
|
|
|
return newQTabBar(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QTabBar_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QTabBar) 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.QTabBar_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QTabBar_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.QTabBar_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 QTabBar_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.QTabBar_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 *QTabBar) Shape() QTabBar__Shape {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QTabBar__Shape)(C.QTabBar_Shape(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTabBar) SetShape(shape QTabBar__Shape) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QTabBar_SetShape(this.h, (C.int)(shape))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTabBar) AddTab(text string) int {
|
2024-10-18 23:53:33 +00:00
|
|
|
text_ms := C.struct_miqt_string{}
|
|
|
|
text_ms.data = C.CString(text)
|
|
|
|
text_ms.len = C.size_t(len(text))
|
|
|
|
defer C.free(unsafe.Pointer(text_ms.data))
|
|
|
|
return (int)(C.QTabBar_AddTab(this.h, text_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) AddTab2(icon *QIcon, text string) int {
|
2024-10-18 23:53:33 +00:00
|
|
|
text_ms := C.struct_miqt_string{}
|
|
|
|
text_ms.data = C.CString(text)
|
|
|
|
text_ms.len = C.size_t(len(text))
|
|
|
|
defer C.free(unsafe.Pointer(text_ms.data))
|
|
|
|
return (int)(C.QTabBar_AddTab2(this.h, icon.cPointer(), text_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) InsertTab(index int, text string) int {
|
2024-10-18 23:53:33 +00:00
|
|
|
text_ms := C.struct_miqt_string{}
|
|
|
|
text_ms.data = C.CString(text)
|
|
|
|
text_ms.len = C.size_t(len(text))
|
|
|
|
defer C.free(unsafe.Pointer(text_ms.data))
|
|
|
|
return (int)(C.QTabBar_InsertTab(this.h, (C.int)(index), text_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) InsertTab2(index int, icon *QIcon, text string) int {
|
2024-10-18 23:53:33 +00:00
|
|
|
text_ms := C.struct_miqt_string{}
|
|
|
|
text_ms.data = C.CString(text)
|
|
|
|
text_ms.len = C.size_t(len(text))
|
|
|
|
defer C.free(unsafe.Pointer(text_ms.data))
|
|
|
|
return (int)(C.QTabBar_InsertTab2(this.h, (C.int)(index), icon.cPointer(), text_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) RemoveTab(index int) {
|
|
|
|
C.QTabBar_RemoveTab(this.h, (C.int)(index))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) MoveTab(from int, to int) {
|
|
|
|
C.QTabBar_MoveTab(this.h, (C.int)(from), (C.int)(to))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) IsTabEnabled(index int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_IsTabEnabled(this.h, (C.int)(index)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetTabEnabled(index int, enabled bool) {
|
|
|
|
C.QTabBar_SetTabEnabled(this.h, (C.int)(index), (C.bool)(enabled))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) IsTabVisible(index int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_IsTabVisible(this.h, (C.int)(index)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetTabVisible(index int, visible bool) {
|
|
|
|
C.QTabBar_SetTabVisible(this.h, (C.int)(index), (C.bool)(visible))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabText(index int) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTabBar_TabText(this.h, (C.int)(index))
|
|
|
|
_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 (this *QTabBar) SetTabText(index int, text string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
text_ms := C.struct_miqt_string{}
|
|
|
|
text_ms.data = C.CString(text)
|
|
|
|
text_ms.len = C.size_t(len(text))
|
|
|
|
defer C.free(unsafe.Pointer(text_ms.data))
|
|
|
|
C.QTabBar_SetTabText(this.h, (C.int)(index), text_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabTextColor(index int) *QColor {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTabBar_TabTextColor(this.h, (C.int)(index))
|
|
|
|
_goptr := newQColor(_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 *QTabBar) SetTabTextColor(index int, color *QColor) {
|
|
|
|
C.QTabBar_SetTabTextColor(this.h, (C.int)(index), color.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabIcon(index int) *QIcon {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTabBar_TabIcon(this.h, (C.int)(index))
|
|
|
|
_goptr := newQIcon(_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 *QTabBar) SetTabIcon(index int, icon *QIcon) {
|
|
|
|
C.QTabBar_SetTabIcon(this.h, (C.int)(index), icon.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTabBar) ElideMode() TextElideMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (TextElideMode)(C.QTabBar_ElideMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTabBar) SetElideMode(mode TextElideMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QTabBar_SetElideMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTabBar) SetTabToolTip(index int, tip string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
tip_ms := C.struct_miqt_string{}
|
|
|
|
tip_ms.data = C.CString(tip)
|
|
|
|
tip_ms.len = C.size_t(len(tip))
|
|
|
|
defer C.free(unsafe.Pointer(tip_ms.data))
|
|
|
|
C.QTabBar_SetTabToolTip(this.h, (C.int)(index), tip_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabToolTip(index int) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTabBar_TabToolTip(this.h, (C.int)(index))
|
|
|
|
_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 (this *QTabBar) SetTabWhatsThis(index int, text string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
text_ms := C.struct_miqt_string{}
|
|
|
|
text_ms.data = C.CString(text)
|
|
|
|
text_ms.len = C.size_t(len(text))
|
|
|
|
defer C.free(unsafe.Pointer(text_ms.data))
|
|
|
|
C.QTabBar_SetTabWhatsThis(this.h, (C.int)(index), text_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabWhatsThis(index int) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTabBar_TabWhatsThis(this.h, (C.int)(index))
|
|
|
|
_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 (this *QTabBar) SetTabData(index int, data *QVariant) {
|
|
|
|
C.QTabBar_SetTabData(this.h, (C.int)(index), data.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabData(index int) *QVariant {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTabBar_TabData(this.h, (C.int)(index))
|
|
|
|
_goptr := newQVariant(_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 *QTabBar) TabRect(index int) *QRect {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTabBar_TabRect(this.h, (C.int)(index))
|
|
|
|
_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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabAt(pos *QPoint) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTabBar_TabAt(this.h, pos.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) CurrentIndex() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTabBar_CurrentIndex(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) Count() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QTabBar_Count(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SizeHint() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTabBar_SizeHint(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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) MinimumSizeHint() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTabBar_MinimumSizeHint(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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetDrawBase(drawTheBase bool) {
|
|
|
|
C.QTabBar_SetDrawBase(this.h, (C.bool)(drawTheBase))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) DrawBase() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_DrawBase(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) IconSize() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QTabBar_IconSize(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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetIconSize(size *QSize) {
|
|
|
|
C.QTabBar_SetIconSize(this.h, size.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) UsesScrollButtons() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_UsesScrollButtons(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetUsesScrollButtons(useButtons bool) {
|
|
|
|
C.QTabBar_SetUsesScrollButtons(this.h, (C.bool)(useButtons))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabsClosable() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_TabsClosable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetTabsClosable(closable bool) {
|
|
|
|
C.QTabBar_SetTabsClosable(this.h, (C.bool)(closable))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTabBar) SetTabButton(index int, position QTabBar__ButtonPosition, widget *QWidget) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QTabBar_SetTabButton(this.h, (C.int)(index), (C.int)(position), widget.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTabBar) TabButton(index int, position QTabBar__ButtonPosition) *QWidget {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQWidget(unsafe.Pointer(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position))))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTabBar) SelectionBehaviorOnRemove() QTabBar__SelectionBehavior {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QTabBar__SelectionBehavior)(C.QTabBar_SelectionBehaviorOnRemove(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QTabBar) SetSelectionBehaviorOnRemove(behavior QTabBar__SelectionBehavior) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QTabBar_SetSelectionBehaviorOnRemove(this.h, (C.int)(behavior))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTabBar) Expanding() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_Expanding(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetExpanding(enabled bool) {
|
|
|
|
C.QTabBar_SetExpanding(this.h, (C.bool)(enabled))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) IsMovable() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_IsMovable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetMovable(movable bool) {
|
|
|
|
C.QTabBar_SetMovable(this.h, (C.bool)(movable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) DocumentMode() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_DocumentMode(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetDocumentMode(set bool) {
|
|
|
|
C.QTabBar_SetDocumentMode(this.h, (C.bool)(set))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) AutoHide() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_AutoHide(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetAutoHide(hide bool) {
|
|
|
|
C.QTabBar_SetAutoHide(this.h, (C.bool)(hide))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) ChangeCurrentOnDrag() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QTabBar_ChangeCurrentOnDrag(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetChangeCurrentOnDrag(change bool) {
|
|
|
|
C.QTabBar_SetChangeCurrentOnDrag(this.h, (C.bool)(change))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) AccessibleTabName(index int) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QTabBar_AccessibleTabName(this.h, (C.int)(index))
|
|
|
|
_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 (this *QTabBar) SetAccessibleTabName(index int, name string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
name_ms := C.struct_miqt_string{}
|
|
|
|
name_ms.data = C.CString(name)
|
|
|
|
name_ms.len = C.size_t(len(name))
|
|
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
|
|
|
C.QTabBar_SetAccessibleTabName(this.h, (C.int)(index), name_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) SetCurrentIndex(index int) {
|
|
|
|
C.QTabBar_SetCurrentIndex(this.h, (C.int)(index))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) CurrentChanged(index int) {
|
|
|
|
C.QTabBar_CurrentChanged(this.h, (C.int)(index))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QTabBar) OnCurrentChanged(slot func(index int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QTabBar_connect_CurrentChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QTabBar_CurrentChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QTabBar_CurrentChanged(cb C.intptr_t, index C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(index int))
|
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
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int)(index)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabCloseRequested(index int) {
|
|
|
|
C.QTabBar_TabCloseRequested(this.h, (C.int)(index))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QTabBar) OnTabCloseRequested(slot func(index int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QTabBar_connect_TabCloseRequested(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QTabBar_TabCloseRequested
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QTabBar_TabCloseRequested(cb C.intptr_t, index C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(index int))
|
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
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int)(index)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabMoved(from int, to int) {
|
|
|
|
C.QTabBar_TabMoved(this.h, (C.int)(from), (C.int)(to))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QTabBar) OnTabMoved(slot func(from int, to int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QTabBar_connect_TabMoved(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QTabBar_TabMoved
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QTabBar_TabMoved(cb C.intptr_t, from C.int, to C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(from int, to int))
|
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
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int)(from)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval2 := (int)(to)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1, slotval2)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabBarClicked(index int) {
|
|
|
|
C.QTabBar_TabBarClicked(this.h, (C.int)(index))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QTabBar) OnTabBarClicked(slot func(index int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QTabBar_connect_TabBarClicked(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QTabBar_TabBarClicked
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QTabBar_TabBarClicked(cb C.intptr_t, index C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(index int))
|
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
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int)(index)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QTabBar) TabBarDoubleClicked(index int) {
|
|
|
|
C.QTabBar_TabBarDoubleClicked(this.h, (C.int)(index))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QTabBar) OnTabBarDoubleClicked(slot func(index int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QTabBar_connect_TabBarDoubleClicked(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QTabBar_TabBarDoubleClicked
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QTabBar_TabBarDoubleClicked(cb C.intptr_t, index C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(index int))
|
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
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int)(index)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QTabBar_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.QTabBar_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 QTabBar_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.QTabBar_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 QTabBar_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.QTabBar_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 QTabBar_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.QTabBar_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-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QTabBar) Delete() {
|
|
|
|
C.QTabBar_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 *QTabBar) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QTabBar) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|