Add SetStyle Function
This commit is contained in:
43
wdgt_text.go
43
wdgt_text.go
@@ -82,27 +82,28 @@ func (w *Text) Draw(screen tcell.Screen) {
|
||||
}
|
||||
}
|
||||
|
||||
func (w *Text) Active() bool { return w.active }
|
||||
func (w *Text) SetActive(a bool) { w.active = a }
|
||||
func (w *Text) Visible() bool { return w.visible }
|
||||
func (w *Text) SetVisible(a bool) { w.visible = a }
|
||||
func (w *Text) SetX(x int) { w.x = x }
|
||||
func (w *Text) SetY(y int) { w.y = y }
|
||||
func (w *Text) GetX() int { return w.x }
|
||||
func (w *Text) GetY() int { return w.y }
|
||||
func (w *Text) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
|
||||
func (w *Text) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
|
||||
func (w *Text) SetW(x int) { w.w = x }
|
||||
func (w *Text) SetH(y int) { w.h = y }
|
||||
func (w *Text) GetW() int { return w.w }
|
||||
func (w *Text) GetH() int { return w.h }
|
||||
func (w *Text) WantW() int { return wh.Longest(w.message) }
|
||||
func (w *Text) WantH() int { return len(w.message) }
|
||||
func (w *Text) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
|
||||
func (w *Text) Focusable() bool { return w.focusable }
|
||||
func (w *Text) SetFocusable(b bool) { w.focusable = b }
|
||||
func (w *Text) MinW() int { return wh.Longest(w.message) }
|
||||
func (w *Text) MinH() int { return len(w.message) }
|
||||
func (w *Text) SetStyle(s tcell.Style) { w.style = s }
|
||||
func (w *Text) Active() bool { return w.active }
|
||||
func (w *Text) SetActive(a bool) { w.active = a }
|
||||
func (w *Text) Visible() bool { return w.visible }
|
||||
func (w *Text) SetVisible(a bool) { w.visible = a }
|
||||
func (w *Text) SetX(x int) { w.x = x }
|
||||
func (w *Text) SetY(y int) { w.y = y }
|
||||
func (w *Text) GetX() int { return w.x }
|
||||
func (w *Text) GetY() int { return w.y }
|
||||
func (w *Text) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
|
||||
func (w *Text) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
|
||||
func (w *Text) SetW(x int) { w.w = x }
|
||||
func (w *Text) SetH(y int) { w.h = y }
|
||||
func (w *Text) GetW() int { return w.w }
|
||||
func (w *Text) GetH() int { return w.h }
|
||||
func (w *Text) WantW() int { return wh.Longest(w.message) }
|
||||
func (w *Text) WantH() int { return len(w.message) }
|
||||
func (w *Text) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
|
||||
func (w *Text) Focusable() bool { return w.focusable }
|
||||
func (w *Text) SetFocusable(b bool) { w.focusable = b }
|
||||
func (w *Text) MinW() int { return wh.Longest(w.message) }
|
||||
func (w *Text) MinH() int { return len(w.message) }
|
||||
|
||||
func (w *Text) SetText(txt string) {
|
||||
w.text = txt
|
||||
|
||||
Reference in New Issue
Block a user