-
Notifications
You must be signed in to change notification settings - Fork 0
/
MethodView.m
42 lines (34 loc) · 1010 Bytes
/
MethodView.m
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
35
36
37
38
39
40
41
42
//
// MethodView.m
// IntentionalIDE
//
// Created by Carsten Fregin on 30.03.10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "MethodView.h"
@implementation MethodView
- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
textView = [[NSTextView alloc] initWithFrame:NSInsetRect(frame, 10, 10)];
[self addSubview:textView];
dropdown = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(frame.origin.x, frame.origin.y, 180, 40)];
[dropdown addItemWithTitle:@"Javascript"];
[dropdown addItemWithTitle:@"Actionscript"];
[dropdown addItemWithTitle:@"Ruby"];
[dropdown addItemWithTitle:@"Objective C"];
[self addSubview:dropdown];
[textView retain];
[dropdown retain];
}
return self;
}
- (void)drawRect:(NSRect)dirtyRect {
[[NSColor yellowColor] set];
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:[self frame] xRadius:20 yRadius:20];
[path fill];
}
- (BOOL)isFlipped{
return YES;
}
@end