2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qplaintextedit.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QPlainTextEdit__LineWrapMode int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QPlainTextEdit__NoWrap QPlainTextEdit__LineWrapMode = 0
|
|
|
|
QPlainTextEdit__WidgetWidth QPlainTextEdit__LineWrapMode = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QPlainTextEdit struct {
|
|
|
|
h *C.QPlainTextEdit
|
|
|
|
*QAbstractScrollArea
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) cPointer() *C.QPlainTextEdit {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QPlainTextEdit) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQPlainTextEdit(h *C.QPlainTextEdit) *QPlainTextEdit {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QPlainTextEdit{h: h, QAbstractScrollArea: UnsafeNewQAbstractScrollArea(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQPlainTextEdit(h unsafe.Pointer) *QPlainTextEdit {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQPlainTextEdit((*C.QPlainTextEdit)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPlainTextEdit constructs a new QPlainTextEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQPlainTextEdit(parent *QWidget) *QPlainTextEdit {
|
|
|
|
ret := C.QPlainTextEdit_new(parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQPlainTextEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPlainTextEdit2 constructs a new QPlainTextEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQPlainTextEdit2() *QPlainTextEdit {
|
|
|
|
ret := C.QPlainTextEdit_new2()
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQPlainTextEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPlainTextEdit3 constructs a new QPlainTextEdit object.
|
2024-10-26 00:46:42 +00:00
|
|
|
func NewQPlainTextEdit3(text string) *QPlainTextEdit {
|
|
|
|
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))
|
|
|
|
ret := C.QPlainTextEdit_new3(text_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQPlainTextEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPlainTextEdit4 constructs a new QPlainTextEdit object.
|
|
|
|
func NewQPlainTextEdit4(text string, parent *QWidget) *QPlainTextEdit {
|
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))
|
|
|
|
ret := C.QPlainTextEdit_new4(text_ms, parent.cPointer())
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQPlainTextEdit(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QPlainTextEdit_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QPlainTextEdit) 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.QPlainTextEdit_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QPlainTextEdit_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.QPlainTextEdit_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 QPlainTextEdit_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.QPlainTextEdit_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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetDocument(document *QTextDocument) {
|
|
|
|
C.QPlainTextEdit_SetDocument(this.h, document.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Document() *QTextDocument {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQTextDocument(unsafe.Pointer(C.QPlainTextEdit_Document(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetPlaceholderText(placeholderText string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
placeholderText_ms := C.struct_miqt_string{}
|
|
|
|
placeholderText_ms.data = C.CString(placeholderText)
|
|
|
|
placeholderText_ms.len = C.size_t(len(placeholderText))
|
|
|
|
defer C.free(unsafe.Pointer(placeholderText_ms.data))
|
|
|
|
C.QPlainTextEdit_SetPlaceholderText(this.h, placeholderText_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) PlaceholderText() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QPlainTextEdit_PlaceholderText(this.h)
|
|
|
|
_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 *QPlainTextEdit) SetTextCursor(cursor *QTextCursor) {
|
|
|
|
C.QPlainTextEdit_SetTextCursor(this.h, cursor.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) TextCursor() *QTextCursor {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextEdit_TextCursor(this.h)
|
|
|
|
_goptr := newQTextCursor(_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 *QPlainTextEdit) IsReadOnly() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_IsReadOnly(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetReadOnly(ro bool) {
|
|
|
|
C.QPlainTextEdit_SetReadOnly(this.h, (C.bool)(ro))
|
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QPlainTextEdit) SetTextInteractionFlags(flags TextInteractionFlag) {
|
2024-09-18 01:33:50 +00:00
|
|
|
C.QPlainTextEdit_SetTextInteractionFlags(this.h, (C.int)(flags))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QPlainTextEdit) TextInteractionFlags() TextInteractionFlag {
|
|
|
|
return (TextInteractionFlag)(C.QPlainTextEdit_TextInteractionFlags(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPlainTextEdit) MergeCurrentCharFormat(modifier *QTextCharFormat) {
|
|
|
|
C.QPlainTextEdit_MergeCurrentCharFormat(this.h, modifier.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetCurrentCharFormat(format *QTextCharFormat) {
|
|
|
|
C.QPlainTextEdit_SetCurrentCharFormat(this.h, format.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CurrentCharFormat() *QTextCharFormat {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextEdit_CurrentCharFormat(this.h)
|
|
|
|
_goptr := newQTextCharFormat(_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 *QPlainTextEdit) TabChangesFocus() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_TabChangesFocus(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetTabChangesFocus(b bool) {
|
|
|
|
C.QPlainTextEdit_SetTabChangesFocus(this.h, (C.bool)(b))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetDocumentTitle(title string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
title_ms := C.struct_miqt_string{}
|
|
|
|
title_ms.data = C.CString(title)
|
|
|
|
title_ms.len = C.size_t(len(title))
|
|
|
|
defer C.free(unsafe.Pointer(title_ms.data))
|
|
|
|
C.QPlainTextEdit_SetDocumentTitle(this.h, title_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) DocumentTitle() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QPlainTextEdit_DocumentTitle(this.h)
|
|
|
|
_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 *QPlainTextEdit) IsUndoRedoEnabled() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_IsUndoRedoEnabled(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetUndoRedoEnabled(enable bool) {
|
|
|
|
C.QPlainTextEdit_SetUndoRedoEnabled(this.h, (C.bool)(enable))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetMaximumBlockCount(maximum int) {
|
|
|
|
C.QPlainTextEdit_SetMaximumBlockCount(this.h, (C.int)(maximum))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) MaximumBlockCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QPlainTextEdit_MaximumBlockCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPlainTextEdit) LineWrapMode() QPlainTextEdit__LineWrapMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QPlainTextEdit__LineWrapMode)(C.QPlainTextEdit_LineWrapMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPlainTextEdit) SetLineWrapMode(mode QPlainTextEdit__LineWrapMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPlainTextEdit_SetLineWrapMode(this.h, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPlainTextEdit) WordWrapMode() QTextOption__WrapMode {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QTextOption__WrapMode)(C.QPlainTextEdit_WordWrapMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPlainTextEdit) SetWordWrapMode(policy QTextOption__WrapMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPlainTextEdit_SetWordWrapMode(this.h, (C.int)(policy))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPlainTextEdit) SetBackgroundVisible(visible bool) {
|
|
|
|
C.QPlainTextEdit_SetBackgroundVisible(this.h, (C.bool)(visible))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) BackgroundVisible() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_BackgroundVisible(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetCenterOnScroll(enabled bool) {
|
|
|
|
C.QPlainTextEdit_SetCenterOnScroll(this.h, (C.bool)(enabled))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CenterOnScroll() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_CenterOnScroll(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QPlainTextEdit) Find(exp string) bool {
|
2024-10-18 23:53:33 +00:00
|
|
|
exp_ms := C.struct_miqt_string{}
|
|
|
|
exp_ms.data = C.CString(exp)
|
|
|
|
exp_ms.len = C.size_t(len(exp))
|
|
|
|
defer C.free(unsafe.Pointer(exp_ms.data))
|
|
|
|
return (bool)(C.QPlainTextEdit_Find(this.h, exp_ms))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) FindWithExp(exp *QRegExp) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_FindWithExp(this.h, exp.cPointer()))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Find2(exp *QRegularExpression) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_Find2(this.h, exp.cPointer()))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPlainTextEdit) ToPlainText() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QPlainTextEdit_ToPlainText(this.h)
|
|
|
|
_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 *QPlainTextEdit) EnsureCursorVisible() {
|
|
|
|
C.QPlainTextEdit_EnsureCursorVisible(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextEdit_LoadResource(this.h, (C.int)(typeVal), name.cPointer())
|
|
|
|
_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 *QPlainTextEdit) CreateStandardContextMenu() *QMenu {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenu(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMenu(unsafe.Pointer(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CursorForPosition(pos *QPoint) *QTextCursor {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextEdit_CursorForPosition(this.h, pos.cPointer())
|
|
|
|
_goptr := newQTextCursor(_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 *QPlainTextEdit) CursorRect(cursor *QTextCursor) *QRect {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextEdit_CursorRect(this.h, cursor.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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CursorRect2() *QRect {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextEdit_CursorRect2(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 *QPlainTextEdit) AnchorAt(pos *QPoint) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QPlainTextEdit_AnchorAt(this.h, pos.cPointer())
|
|
|
|
_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 *QPlainTextEdit) OverwriteMode() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_OverwriteMode(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetOverwriteMode(overwrite bool) {
|
|
|
|
C.QPlainTextEdit_SetOverwriteMode(this.h, (C.bool)(overwrite))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) TabStopWidth() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QPlainTextEdit_TabStopWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetTabStopWidth(width int) {
|
|
|
|
C.QPlainTextEdit_SetTabStopWidth(this.h, (C.int)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) TabStopDistance() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QPlainTextEdit_TabStopDistance(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetTabStopDistance(distance float64) {
|
|
|
|
C.QPlainTextEdit_SetTabStopDistance(this.h, (C.double)(distance))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CursorWidth() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QPlainTextEdit_CursorWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SetCursorWidth(width int) {
|
|
|
|
C.QPlainTextEdit_SetCursorWidth(this.h, (C.int)(width))
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QPlainTextEdit) SetExtraSelections(selections []QTextEdit__ExtraSelection) {
|
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-01 05:51:28 +00:00
|
|
|
selections_CArray := (*[0xffff]*C.QTextEdit__ExtraSelection)(C.malloc(C.size_t(8 * len(selections))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(selections_CArray))
|
|
|
|
for i := range selections {
|
|
|
|
selections_CArray[i] = selections[i].cPointer()
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
selections_ma := &C.struct_miqt_array{len: C.size_t(len(selections)), data: unsafe.Pointer(selections_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(selections_ma))
|
|
|
|
C.QPlainTextEdit_SetExtraSelections(this.h, selections_ma)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) ExtraSelections() []QTextEdit__ExtraSelection {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QPlainTextEdit_ExtraSelections(this.h)
|
|
|
|
_ret := make([]QTextEdit__ExtraSelection, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QTextEdit__ExtraSelection)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQTextEdit__ExtraSelection(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPlainTextEdit) MoveCursor(operation QTextCursor__MoveOperation) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPlainTextEdit_MoveCursor(this.h, (C.int)(operation))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPlainTextEdit) CanPaste() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_CanPaste(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Print(printer *QPagedPaintDevice) {
|
|
|
|
C.QPlainTextEdit_Print(this.h, printer.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) BlockCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QPlainTextEdit_BlockCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPlainTextEdit) InputMethodQuery(property InputMethodQuery) *QVariant {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QPlainTextEdit_InputMethodQuery(this.h, (C.int)(property))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQVariant(_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 *QPlainTextEdit) InputMethodQuery2(query InputMethodQuery, argument QVariant) *QVariant {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QPlainTextEdit_InputMethodQuery2(this.h, (C.int)(query), argument.cPointer())
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQVariant(_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-08-25 04:08:24 +00:00
|
|
|
func (this *QPlainTextEdit) SetPlainText(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.QPlainTextEdit_SetPlainText(this.h, text_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Cut() {
|
|
|
|
C.QPlainTextEdit_Cut(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Copy() {
|
|
|
|
C.QPlainTextEdit_Copy(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Paste() {
|
|
|
|
C.QPlainTextEdit_Paste(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Undo() {
|
|
|
|
C.QPlainTextEdit_Undo(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Redo() {
|
|
|
|
C.QPlainTextEdit_Redo(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) Clear() {
|
|
|
|
C.QPlainTextEdit_Clear(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SelectAll() {
|
|
|
|
C.QPlainTextEdit_SelectAll(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) InsertPlainText(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.QPlainTextEdit_InsertPlainText(this.h, text_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) AppendPlainText(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.QPlainTextEdit_AppendPlainText(this.h, text_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) AppendHtml(html string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
html_ms := C.struct_miqt_string{}
|
|
|
|
html_ms.data = C.CString(html)
|
|
|
|
html_ms.len = C.size_t(len(html))
|
|
|
|
defer C.free(unsafe.Pointer(html_ms.data))
|
|
|
|
C.QPlainTextEdit_AppendHtml(this.h, html_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CenterCursor() {
|
|
|
|
C.QPlainTextEdit_CenterCursor(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) ZoomIn() {
|
|
|
|
C.QPlainTextEdit_ZoomIn(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) ZoomOut() {
|
|
|
|
C.QPlainTextEdit_ZoomOut(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) TextChanged() {
|
|
|
|
C.QPlainTextEdit_TextChanged(this.h)
|
|
|
|
}
|
|
|
|
func (this *QPlainTextEdit) OnTextChanged(slot func()) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_TextChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QPlainTextEdit_TextChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_TextChanged(cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
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
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) UndoAvailable(b bool) {
|
|
|
|
C.QPlainTextEdit_UndoAvailable(this.h, (C.bool)(b))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QPlainTextEdit) OnUndoAvailable(slot func(b bool)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_UndoAvailable(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_QPlainTextEdit_UndoAvailable
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_UndoAvailable(cb C.intptr_t, b C.bool) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(b bool))
|
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 := (bool)(b)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) RedoAvailable(b bool) {
|
|
|
|
C.QPlainTextEdit_RedoAvailable(this.h, (C.bool)(b))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QPlainTextEdit) OnRedoAvailable(slot func(b bool)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_RedoAvailable(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_QPlainTextEdit_RedoAvailable
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_RedoAvailable(cb C.intptr_t, b C.bool) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(b bool))
|
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 := (bool)(b)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CopyAvailable(b bool) {
|
|
|
|
C.QPlainTextEdit_CopyAvailable(this.h, (C.bool)(b))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QPlainTextEdit) OnCopyAvailable(slot func(b bool)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_CopyAvailable(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_QPlainTextEdit_CopyAvailable
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_CopyAvailable(cb C.intptr_t, b C.bool) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(b bool))
|
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 := (bool)(b)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) SelectionChanged() {
|
|
|
|
C.QPlainTextEdit_SelectionChanged(this.h)
|
|
|
|
}
|
|
|
|
func (this *QPlainTextEdit) OnSelectionChanged(slot func()) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QPlainTextEdit_SelectionChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_SelectionChanged(cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
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
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) CursorPositionChanged() {
|
|
|
|
C.QPlainTextEdit_CursorPositionChanged(this.h)
|
|
|
|
}
|
|
|
|
func (this *QPlainTextEdit) OnCursorPositionChanged(slot func()) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_CursorPositionChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QPlainTextEdit_CursorPositionChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_CursorPositionChanged(cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
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
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) UpdateRequest(rect *QRect, dy int) {
|
|
|
|
C.QPlainTextEdit_UpdateRequest(this.h, rect.cPointer(), (C.int)(dy))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QPlainTextEdit) OnUpdateRequest(slot func(rect *QRect, dy int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_UpdateRequest(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_QPlainTextEdit_UpdateRequest
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_UpdateRequest(cb C.intptr_t, rect *C.QRect, dy C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(rect *QRect, dy 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-10-16 05:07:56 +00:00
|
|
|
slotval1 := UnsafeNewQRect(unsafe.Pointer(rect))
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval2 := (int)(dy)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1, slotval2)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) BlockCountChanged(newBlockCount int) {
|
|
|
|
C.QPlainTextEdit_BlockCountChanged(this.h, (C.int)(newBlockCount))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QPlainTextEdit) OnBlockCountChanged(slot func(newBlockCount int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_BlockCountChanged(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_QPlainTextEdit_BlockCountChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_BlockCountChanged(cb C.intptr_t, newBlockCount C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(newBlockCount 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)(newBlockCount)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) ModificationChanged(param1 bool) {
|
|
|
|
C.QPlainTextEdit_ModificationChanged(this.h, (C.bool)(param1))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QPlainTextEdit) OnModificationChanged(slot func(param1 bool)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QPlainTextEdit_connect_ModificationChanged(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_QPlainTextEdit_ModificationChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QPlainTextEdit_ModificationChanged(cb C.intptr_t, param1 C.bool) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(param1 bool))
|
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 := (bool)(param1)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QPlainTextEdit_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.QPlainTextEdit_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 QPlainTextEdit_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.QPlainTextEdit_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 QPlainTextEdit_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.QPlainTextEdit_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 QPlainTextEdit_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.QPlainTextEdit_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-20 06:40:03 +00:00
|
|
|
func (this *QPlainTextEdit) Find22(exp string, options QTextDocument__FindFlag) bool {
|
2024-10-18 23:53:33 +00:00
|
|
|
exp_ms := C.struct_miqt_string{}
|
|
|
|
exp_ms.data = C.CString(exp)
|
|
|
|
exp_ms.len = C.size_t(len(exp))
|
|
|
|
defer C.free(unsafe.Pointer(exp_ms.data))
|
|
|
|
return (bool)(C.QPlainTextEdit_Find22(this.h, exp_ms, (C.int)(options)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QPlainTextEdit) Find23(exp *QRegExp, options QTextDocument__FindFlag) bool {
|
2024-09-18 01:33:50 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_Find23(this.h, exp.cPointer(), (C.int)(options)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QPlainTextEdit) Find24(exp *QRegularExpression, options QTextDocument__FindFlag) bool {
|
2024-09-18 01:33:50 +00:00
|
|
|
return (bool)(C.QPlainTextEdit_Find24(this.h, exp.cPointer(), (C.int)(options)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPlainTextEdit) MoveCursor2(operation QTextCursor__MoveOperation, mode QTextCursor__MoveMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPlainTextEdit_MoveCursor2(this.h, (C.int)(operation), (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPlainTextEdit) ZoomIn1(rangeVal int) {
|
|
|
|
C.QPlainTextEdit_ZoomIn1(this.h, (C.int)(rangeVal))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextEdit) ZoomOut1(rangeVal int) {
|
|
|
|
C.QPlainTextEdit_ZoomOut1(this.h, (C.int)(rangeVal))
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPlainTextEdit) Delete() {
|
|
|
|
C.QPlainTextEdit_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 *QPlainTextEdit) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QPlainTextEdit) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QPlainTextDocumentLayout struct {
|
|
|
|
h *C.QPlainTextDocumentLayout
|
|
|
|
*QAbstractTextDocumentLayout
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextDocumentLayout) cPointer() *C.QPlainTextDocumentLayout {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QPlainTextDocumentLayout) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout) *QPlainTextDocumentLayout {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-10-16 05:07:56 +00:00
|
|
|
return &QPlainTextDocumentLayout{h: h, QAbstractTextDocumentLayout: UnsafeNewQAbstractTextDocumentLayout(unsafe.Pointer(h))}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer) *QPlainTextDocumentLayout {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQPlainTextDocumentLayout((*C.QPlainTextDocumentLayout)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPlainTextDocumentLayout constructs a new QPlainTextDocumentLayout object.
|
|
|
|
func NewQPlainTextDocumentLayout(document *QTextDocument) *QPlainTextDocumentLayout {
|
|
|
|
ret := C.QPlainTextDocumentLayout_new(document.cPointer())
|
|
|
|
return newQPlainTextDocumentLayout(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextDocumentLayout) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QPlainTextDocumentLayout_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QPlainTextDocumentLayout) 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.QPlainTextDocumentLayout_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QPlainTextDocumentLayout_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.QPlainTextDocumentLayout_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 QPlainTextDocumentLayout_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.QPlainTextDocumentLayout_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-08-29 07:01:51 +00:00
|
|
|
func (this *QPlainTextDocumentLayout) Draw(param1 *QPainter, param2 *QAbstractTextDocumentLayout__PaintContext) {
|
|
|
|
C.QPlainTextDocumentLayout_Draw(this.h, param1.cPointer(), param2.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPlainTextDocumentLayout) HitTest(param1 *QPointF, param2 HitTestAccuracy) int {
|
2024-09-18 00:12:02 +00:00
|
|
|
return (int)(C.QPlainTextDocumentLayout_HitTest(this.h, param1.cPointer(), (C.int)(param2)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPlainTextDocumentLayout) PageCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QPlainTextDocumentLayout_PageCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextDocumentLayout) DocumentSize() *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextDocumentLayout_DocumentSize(this.h)
|
|
|
|
_goptr := newQSizeF(_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 *QPlainTextDocumentLayout) FrameBoundingRect(param1 *QTextFrame) *QRectF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextDocumentLayout_FrameBoundingRect(this.h, param1.cPointer())
|
|
|
|
_goptr := newQRectF(_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 *QPlainTextDocumentLayout) BlockBoundingRect(block *QTextBlock) *QRectF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPlainTextDocumentLayout_BlockBoundingRect(this.h, block.cPointer())
|
|
|
|
_goptr := newQRectF(_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 *QPlainTextDocumentLayout) EnsureBlockLayout(block *QTextBlock) {
|
|
|
|
C.QPlainTextDocumentLayout_EnsureBlockLayout(this.h, block.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextDocumentLayout) SetCursorWidth(width int) {
|
|
|
|
C.QPlainTextDocumentLayout_SetCursorWidth(this.h, (C.int)(width))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextDocumentLayout) CursorWidth() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QPlainTextDocumentLayout_CursorWidth(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPlainTextDocumentLayout) RequestUpdate() {
|
|
|
|
C.QPlainTextDocumentLayout_RequestUpdate(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QPlainTextDocumentLayout_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.QPlainTextDocumentLayout_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 QPlainTextDocumentLayout_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.QPlainTextDocumentLayout_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 QPlainTextDocumentLayout_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.QPlainTextDocumentLayout_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 QPlainTextDocumentLayout_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.QPlainTextDocumentLayout_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 *QPlainTextDocumentLayout) Delete() {
|
|
|
|
C.QPlainTextDocumentLayout_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 *QPlainTextDocumentLayout) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QPlainTextDocumentLayout) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|