This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
/
text_content_manager.go
125 lines (100 loc) · 4.43 KB
/
text_content_manager.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// auto-generated code, do not modify
package appkit
import (
"unsafe"
"github.com/hsiafan/cocoa/foundation"
"github.com/hsiafan/cocoa/objc"
)
var TextContentManagerClass = _TextContentManagerClass{objc.GetClass("NSTextContentManager")}
type _TextContentManagerClass struct {
objc.Class
}
type ITextContentManager interface {
objc.IObject
PerformEditingTransactionUsingBlock(transaction func())
RecordEditActionInRange_NewTextRange(originalTextRange ITextRange, newTextRange ITextRange)
AddTextLayoutManager(textLayoutManager ITextLayoutManager)
RemoveTextLayoutManager(textLayoutManager ITextLayoutManager)
SynchronizeTextLayoutManagers(completionHandler func(error foundation.Error))
TextElementsForRange(range_ ITextRange) []TextElement
AutomaticallySynchronizesToBackingStore() bool
SetAutomaticallySynchronizesToBackingStore(value bool)
HasEditingTransaction() bool
PrimaryTextLayoutManager() TextLayoutManager
SetPrimaryTextLayoutManager(value ITextLayoutManager)
TextLayoutManagers() []TextLayoutManager
AutomaticallySynchronizesTextLayoutManagers() bool
SetAutomaticallySynchronizesTextLayoutManagers(value bool)
}
type TextContentManager struct {
objc.Object
}
func MakeTextContentManager(ptr unsafe.Pointer) TextContentManager {
return TextContentManager{
Object: objc.MakeObject(ptr),
}
}
func (t_ TextContentManager) Init() TextContentManager {
rv := objc.CallMethod[TextContentManager](t_, objc.SEL("init"))
return rv
}
func (tc _TextContentManagerClass) Alloc() TextContentManager {
rv := objc.CallMethod[TextContentManager](tc, objc.SEL("alloc"))
return rv
}
func (tc _TextContentManagerClass) New() TextContentManager {
rv := objc.CallMethod[TextContentManager](tc, objc.SEL("new"))
rv.Autorelease()
return rv
}
func NewTextContentManager() TextContentManager {
return TextContentManagerClass.New()
}
func (t_ TextContentManager) PerformEditingTransactionUsingBlock(transaction func()) {
objc.CallMethod[objc.Void](t_, objc.SEL("performEditingTransactionUsingBlock:"), transaction)
}
func (t_ TextContentManager) RecordEditActionInRange_NewTextRange(originalTextRange ITextRange, newTextRange ITextRange) {
objc.CallMethod[objc.Void](t_, objc.SEL("recordEditActionInRange:newTextRange:"), objc.ExtractPtr(originalTextRange), objc.ExtractPtr(newTextRange))
}
func (t_ TextContentManager) AddTextLayoutManager(textLayoutManager ITextLayoutManager) {
objc.CallMethod[objc.Void](t_, objc.SEL("addTextLayoutManager:"), objc.ExtractPtr(textLayoutManager))
}
func (t_ TextContentManager) RemoveTextLayoutManager(textLayoutManager ITextLayoutManager) {
objc.CallMethod[objc.Void](t_, objc.SEL("removeTextLayoutManager:"), objc.ExtractPtr(textLayoutManager))
}
func (t_ TextContentManager) SynchronizeTextLayoutManagers(completionHandler func(error foundation.Error)) {
objc.CallMethod[objc.Void](t_, objc.SEL("synchronizeTextLayoutManagers:"), completionHandler)
}
func (t_ TextContentManager) TextElementsForRange(range_ ITextRange) []TextElement {
rv := objc.CallMethod[[]TextElement](t_, objc.SEL("textElementsForRange:"), objc.ExtractPtr(range_))
return rv
}
func (t_ TextContentManager) AutomaticallySynchronizesToBackingStore() bool {
rv := objc.CallMethod[bool](t_, objc.SEL("automaticallySynchronizesToBackingStore"))
return rv
}
func (t_ TextContentManager) SetAutomaticallySynchronizesToBackingStore(value bool) {
objc.CallMethod[objc.Void](t_, objc.SEL("setAutomaticallySynchronizesToBackingStore:"), value)
}
func (t_ TextContentManager) HasEditingTransaction() bool {
rv := objc.CallMethod[bool](t_, objc.SEL("hasEditingTransaction"))
return rv
}
func (t_ TextContentManager) PrimaryTextLayoutManager() TextLayoutManager {
rv := objc.CallMethod[TextLayoutManager](t_, objc.SEL("primaryTextLayoutManager"))
return rv
}
func (t_ TextContentManager) SetPrimaryTextLayoutManager(value ITextLayoutManager) {
objc.CallMethod[objc.Void](t_, objc.SEL("setPrimaryTextLayoutManager:"), objc.ExtractPtr(value))
}
func (t_ TextContentManager) TextLayoutManagers() []TextLayoutManager {
rv := objc.CallMethod[[]TextLayoutManager](t_, objc.SEL("textLayoutManagers"))
return rv
}
func (t_ TextContentManager) AutomaticallySynchronizesTextLayoutManagers() bool {
rv := objc.CallMethod[bool](t_, objc.SEL("automaticallySynchronizesTextLayoutManagers"))
return rv
}
func (t_ TextContentManager) SetAutomaticallySynchronizesTextLayoutManagers(value bool) {
objc.CallMethod[objc.Void](t_, objc.SEL("setAutomaticallySynchronizesTextLayoutManagers:"), value)
}