MCPcopy Create free account
hub / github.com/gioui/gio / SetSource

Method SetSource

widget/text.go:125–129  ·  view source on GitHub ↗

SetSource initializes the underlying data source for the Text. This must be done before invoking any other methods on Text.

(source textSource)

Source from the content-addressed store, hash-verified

123// SetSource initializes the underlying data source for the Text. This
124// must be done before invoking any other methods on Text.
125func (e *textView) SetSource(source textSource) {
126 e.rr = source
127 e.invalidate()
128 e.seekCursor = 0
129}
130
131// ReadRuneAt reads the rune starting at the given byte offset, if any.
132func (e *textView) ReadRuneAt(off int64) (rune, int, error) {

Callers 4

layoutTextMethod · 0.45
initBufferMethod · 0.45
initializeMethod · 0.45
SetTextMethod · 0.45

Calls 1

invalidateMethod · 0.95

Tested by

no test coverage detected