l.y0 = y0
l.x1 = x1
l.y1 = y1
+ l.uiDraw()
}
func (l *Label) uiDraw() {
func (t *Textbox) uiSetActive(active bool) {
t.active = active
+ t.uiDraw()
}
func (t *Textbox) uiSetBounds(x0, y0, x1, y1 int) {
t.y0 = y0
t.x1 = x1
t.y1 = y1
+ t.uiDraw()
}
func (t *Textbox) uiDraw() {
t.x1 = x1
t.y1 = y1
t.updateParsedLines()
+ t.uiDraw()
}
func (t *Textview) ScrollUp() {
if newLine := t.CurrentLine + 1; newLine < len(t.parsedLines) {
t.CurrentLine = newLine
}
+ t.uiDraw()
}
func (t *Textview) ScrollDown() {
if newLine := t.CurrentLine - 1; newLine >= 0 {
t.CurrentLine = newLine
}
+ t.uiDraw()
}
func (t *Textview) ScrollTop() {
} else {
t.CurrentLine = 0
}
+ t.uiDraw()
}
func (t *Textview) ScrollBottom() {
t.CurrentLine = 0
+ t.uiDraw()
}
func (t *Textview) updateParsedLines() {
func (t *Textview) AddLine(line string) {
t.Lines = append(t.Lines, line)
t.updateParsedLines()
+ t.uiDraw()
}
func (t *Textview) Clear() {
t.Lines = nil
t.CurrentLine = 0
t.parsedLines = nil
+ t.uiDraw()
}
func (t *Textview) uiDraw() {
func (t *Tree) uiSetActive(active bool) {
t.active = active
+ t.uiDraw()
}
func (t *Tree) uiSetBounds(x0, y0, x1, y1 int) {
t.y0 = y0
t.x1 = x1
t.y1 = y1
+ t.uiDraw()
}
func (t *Tree) Rebuild() {
}
t.lines = lines
t.activeLine = bounded(t.activeLine, 0, len(t.lines)-1)
+ t.uiDraw()
}
func (t *Tree) rebuild_rec(parent TreeItem, level int) []renderedTreeItem {
t.Listener(t.ui, t, t.lines[t.activeLine].Item)
}
}
- t.ui.Refresh()
+ t.uiDraw()
}
func (t *Tree) uiCharacterEvent(ch rune) {