diff options
Diffstat (limited to 'redo/control_darwin.m')
| -rw-r--r-- | redo/control_darwin.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/redo/control_darwin.m b/redo/control_darwin.m new file mode 100644 index 0000000..10fef8e --- /dev/null +++ b/redo/control_darwin.m @@ -0,0 +1,20 @@ +// 30 july 2014 + +#import "objc_darwin.h" +#import <Cocoa/Cocoa.h> + +#define toNSView(x) ((NSView *) (x)) + +// TODO verify this when we add more scrolling controls +id newScrollView(id content) +{ + NSScrollView *sv; + + sv = [[NSScrollView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]; + [sv setDocumentView:toNSView(content)]; + [sv setHasHorizontalScroller:YES]; + [sv setHasVerticalScroller:YES]; + [sv setAutohidesScrollers:YES]; + [sv setBorderType:NSBezelBorder]; + return (id) sv; +} |
