mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 05:24:48 -04:00
refactor(tracker/gioui): give Editor Text / SetText methods
This commit is contained in:
parent
03c994e4da
commit
2b7ce39069
@ -39,6 +39,16 @@ func MaterialEditor(th *material.Theme, e *Editor, hint string) EditorStyle {
|
||||
return EditorStyle(material.Editor(th, &e.Editor, hint))
|
||||
}
|
||||
|
||||
func (e *Editor) SetText(s string) {
|
||||
if e.Editor.Text() != s {
|
||||
e.Editor.SetText(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Editor) Text() string {
|
||||
return e.Editor.Text()
|
||||
}
|
||||
|
||||
func (e *Editor) Submitted(gtx C) bool {
|
||||
for {
|
||||
ev, ok := e.Editor.Update(gtx)
|
||||
|
Reference in New Issue
Block a user