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.
()
| 85 | // manipulates text state. It ensures that the underlying text is safe to |
| 86 | // access. |
| 87 | func (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. |
| 96 | func (l *Selectable) Focused() bool { |
no test coverage detected