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

Method initialize

widget/selectable.go:87–93  ·  view source on GitHub ↗

initialize must be called at the beginning of any exported method that manipulates text state. It ensures that the underlying text is safe to access.

()

Source from the content-addressed store, hash-verified

85// manipulates text state. It ensures that the underlying text is safe to
86// access.
87func (l *Selectable) initialize() {
88 if !l.initialized {
89 l.source = newStringSource("")
90 l.text.SetSource(l.source)
91 l.initialized = true
92 }
93}
94
95// Focused returns whether the label is focused or not.
96func (l *Selectable) Focused() bool {

Callers 11

paintSelectionMethod · 0.95
paintTextMethod · 0.95
SelectionLenMethod · 0.95
SelectionMethod · 0.95
SetCaretMethod · 0.95
SelectedTextMethod · 0.95
ClearSelectionMethod · 0.95
TextMethod · 0.95
SetTextMethod · 0.95
UpdateMethod · 0.95
RegionsMethod · 0.95

Calls 2

newStringSourceFunction · 0.85
SetSourceMethod · 0.45

Tested by

no test coverage detected