summaryrefslogtreecommitdiff
path: root/prefsize_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-06 23:03:29 -0400
committerPietro Gagliardi <[email protected]>2014-06-06 23:03:29 -0400
commitf5397475469b8e5b7a42d0bbb9bda4bca97f2b8a (patch)
tree99c98d83bff2089f3854f7e5750b6376719471e8 /prefsize_darwin.go
parent84c41112b381700aae6bf3bf59b4143716c75a82 (diff)
Set Area's preferred size in the documentation and on Windows and Mac OS X.
Diffstat (limited to 'prefsize_darwin.go')
-rw-r--r--prefsize_darwin.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/prefsize_darwin.go b/prefsize_darwin.go
index 46d72a7..ae53b8b 100644
--- a/prefsize_darwin.go
+++ b/prefsize_darwin.go
@@ -27,6 +27,12 @@ func pbarPrefSize(control C.id) (width int, height int) {
return int(r.width), int(r.height)
}
+// Areas know their own preferred size
+func areaPrefSize(control C.id) (width int, height int) {
+ r := C.areaPrefSize(control)
+ return int(r.width), int(r.height)
+}
+
var prefsizefuncs = [nctypes]func(C.id) (int, int){
c_button: controlPrefSize,
c_checkbox: controlPrefSize,
@@ -35,6 +41,7 @@ var prefsizefuncs = [nctypes]func(C.id) (int, int){
c_label: controlPrefSize,
c_listbox: listboxPrefSize,
c_progressbar: pbarPrefSize,
+ c_area: areaPrefSize,
}
func (s *sysData) preferredSize() (width int, height int) {