mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
ui/text: add Editor.Focus method
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -160,6 +160,10 @@ func (e *Editor) caretWidth() fixed.Int26_6 {
|
|||||||
return fixed.Int26_6(oneDp * 64)
|
return fixed.Int26_6(oneDp * 64)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *Editor) Focus() {
|
||||||
|
e.requestFocus = true
|
||||||
|
}
|
||||||
|
|
||||||
func (e *Editor) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
func (e *Editor) Layout(ops *ui.Ops, cs layout.Constraints) layout.Dimens {
|
||||||
for {
|
for {
|
||||||
if _, ok := e.Next(); !ok {
|
if _, ok := e.Next(); !ok {
|
||||||
|
|||||||
Reference in New Issue
Block a user