cutego/gui/qglyphrun.go

170 lines
3.8 KiB
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package gui
//#include "qglyphrun.h"
import "C"
import (
"github.com/therecipe/qt"
"github.com/therecipe/qt/core"
"unsafe"
)
type QGlyphRun struct {
ptr unsafe.Pointer
}
2015-11-09 20:23:42 +03:00
type QGlyphRun_ITF interface {
QGlyphRun_PTR() *QGlyphRun
2015-10-24 18:18:24 +03:00
}
func (p *QGlyphRun) Pointer() unsafe.Pointer {
return p.ptr
}
func (p *QGlyphRun) SetPointer(ptr unsafe.Pointer) {
p.ptr = ptr
}
2015-11-09 20:23:42 +03:00
func PointerFromQGlyphRun(ptr QGlyphRun_ITF) unsafe.Pointer {
2015-10-24 18:18:24 +03:00
if ptr != nil {
2015-11-09 20:23:42 +03:00
return ptr.QGlyphRun_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func NewQGlyphRunFromPointer(ptr unsafe.Pointer) *QGlyphRun {
2015-10-24 18:18:24 +03:00
var n = new(QGlyphRun)
n.SetPointer(ptr)
return n
}
2015-11-09 20:23:42 +03:00
func (ptr *QGlyphRun) QGlyphRun_PTR() *QGlyphRun {
2015-10-24 18:18:24 +03:00
return ptr
}
//QGlyphRun::GlyphRunFlag
2015-11-09 20:23:42 +03:00
type QGlyphRun__GlyphRunFlag int64
2015-10-24 18:18:24 +03:00
2015-11-09 20:23:42 +03:00
const (
2015-10-24 18:18:24 +03:00
QGlyphRun__Overline = QGlyphRun__GlyphRunFlag(0x01)
QGlyphRun__Underline = QGlyphRun__GlyphRunFlag(0x02)
QGlyphRun__StrikeOut = QGlyphRun__GlyphRunFlag(0x04)
QGlyphRun__RightToLeft = QGlyphRun__GlyphRunFlag(0x08)
QGlyphRun__SplitLigature = QGlyphRun__GlyphRunFlag(0x10)
)
func NewQGlyphRun() *QGlyphRun {
2015-11-09 20:23:42 +03:00
return NewQGlyphRunFromPointer(C.QGlyphRun_NewQGlyphRun())
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func NewQGlyphRun2(other QGlyphRun_ITF) *QGlyphRun {
return NewQGlyphRunFromPointer(C.QGlyphRun_NewQGlyphRun2(PointerFromQGlyphRun(other)))
2015-10-24 18:18:24 +03:00
}
func (ptr *QGlyphRun) Clear() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_Clear(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) Flags() QGlyphRun__GlyphRunFlag {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return QGlyphRun__GlyphRunFlag(C.QGlyphRun_Flags(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QGlyphRun) IsEmpty() bool {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.QGlyphRun_IsEmpty(ptr.Pointer()) != 0
2015-10-24 18:18:24 +03:00
}
return false
}
func (ptr *QGlyphRun) IsRightToLeft() bool {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.QGlyphRun_IsRightToLeft(ptr.Pointer()) != 0
2015-10-24 18:18:24 +03:00
}
return false
}
func (ptr *QGlyphRun) Overline() bool {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.QGlyphRun_Overline(ptr.Pointer()) != 0
2015-10-24 18:18:24 +03:00
}
return false
}
2015-11-09 20:23:42 +03:00
func (ptr *QGlyphRun) SetBoundingRect(boundingRect core.QRectF_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_SetBoundingRect(ptr.Pointer(), core.PointerFromQRectF(boundingRect))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) SetFlag(flag QGlyphRun__GlyphRunFlag, enabled bool) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_SetFlag(ptr.Pointer(), C.int(flag), C.int(qt.GoBoolToInt(enabled)))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) SetFlags(flags QGlyphRun__GlyphRunFlag) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_SetFlags(ptr.Pointer(), C.int(flags))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) SetOverline(overline bool) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_SetOverline(ptr.Pointer(), C.int(qt.GoBoolToInt(overline)))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QGlyphRun) SetRawFont(rawFont QRawFont_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_SetRawFont(ptr.Pointer(), PointerFromQRawFont(rawFont))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) SetRightToLeft(rightToLeft bool) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_SetRightToLeft(ptr.Pointer(), C.int(qt.GoBoolToInt(rightToLeft)))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) SetStrikeOut(strikeOut bool) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_SetStrikeOut(ptr.Pointer(), C.int(qt.GoBoolToInt(strikeOut)))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) SetUnderline(underline bool) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_SetUnderline(ptr.Pointer(), C.int(qt.GoBoolToInt(underline)))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) StrikeOut() bool {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.QGlyphRun_StrikeOut(ptr.Pointer()) != 0
2015-10-24 18:18:24 +03:00
}
return false
}
2015-11-09 20:23:42 +03:00
func (ptr *QGlyphRun) Swap(other QGlyphRun_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_Swap(ptr.Pointer(), PointerFromQGlyphRun(other))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QGlyphRun) Underline() bool {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.QGlyphRun_Underline(ptr.Pointer()) != 0
2015-10-24 18:18:24 +03:00
}
return false
}
func (ptr *QGlyphRun) DestroyQGlyphRun() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QGlyphRun_DestroyQGlyphRun(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}