uiterm: remove *Ui argument from View methods
This commit is contained in:
@@ -13,13 +13,19 @@ type Textview struct {
|
||||
Bg Attribute
|
||||
|
||||
parsedLines []string
|
||||
|
||||
ui *Ui
|
||||
x0, y0, x1, y1 int
|
||||
}
|
||||
|
||||
func (t *Textview) setActive(ui *Ui, active bool) {
|
||||
func (t *Textview) uiInitialize(ui *Ui) {
|
||||
t.ui = ui
|
||||
}
|
||||
|
||||
func (t *Textview) setBounds(ui *Ui, x0, y0, x1, y1 int) {
|
||||
func (t *Textview) setActive(active bool) {
|
||||
}
|
||||
|
||||
func (t *Textview) setBounds(x0, y0, x1, y1 int) {
|
||||
t.x0 = x0
|
||||
t.y0 = y0
|
||||
t.x1 = x1
|
||||
@@ -96,7 +102,7 @@ func (t *Textview) Clear() {
|
||||
t.parsedLines = nil
|
||||
}
|
||||
|
||||
func (t *Textview) draw(ui *Ui) {
|
||||
func (t *Textview) draw() {
|
||||
var reader *strings.Reader
|
||||
line := len(t.parsedLines) - 1 - t.CurrentLine
|
||||
if line < 0 {
|
||||
@@ -134,8 +140,8 @@ func (t *Textview) draw(ui *Ui) {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *Textview) keyEvent(ui *Ui, mod Modifier, key Key) {
|
||||
func (t *Textview) keyEvent(mod Modifier, key Key) {
|
||||
}
|
||||
|
||||
func (t *Textview) characterEvent(ui *Ui, chr rune) {
|
||||
func (t *Textview) characterEvent(chr rune) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user