blob: 10fef8edd07d056aaf69b89d010c2707f5fd2dc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
}
|