2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qframe.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QFrame__Shape int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QFrame__NoFrame QFrame__Shape = 0
|
|
|
|
QFrame__Box QFrame__Shape = 1
|
|
|
|
QFrame__Panel QFrame__Shape = 2
|
|
|
|
QFrame__WinPanel QFrame__Shape = 3
|
|
|
|
QFrame__HLine QFrame__Shape = 4
|
|
|
|
QFrame__VLine QFrame__Shape = 5
|
|
|
|
QFrame__StyledPanel QFrame__Shape = 6
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QFrame__Shadow int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QFrame__Plain QFrame__Shadow = 16
|
|
|
|
QFrame__Raised QFrame__Shadow = 32
|
|
|
|
QFrame__Sunken QFrame__Shadow = 48
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QFrame__StyleMask int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QFrame__Shadow_Mask QFrame__StyleMask = 240
|
|
|
|
QFrame__Shape_Mask QFrame__StyleMask = 15
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QFrame struct {
|
|
|
|
h *C.QFrame
|
|
|
|
*QWidget
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) cPointer() *C.QFrame {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQFrame(h *C.QFrame) *QFrame {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QFrame{h: h, QWidget: newQWidget_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQFrame_U(h unsafe.Pointer) *QFrame {
|
|
|
|
return newQFrame((*C.QFrame)(h))
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
// NewQFrame constructs a new QFrame object.
|
|
|
|
func NewQFrame() *QFrame {
|
|
|
|
ret := C.QFrame_new()
|
|
|
|
return newQFrame(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFrame2 constructs a new QFrame object.
|
|
|
|
func NewQFrame2(parent *QWidget) *QFrame {
|
|
|
|
ret := C.QFrame_new2(parent.cPointer())
|
|
|
|
return newQFrame(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQFrame3 constructs a new QFrame object.
|
2024-09-20 06:40:03 +00:00
|
|
|
func NewQFrame3(parent *QWidget, f WindowType) *QFrame {
|
2024-09-18 01:33:50 +00:00
|
|
|
ret := C.QFrame_new3(parent.cPointer(), (C.int)(f))
|
2024-08-29 07:01:51 +00:00
|
|
|
return newQFrame(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QFrame) MetaObject() *QMetaObject {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQMetaObject_U(unsafe.Pointer(C.QFrame_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QFrame) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
|
|
|
return C.QFrame_Metacast(this.h, param1_Cstring)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QFrame_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFrame_Tr(s_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QFrame_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFrame_TrUtf8(s_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) FrameStyle() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QFrame_FrameStyle(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) SetFrameStyle(frameStyle int) {
|
|
|
|
C.QFrame_SetFrameStyle(this.h, (C.int)(frameStyle))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) FrameWidth() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QFrame_FrameWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) SizeHint() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFrame_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
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QFrame) FrameShape() QFrame__Shape {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QFrame__Shape)(C.QFrame_FrameShape(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QFrame) SetFrameShape(frameShape QFrame__Shape) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QFrame_SetFrameShape(this.h, (C.int)(frameShape))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QFrame) FrameShadow() QFrame__Shadow {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QFrame__Shadow)(C.QFrame_FrameShadow(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QFrame) SetFrameShadow(frameShadow QFrame__Shadow) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QFrame_SetFrameShadow(this.h, (C.int)(frameShadow))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QFrame) LineWidth() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QFrame_LineWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) SetLineWidth(lineWidth int) {
|
|
|
|
C.QFrame_SetLineWidth(this.h, (C.int)(lineWidth))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) MidLineWidth() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QFrame_MidLineWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) SetMidLineWidth(midLineWidth int) {
|
|
|
|
C.QFrame_SetMidLineWidth(this.h, (C.int)(midLineWidth))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QFrame) FrameRect() *QRect {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QFrame_FrameRect(this.h)
|
|
|
|
_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 *QFrame) SetFrameRect(frameRect *QRect) {
|
|
|
|
C.QFrame_SetFrameRect(this.h, frameRect.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func QFrame_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-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFrame_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QFrame_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-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFrame_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
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QFrame_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-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFrame_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QFrame_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-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QFrame_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
|
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 *QFrame) Delete() {
|
|
|
|
C.QFrame_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 *QFrame) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QFrame) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|