mirror of https://github.com/Airr/nim-cocoa.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
590 B
17 lines
590 B
#import <Cocoa/Cocoa.h>
|
|
|
|
#import "col.h"
|
|
|
|
|
|
id createBox(id parent, const char* title, int x, int y, int width, int height) {
|
|
id widget = [[[NSBox alloc] initWithFrame: NSMakeRect(x, y, width, height)] autorelease];
|
|
[widget setTitle: [NSString stringWithUTF8String: title]];
|
|
|
|
// Do we need to create a contentView???
|
|
id sv = [[[SaneView alloc] initWithFrame: NSZeroRect] autorelease];
|
|
[sv setBackgroundColor: [NSColor windowBackgroundColor]];
|
|
[widget setContentView: sv];
|
|
[widget setBorderType: NSLineBorder];
|
|
addToParent(parent, widget);
|
|
return widget;
|
|
} |