diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-09 22:11:08 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-09 22:11:08 -0400 |
| commit | fa4094adeb122ea23cc898da75421230d7b7eda1 (patch) | |
| tree | 1f602ec687dfa8ef0fc051265728b3f448b32693 /area.go | |
| parent | 6b860779e357560266553b298af5f4863f511aa7 (diff) | |
Added Area.RepaintAll() (requested by aybabtme on the Gopher Academy Slack) and implemented it on Mac OS X.
Diffstat (limited to 'area.go')
| -rw-r--r-- | area.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -308,6 +308,18 @@ func (a *Area) SetSize(width int, height int) { a.initheight = height } +// RepaintAll signals the entirety of the Area for redraw. +// If called before the Window containing the Area is created, RepaintAll does nothing. +func (a *Area) RepaintAll() { + a.lock.Lock() + defer a.lock.Unlock() + + if !a.created { + return + } + a.sysData.repaintAll() +} + func (a *Area) make(window *sysData) error { a.lock.Lock() defer a.lock.Unlock() |
