diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-06 23:03:29 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-06 23:03:29 -0400 |
| commit | f5397475469b8e5b7a42d0bbb9bda4bca97f2b8a (patch) | |
| tree | 99c98d83bff2089f3854f7e5750b6376719471e8 /prefsize_darwin.m | |
| parent | 84c41112b381700aae6bf3bf59b4143716c75a82 (diff) | |
Set Area's preferred size in the documentation and on Windows and Mac OS X.
Diffstat (limited to 'prefsize_darwin.m')
| -rw-r--r-- | prefsize_darwin.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/prefsize_darwin.m b/prefsize_darwin.m index 521b767..2f3dd7a 100644 --- a/prefsize_darwin.m +++ b/prefsize_darwin.m @@ -72,4 +72,18 @@ struct xsize pbarPrefSize(id control) s.width = (intptr_t) r.size.width; s.height = (intptr_t) r.size.height; return s; +} + +struct xsize areaPrefSize(id scrollview) +{ + NSView *c; + NSRect r; + struct xsize s; + + c = areaInScrollView(toNSScrollView(scrollview)); + // don't size to fit; the frame size is already the size we want + r = [c frame]; + s.width = (intptr_t) r.size.width; + s.height = (intptr_t) r.size.height; + return s; }
\ No newline at end of file |
