miqt/qt/gen_qproxystyle.go

354 lines
14 KiB
Go
Raw Normal View History

package qt
/*
#include "gen_qproxystyle.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QProxyStyle struct {
h *C.QProxyStyle
*QCommonStyle
}
func (this *QProxyStyle) cPointer() *C.QProxyStyle {
if this == nil {
return nil
}
return this.h
}
func newQProxyStyle(h *C.QProxyStyle) *QProxyStyle {
2024-09-01 02:23:55 +00:00
if h == nil {
return nil
}
return &QProxyStyle{h: h, QCommonStyle: newQCommonStyle_U(unsafe.Pointer(h))}
}
func newQProxyStyle_U(h unsafe.Pointer) *QProxyStyle {
return newQProxyStyle((*C.QProxyStyle)(h))
}
// NewQProxyStyle constructs a new QProxyStyle object.
func NewQProxyStyle() *QProxyStyle {
ret := C.QProxyStyle_new()
return newQProxyStyle(ret)
}
// NewQProxyStyle2 constructs a new QProxyStyle object.
func NewQProxyStyle2(key string) *QProxyStyle {
key_ms := miqt_strdupg(key)
defer C.free(key_ms)
ret := C.QProxyStyle_new2((*C.struct_miqt_string)(key_ms))
return newQProxyStyle(ret)
}
// NewQProxyStyle3 constructs a new QProxyStyle object.
func NewQProxyStyle3(style *QStyle) *QProxyStyle {
ret := C.QProxyStyle_new3(style.cPointer())
return newQProxyStyle(ret)
}
func (this *QProxyStyle) MetaObject() *QMetaObject {
_ret := C.QProxyStyle_MetaObject(this.h)
return newQMetaObject_U(unsafe.Pointer(_ret))
}
func QProxyStyle_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms *C.struct_miqt_string = C.QProxyStyle_Tr(s_Cstring)
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func QProxyStyle_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms *C.struct_miqt_string = C.QProxyStyle_TrUtf8(s_Cstring)
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func (this *QProxyStyle) BaseStyle() *QStyle {
_ret := C.QProxyStyle_BaseStyle(this.h)
return newQStyle_U(unsafe.Pointer(_ret))
}
func (this *QProxyStyle) SetBaseStyle(style *QStyle) {
C.QProxyStyle_SetBaseStyle(this.h, style.cPointer())
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) DrawPrimitive(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter) {
2024-08-29 07:01:51 +00:00
C.QProxyStyle_DrawPrimitive(this.h, (C.uintptr_t)(element), option.cPointer(), painter.cPointer())
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) DrawControl(element QStyle__ControlElement, option *QStyleOption, painter *QPainter) {
2024-08-29 07:01:51 +00:00
C.QProxyStyle_DrawControl(this.h, (C.uintptr_t)(element), option.cPointer(), painter.cPointer())
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) DrawComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter) {
2024-08-29 07:01:51 +00:00
C.QProxyStyle_DrawComplexControl(this.h, (C.uintptr_t)(control), option.cPointer(), painter.cPointer())
}
func (this *QProxyStyle) DrawItemText(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string) {
text_ms := miqt_strdupg(text)
defer C.free(text_ms)
C.QProxyStyle_DrawItemText(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), (*C.struct_miqt_string)(text_ms))
2024-08-29 07:01:51 +00:00
}
func (this *QProxyStyle) DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) {
C.QProxyStyle_DrawItemPixmap(this.h, painter.cPointer(), rect.cPointer(), (C.int)(alignment), pixmap.cPointer())
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) SizeFromContents(typeVal QStyle__ContentsType, option *QStyleOption, size *QSize, widget *QWidget) *QSize {
_ret := C.QProxyStyle_SizeFromContents(this.h, (C.uintptr_t)(typeVal), option.cPointer(), size.cPointer(), widget.cPointer())
_goptr := newQSize(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) SubElementRect(element QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect {
_ret := C.QProxyStyle_SubElementRect(this.h, (C.uintptr_t)(element), option.cPointer(), widget.cPointer())
_goptr := newQRect(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) SubControlRect(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect {
_ret := C.QProxyStyle_SubControlRect(this.h, (C.uintptr_t)(cc), opt.cPointer(), (C.uintptr_t)(sc), widget.cPointer())
_goptr := newQRect(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
func (this *QProxyStyle) ItemTextRect(fm *QFontMetrics, r *QRect, flags int, enabled bool, text string) *QRect {
text_ms := miqt_strdupg(text)
defer C.free(text_ms)
_ret := C.QProxyStyle_ItemTextRect(this.h, fm.cPointer(), r.cPointer(), (C.int)(flags), (C.bool)(enabled), (*C.struct_miqt_string)(text_ms))
_goptr := newQRect(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QProxyStyle) ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect {
_ret := C.QProxyStyle_ItemPixmapRect(this.h, r.cPointer(), (C.int)(flags), pixmap.cPointer())
_goptr := newQRect(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) HitTestComplexControl(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint) QStyle__SubControl {
_ret := C.QProxyStyle_HitTestComplexControl(this.h, (C.uintptr_t)(control), option.cPointer(), pos.cPointer())
return (QStyle__SubControl)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StyleHint(hint QStyle__StyleHint) int {
_ret := C.QProxyStyle_StyleHint(this.h, (C.uintptr_t)(hint))
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) PixelMetric(metric QStyle__PixelMetric) int {
_ret := C.QProxyStyle_PixelMetric(this.h, (C.uintptr_t)(metric))
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) LayoutSpacing(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation) int {
_ret := C.QProxyStyle_LayoutSpacing(this.h, (C.uintptr_t)(control1), (C.uintptr_t)(control2), (C.uintptr_t)(orientation))
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StandardIcon(standardIcon QStyle__StandardPixmap) *QIcon {
_ret := C.QProxyStyle_StandardIcon(this.h, (C.uintptr_t)(standardIcon))
_goptr := newQIcon(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption) *QPixmap {
_ret := C.QProxyStyle_StandardPixmap(this.h, (C.uintptr_t)(standardPixmap), opt.cPointer())
_goptr := newQPixmap(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap {
_ret := C.QProxyStyle_GeneratedIconPixmap(this.h, (C.uintptr_t)(iconMode), pixmap.cPointer(), opt.cPointer())
_goptr := newQPixmap(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
func (this *QProxyStyle) StandardPalette() *QPalette {
_ret := C.QProxyStyle_StandardPalette(this.h)
_goptr := newQPalette(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QProxyStyle) Polish(widget *QWidget) {
C.QProxyStyle_Polish(this.h, widget.cPointer())
}
func (this *QProxyStyle) PolishWithPal(pal *QPalette) {
C.QProxyStyle_PolishWithPal(this.h, pal.cPointer())
}
func (this *QProxyStyle) PolishWithApp(app *QApplication) {
C.QProxyStyle_PolishWithApp(this.h, app.cPointer())
}
func (this *QProxyStyle) Unpolish(widget *QWidget) {
C.QProxyStyle_Unpolish(this.h, widget.cPointer())
}
func (this *QProxyStyle) UnpolishWithApp(app *QApplication) {
C.QProxyStyle_UnpolishWithApp(this.h, app.cPointer())
}
func QProxyStyle_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.QProxyStyle_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func QProxyStyle_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.QProxyStyle_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 QProxyStyle_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.QProxyStyle_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func QProxyStyle_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.QProxyStyle_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-09-04 06:54:22 +00:00
func (this *QProxyStyle) DrawPrimitive4(element QStyle__PrimitiveElement, option *QStyleOption, painter *QPainter, widget *QWidget) {
2024-08-29 07:01:51 +00:00
C.QProxyStyle_DrawPrimitive4(this.h, (C.uintptr_t)(element), option.cPointer(), painter.cPointer(), widget.cPointer())
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) DrawControl4(element QStyle__ControlElement, option *QStyleOption, painter *QPainter, widget *QWidget) {
2024-08-29 07:01:51 +00:00
C.QProxyStyle_DrawControl4(this.h, (C.uintptr_t)(element), option.cPointer(), painter.cPointer(), widget.cPointer())
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) DrawComplexControl4(control QStyle__ComplexControl, option *QStyleOptionComplex, painter *QPainter, widget *QWidget) {
2024-08-29 07:01:51 +00:00
C.QProxyStyle_DrawComplexControl4(this.h, (C.uintptr_t)(control), option.cPointer(), painter.cPointer(), widget.cPointer())
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) DrawItemText7(painter *QPainter, rect *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) {
text_ms := miqt_strdupg(text)
defer C.free(text_ms)
C.QProxyStyle_DrawItemText7(this.h, painter.cPointer(), rect.cPointer(), (C.int)(flags), pal.cPointer(), (C.bool)(enabled), (*C.struct_miqt_string)(text_ms), (C.uintptr_t)(textRole))
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) HitTestComplexControl4(control QStyle__ComplexControl, option *QStyleOptionComplex, pos *QPoint, widget *QWidget) QStyle__SubControl {
_ret := C.QProxyStyle_HitTestComplexControl4(this.h, (C.uintptr_t)(control), option.cPointer(), pos.cPointer(), widget.cPointer())
return (QStyle__SubControl)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StyleHint2(hint QStyle__StyleHint, option *QStyleOption) int {
_ret := C.QProxyStyle_StyleHint2(this.h, (C.uintptr_t)(hint), option.cPointer())
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StyleHint3(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget) int {
_ret := C.QProxyStyle_StyleHint3(this.h, (C.uintptr_t)(hint), option.cPointer(), widget.cPointer())
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StyleHint4(hint QStyle__StyleHint, option *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int {
_ret := C.QProxyStyle_StyleHint4(this.h, (C.uintptr_t)(hint), option.cPointer(), widget.cPointer(), returnData.cPointer())
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) PixelMetric2(metric QStyle__PixelMetric, option *QStyleOption) int {
_ret := C.QProxyStyle_PixelMetric2(this.h, (C.uintptr_t)(metric), option.cPointer())
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) PixelMetric3(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int {
_ret := C.QProxyStyle_PixelMetric3(this.h, (C.uintptr_t)(metric), option.cPointer(), widget.cPointer())
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) LayoutSpacing4(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption) int {
_ret := C.QProxyStyle_LayoutSpacing4(this.h, (C.uintptr_t)(control1), (C.uintptr_t)(control2), (C.uintptr_t)(orientation), option.cPointer())
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) LayoutSpacing5(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int {
_ret := C.QProxyStyle_LayoutSpacing5(this.h, (C.uintptr_t)(control1), (C.uintptr_t)(control2), (C.uintptr_t)(orientation), option.cPointer(), widget.cPointer())
return (int)(_ret)
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StandardIcon2(standardIcon QStyle__StandardPixmap, option *QStyleOption) *QIcon {
_ret := C.QProxyStyle_StandardIcon2(this.h, (C.uintptr_t)(standardIcon), option.cPointer())
_goptr := newQIcon(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StandardIcon3(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon {
_ret := C.QProxyStyle_StandardIcon3(this.h, (C.uintptr_t)(standardIcon), option.cPointer(), widget.cPointer())
_goptr := newQIcon(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
2024-09-04 06:54:22 +00:00
func (this *QProxyStyle) StandardPixmap3(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap {
_ret := C.QProxyStyle_StandardPixmap3(this.h, (C.uintptr_t)(standardPixmap), opt.cPointer(), widget.cPointer())
_goptr := newQPixmap(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
2024-08-29 07:01:51 +00:00
}
// Delete this object from C++ memory.
func (this *QProxyStyle) Delete() {
C.QProxyStyle_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 *QProxyStyle) GoGC() {
runtime.SetFinalizer(this, func(this *QProxyStyle) {
this.Delete()
runtime.KeepAlive(this.h)
})
}