Update code for layouts, objects

This commit is contained in:
2024-07-21 11:48:28 -04:00
parent 9077015db6
commit 6ca6771fc6
26 changed files with 447 additions and 389 deletions

View File

@@ -11,7 +11,7 @@ type TextView struct {
// NewTextView creates a new text view.
func NewTextView (text string) *TextView {
this := &TextView { TextBox: tomo.NewTextBox() }
this.SetRole(tomo.R("objects", "TextView", ""))
this.SetRole(tomo.R("objects", "TextView"))
this.SetFocusable(true)
this.SetSelectable(true)
this.SetText(text)
@@ -21,6 +21,6 @@ func NewTextView (text string) *TextView {
return this
}
func (this *TextView) handleScroll (x, y float64) {
func (this *TextView) handleScroll (catch func (), x, y float64) {
this.ScrollTo(this.ContentBounds().Min.Add(image.Pt(int(x), int(y))))
}