-
Notifications
You must be signed in to change notification settings - Fork 0
/
CibEditorView.j
34 lines (24 loc) · 867 Bytes
/
CibEditorView.j
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@import <AppKit/CPSplitView.j>
@implementation CibEditorView : CPSplitView
{
CPView _canvasView;
CPView _objectsView;
}
-(id) initWithFrame:(CGRect)aFrame
{
self = [super initWithFrame:aFrame];
if( self )
{
[self setOrientation:CPSplitViewVertical];
[self setAutoresizingMask:CPViewWidthSizable|CPViewHeightSizable];
_canvasView = [[CPView alloc] initWithFrame:CGRectMake(0,0, CGRectGetWidth(aFrame)-600, CGRectGetHeight(aFrame)*0.7)];
[_canvasView setAutoresizingMask:CPViewHeightSizable];
[_canvasView addCSSStyle:@"canvas"];
_objectsView = [[CPView alloc] initWithFrame:CGRectMake(0, 500, CGRectGetWidth(aFrame), CGRectGetHeight(aFrame)*0.3)];
[_objectsView setBackgroundColor:[CPColor whiteColor]];
[self addSubview:_canvasView];
[self addSubview:_objectsView];
}
return self;
}
@end