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.
14 lines
481 B
14 lines
481 B
#import <Cocoa/Cocoa.h>
|
|
|
|
#import "col.h"
|
|
|
|
id createLabel(id parent, const char* txt, int l, int t, int w, int h){
|
|
NSTextField *widget = [[[NSTextField alloc] initWithFrame:NSMakeRect( l, t, w, h )] autorelease];
|
|
[widget setStringValue:[NSString stringWithUTF8String:txt]];
|
|
[widget setEditable: NO];
|
|
[widget setAlignment: NSTextAlignmentLeft];
|
|
[widget setDrawsBackground: NO];
|
|
[widget setBordered: NO];
|
|
[[parent contentView] addSubview:widget];
|
|
return widget;
|
|
}
|
|
|