uiterm: remove *Ui argument from View methods

This commit is contained in:
Tim Cooper
2014-12-06 21:55:33 -04:00
parent dc4b3a3662
commit 9b0214d112
6 changed files with 60 additions and 36 deletions

View File

@@ -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) {
}