Make it possible to have implementations in different toolkits.
Also, make it possible to share the headers.
This commit is contained in:
parent
b5f40d159e
commit
73e7da5fb7
16 changed files with 3 additions and 3 deletions
42
gtk/OGBox.m
Normal file
42
gtk/OGBox.m
Normal 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
|
Reference in a new issue