Make it possible to have implementations in different toolkits.

Also, make it possible to share the headers.
This commit is contained in:
Jonathan Schleifer 2011-12-27 23:38:07 +01:00
parent b5f40d159e
commit 73e7da5fb7
16 changed files with 3 additions and 3 deletions

42
gtk/OGBox.m Normal file
View file

@ -0,0 +1,42 @@
#import "OGBox.h"
@implementation OGBox
+ box
{
return [[[self alloc] init] autorelease];
}
- init
{
self = [super init];
@try {
if (isa == [OGBox class])
@throw [OFNotImplementedException
exceptionWithClass: isa
selector: _cmd];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)appendChild: (OGWidget*)child
expand: (BOOL)expand
fill: (BOOL)fill
padding: (float)padding
{
gtk_box_pack_start(GTK_BOX(widget), child->widget, expand, fill,
padding);
}
- (void)prependChild: (OGWidget*)child
expand: (BOOL)expand
fill: (BOOL)fill
padding: (float)padding
{
gtk_box_pack_end(GTK_BOX(widget), child->widget, expand, fill, padding);
}
@end