summaryrefslogtreecommitdiff
path: root/area.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-09 22:11:08 -0400
committerPietro Gagliardi <[email protected]>2014-06-09 22:11:08 -0400
commitfa4094adeb122ea23cc898da75421230d7b7eda1 (patch)
tree1f602ec687dfa8ef0fc051265728b3f448b32693 /area.go
parent6b860779e357560266553b298af5f4863f511aa7 (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.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/area.go b/area.go
index 8bf1d60..6558db8 100644
--- a/area.go
+++ b/area.go
@@ -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()