uiterm: remove *Ui argument from View methods
This commit is contained in:
+10
-5
@@ -11,20 +11,25 @@ type Label struct {
|
||||
Fg Attribute
|
||||
Bg Attribute
|
||||
|
||||
ui *Ui
|
||||
x0, y0, x1, y1 int
|
||||
}
|
||||
|
||||
func (l *Label) setActive(ui *Ui, active bool) {
|
||||
func (l *Label) uiInitialize(ui *Ui) {
|
||||
l.ui = ui
|
||||
}
|
||||
|
||||
func (l *Label) setBounds(ui *Ui, x0, y0, x1, y1 int) {
|
||||
func (l *Label) setActive(active bool) {
|
||||
}
|
||||
|
||||
func (l *Label) setBounds(x0, y0, x1, y1 int) {
|
||||
l.x0 = x0
|
||||
l.y0 = y0
|
||||
l.x1 = x1
|
||||
l.y1 = y1
|
||||
}
|
||||
|
||||
func (l *Label) draw(ui *Ui) {
|
||||
func (l *Label) draw() {
|
||||
reader := strings.NewReader(l.Text)
|
||||
for y := l.y0; y < l.y1; y++ {
|
||||
for x := l.x0; x < l.x1; x++ {
|
||||
@@ -39,8 +44,8 @@ func (l *Label) draw(ui *Ui) {
|
||||
}
|
||||
}
|
||||
|
||||
func (l *Label) keyEvent(ui *Ui, mod Modifier, key Key) {
|
||||
func (l *Label) keyEvent(mod Modifier, key Key) {
|
||||
}
|
||||
|
||||
func (l *Label) characterEvent(ui *Ui, chr rune) {
|
||||
func (l *Label) characterEvent(chr rune) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user