DELETED Makefile Index: Makefile ================================================================== --- Makefile +++ /dev/null @@ -1,21 +0,0 @@ -PREFIX ?= /usr/local - -all: - @objfw-compile -Wall -g --lib 0.0 -o objgui \ - `pkg-config --cflags --libs gtk+-3.0` \ - `ls *.m | fgrep -v test.m` - -test: - @objfw-compile -Wall -g -o test \ - `pkg-config --cflags --libs gtk+-3.0` \ - *.m - -install: - mkdir -p ${PREFIX}/include/ObjGUI - cp *.h ${PREFIX}/include/ObjGUI/ - cp libobjgui.so ${PREFIX}/lib/libobjgui.so.0.0 - ln -sf libobjgui.so.0.0 ${PREFIX}/lib/libobjgui.so.0 - ln -sf libobjgui.so.0 ${PREFIX}/lib/libobjgui.so - -clean: - rm -f test *.so *.o *~ DELETED OGApplication.h Index: OGApplication.h ================================================================== --- OGApplication.h +++ /dev/null @@ -1,23 +0,0 @@ -#include - -#import - -@protocol OGApplicationDelegate -- (void)applicationDidFinishLaunching; -@optional -- (void)applicationWillTerminate; -@end - -@interface OGApplication: OFObject -{ - id delegate; -} - -+ (void)quit; -@end - -#define OG_APPLICATION_DELEGATE(cls) \ - Class \ - og_application_delegate() { \ - return [cls class]; \ - } DELETED OGApplication.m Index: OGApplication.m ================================================================== --- OGApplication.m +++ /dev/null @@ -1,36 +0,0 @@ -#import "OGApplication.h" - -OF_APPLICATION_DELEGATE(OGApplication) - -extern Class og_application_delegate(void); - -@implementation OGApplication -+ (void)quit -{ - gtk_main_quit(); -} - -- (void)applicationDidFinishLaunching -{ - OFAutoreleasePool *pool; - int *argc; - char ***argv; - - delegate = [[og_application_delegate() alloc] init]; - - [[OFApplication sharedApplication] getArgumentCount: &argc - andArgumentValues: &argv]; - gtk_init(argc, argv); - - pool = [OFAutoreleasePool new]; - [delegate applicationDidFinishLaunching]; - [pool release]; - - gtk_main(); -} - -- (void)applicationWillTerminate -{ - [delegate applicationWillTerminate]; -} -@end DELETED OGBox.h Index: OGBox.h ================================================================== --- OGBox.h +++ /dev/null @@ -1,14 +0,0 @@ -#import "OGWidget.h" - -@interface OGBox: OGWidget -+ box; - -- (void)appendChild: (OGWidget*)child - expand: (BOOL)expand - fill: (BOOL)fill - padding: (float)padding; -- (void)prependChild: (OGWidget*)child - expand: (BOOL)expand - fill: (BOOL)fill - padding: (float)padding; -@end DELETED OGBox.m Index: OGBox.m ================================================================== --- OGBox.m +++ /dev/null @@ -1,42 +0,0 @@ -#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 DELETED OGButton.h Index: OGButton.h ================================================================== --- OGButton.h +++ /dev/null @@ -1,19 +0,0 @@ -#import "OGWidget.h" - -@class OGButton; - -@protocol OGButtonDelegate -@optional -- (void)buttonWasClicked: (OGButton*)button; -@end - -@interface OGButton: OGWidget -{ - id delegate; -} - -@property (assign) id delegate; -@property (copy) OFString *label; - -+ button; -@end DELETED OGButton.m Index: OGButton.m ================================================================== --- OGButton.m +++ /dev/null @@ -1,56 +0,0 @@ -#import "OGButton.h" - -@interface OGButton () -- (void)OG_clicked; -@end - -static void -clicked(GtkWidget *widget, gpointer data) -{ - [(OGButton*)data OG_clicked]; -} - -@implementation OGButton -@synthesize delegate; - -+ button -{ - return [[[self alloc] init] autorelease]; -} - -- init -{ - self = [super init]; - - widget = gtk_button_new(); - g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(clicked), - self); - - g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(og_destroy), - self); - [self retain]; - - return self; -} - -- (OFString*)label -{ - return [OFString stringWithUTF8String: - gtk_button_get_label(GTK_BUTTON(widget))]; -} - -- (void)setLabel: (OFString*)label -{ - gtk_button_set_label(GTK_BUTTON(widget), [label UTF8String]); -} - -- (void)OG_clicked -{ - OFAutoreleasePool *pool = [OFAutoreleasePool new]; - - if ([delegate respondsToSelector: @selector(buttonWasClicked:)]) - [delegate buttonWasClicked: self]; - - [pool release]; -} -@end DELETED OGHBox.h Index: OGHBox.h ================================================================== --- OGHBox.h +++ /dev/null @@ -1,4 +0,0 @@ -#import "OGBox.h" - -@interface OGHBox: OGBox -@end DELETED OGHBox.m Index: OGHBox.m ================================================================== --- OGHBox.m +++ /dev/null @@ -1,16 +0,0 @@ -#import "OGHBox.h" - -@implementation OGHBox -- init -{ - self = [super init]; - - widget = gtk_hbox_new(FALSE, 0); - - g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(og_destroy), - self); - [self retain]; - - return self; -} -@end DELETED OGVBox.h Index: OGVBox.h ================================================================== --- OGVBox.h +++ /dev/null @@ -1,4 +0,0 @@ -#import "OGBox.h" - -@interface OGVBox: OGBox -@end DELETED OGVBox.m Index: OGVBox.m ================================================================== --- OGVBox.m +++ /dev/null @@ -1,16 +0,0 @@ -#import "OGVBox.h" - -@implementation OGVBox -- init -{ - self = [super init]; - - widget = gtk_vbox_new(FALSE, 0); - - g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(og_destroy), - self); - [self retain]; - - return self; -} -@end DELETED OGWidget.h Index: OGWidget.h ================================================================== --- OGWidget.h +++ /dev/null @@ -1,15 +0,0 @@ -#include - -#import - -@interface OGWidget: OFObject -{ -@public - GtkWidget *widget; -} - -- (void)show; -- (void)hide; -@end - -extern void og_destroy(GtkWidget*, OGWidget*); DELETED OGWidget.m Index: OGWidget.m ================================================================== --- OGWidget.m +++ /dev/null @@ -1,35 +0,0 @@ -#include "OGWidget.h" - -void og_destroy(GtkWidget *widget, OGWidget *object) -{ - [object release]; -} - -@implementation OGWidget -- init -{ - self = [super init]; - - @try { - if (isa == [OGWidget class]) - @throw [OFNotImplementedException - exceptionWithClass: isa - selector: @selector(init)]; - } @catch (id e) { - [self release]; - @throw e; - } - - return self; -} - -- (void)show -{ - gtk_widget_show_all(widget); -} - -- (void)hide -{ - gtk_widget_hide(widget); -} -@end DELETED OGWindow.h Index: OGWindow.h ================================================================== --- OGWindow.h +++ /dev/null @@ -1,22 +0,0 @@ -#import "OGWidget.h" - -@class OGWindow; - -@protocol OGWindowDelegate -@optional -- (BOOL)windowWillClose: (OGWindow*)window; -@end - -@interface OGWindow: OGWidget -{ - id delegate; -} - -@property (assign) id delegate; -@property (copy) OFString *title; -@property (assign) of_point_t position; -@property (assign) of_dimension_t dimension; - -+ window; -- (void)addChild: (OGWidget*)widget; -@end DELETED OGWindow.m Index: OGWindow.m ================================================================== --- OGWindow.m +++ /dev/null @@ -1,92 +0,0 @@ -#import "OGWindow.h" - -@interface OGWindow () -- (BOOL)OG_willClose; -@end - -static gboolean -willClose(GtkWidget *widget, GdkEvent *event, gpointer data) -{ - return ([(OGWindow*)data OG_willClose] ? FALSE : TRUE); -} - -@implementation OGWindow -@synthesize delegate; - -+ window -{ - return [[[self alloc] init] autorelease]; -} - -- init -{ - self = [super init]; - - widget = gtk_window_new(GTK_WINDOW_TOPLEVEL); - g_signal_connect(G_OBJECT(widget), "delete-event", - G_CALLBACK(willClose), self); - - g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(og_destroy), - self); - [self retain]; - - return self; -} - -- (OFString*)title -{ - return [OFString stringWithUTF8String: - gtk_window_get_title(GTK_WINDOW(widget))]; -} - -- (void)setTitle: (OFString*)title -{ - gtk_window_set_title(GTK_WINDOW(widget), [title UTF8String]); -} - -- (of_point_t)position -{ - gint x, y; - - gtk_window_get_position(GTK_WINDOW(widget), &x, &y); - - return of_point(x, y); -} - -- (void)setPosition: (of_point_t)position -{ - gtk_window_move(GTK_WINDOW(widget), position.x, position.y); -} - -- (of_dimension_t)dimension -{ - gint width, height; - - gtk_window_get_size(GTK_WINDOW(widget), &width, &height); - - return of_dimension(width, height); -} - -- (void)setDimension: (of_dimension_t)dimension -{ - gtk_window_resize(GTK_WINDOW(widget), - dimension.width, dimension.height); -} - -- (void)addChild: (OGWidget*)child -{ - gtk_container_add(GTK_CONTAINER(widget), child->widget); -} - -- (BOOL)OG_willClose -{ - OFAutoreleasePool *pool = [OFAutoreleasePool new]; - - if ([delegate respondsToSelector: @selector(windowWillClose:)]) - return [delegate windowWillClose: self]; - - [pool release]; - - return YES; -} -@end ADDED gtk/Makefile Index: gtk/Makefile ================================================================== --- /dev/null +++ gtk/Makefile @@ -0,0 +1,21 @@ +PREFIX ?= /usr/local + +all: + @objfw-compile -Wall -g --lib 0.0 -o objgui -I../headers \ + `pkg-config --cflags --libs gtk+-3.0` \ + `ls *.m | fgrep -v test.m` + +test: + @objfw-compile -Wall -g -o test -I../headers \ + `pkg-config --cflags --libs gtk+-3.0` \ + *.m + +install: + mkdir -p ${PREFIX}/include/ObjGUI + cp ../headers/*.h ${PREFIX}/include/ObjGUI/ + cp libobjgui.so ${PREFIX}/lib/libobjgui.so.0.0 + ln -sf libobjgui.so.0.0 ${PREFIX}/lib/libobjgui.so.0 + ln -sf libobjgui.so.0 ${PREFIX}/lib/libobjgui.so + +clean: + rm -f test *.so *.o *~ ADDED gtk/OGApplication.m Index: gtk/OGApplication.m ================================================================== --- /dev/null +++ gtk/OGApplication.m @@ -0,0 +1,36 @@ +#import "OGApplication.h" + +OF_APPLICATION_DELEGATE(OGApplication) + +extern Class og_application_delegate(void); + +@implementation OGApplication ++ (void)quit +{ + gtk_main_quit(); +} + +- (void)applicationDidFinishLaunching +{ + OFAutoreleasePool *pool; + int *argc; + char ***argv; + + delegate = [[og_application_delegate() alloc] init]; + + [[OFApplication sharedApplication] getArgumentCount: &argc + andArgumentValues: &argv]; + gtk_init(argc, argv); + + pool = [OFAutoreleasePool new]; + [delegate applicationDidFinishLaunching]; + [pool release]; + + gtk_main(); +} + +- (void)applicationWillTerminate +{ + [delegate applicationWillTerminate]; +} +@end ADDED gtk/OGBox.m Index: gtk/OGBox.m ================================================================== --- /dev/null +++ gtk/OGBox.m @@ -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 ADDED gtk/OGButton.m Index: gtk/OGButton.m ================================================================== --- /dev/null +++ gtk/OGButton.m @@ -0,0 +1,56 @@ +#import "OGButton.h" + +@interface OGButton () +- (void)OG_clicked; +@end + +static void +clicked(GtkWidget *widget, gpointer data) +{ + [(OGButton*)data OG_clicked]; +} + +@implementation OGButton +@synthesize delegate; + ++ button +{ + return [[[self alloc] init] autorelease]; +} + +- init +{ + self = [super init]; + + widget = gtk_button_new(); + g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(clicked), + self); + + g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(og_destroy), + self); + [self retain]; + + return self; +} + +- (OFString*)label +{ + return [OFString stringWithUTF8String: + gtk_button_get_label(GTK_BUTTON(widget))]; +} + +- (void)setLabel: (OFString*)label +{ + gtk_button_set_label(GTK_BUTTON(widget), [label UTF8String]); +} + +- (void)OG_clicked +{ + OFAutoreleasePool *pool = [OFAutoreleasePool new]; + + if ([delegate respondsToSelector: @selector(buttonWasClicked:)]) + [delegate buttonWasClicked: self]; + + [pool release]; +} +@end ADDED gtk/OGHBox.m Index: gtk/OGHBox.m ================================================================== --- /dev/null +++ gtk/OGHBox.m @@ -0,0 +1,16 @@ +#import "OGHBox.h" + +@implementation OGHBox +- init +{ + self = [super init]; + + widget = gtk_hbox_new(FALSE, 0); + + g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(og_destroy), + self); + [self retain]; + + return self; +} +@end ADDED gtk/OGVBox.m Index: gtk/OGVBox.m ================================================================== --- /dev/null +++ gtk/OGVBox.m @@ -0,0 +1,16 @@ +#import "OGVBox.h" + +@implementation OGVBox +- init +{ + self = [super init]; + + widget = gtk_vbox_new(FALSE, 0); + + g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(og_destroy), + self); + [self retain]; + + return self; +} +@end ADDED gtk/OGWidget.m Index: gtk/OGWidget.m ================================================================== --- /dev/null +++ gtk/OGWidget.m @@ -0,0 +1,35 @@ +#include "OGWidget.h" + +void og_destroy(GtkWidget *widget, OGWidget *object) +{ + [object release]; +} + +@implementation OGWidget +- init +{ + self = [super init]; + + @try { + if (isa == [OGWidget class]) + @throw [OFNotImplementedException + exceptionWithClass: isa + selector: @selector(init)]; + } @catch (id e) { + [self release]; + @throw e; + } + + return self; +} + +- (void)show +{ + gtk_widget_show_all(widget); +} + +- (void)hide +{ + gtk_widget_hide(widget); +} +@end ADDED gtk/OGWindow.m Index: gtk/OGWindow.m ================================================================== --- /dev/null +++ gtk/OGWindow.m @@ -0,0 +1,92 @@ +#import "OGWindow.h" + +@interface OGWindow () +- (BOOL)OG_willClose; +@end + +static gboolean +willClose(GtkWidget *widget, GdkEvent *event, gpointer data) +{ + return ([(OGWindow*)data OG_willClose] ? FALSE : TRUE); +} + +@implementation OGWindow +@synthesize delegate; + ++ window +{ + return [[[self alloc] init] autorelease]; +} + +- init +{ + self = [super init]; + + widget = gtk_window_new(GTK_WINDOW_TOPLEVEL); + g_signal_connect(G_OBJECT(widget), "delete-event", + G_CALLBACK(willClose), self); + + g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(og_destroy), + self); + [self retain]; + + return self; +} + +- (OFString*)title +{ + return [OFString stringWithUTF8String: + gtk_window_get_title(GTK_WINDOW(widget))]; +} + +- (void)setTitle: (OFString*)title +{ + gtk_window_set_title(GTK_WINDOW(widget), [title UTF8String]); +} + +- (of_point_t)position +{ + gint x, y; + + gtk_window_get_position(GTK_WINDOW(widget), &x, &y); + + return of_point(x, y); +} + +- (void)setPosition: (of_point_t)position +{ + gtk_window_move(GTK_WINDOW(widget), position.x, position.y); +} + +- (of_dimension_t)dimension +{ + gint width, height; + + gtk_window_get_size(GTK_WINDOW(widget), &width, &height); + + return of_dimension(width, height); +} + +- (void)setDimension: (of_dimension_t)dimension +{ + gtk_window_resize(GTK_WINDOW(widget), + dimension.width, dimension.height); +} + +- (void)addChild: (OGWidget*)child +{ + gtk_container_add(GTK_CONTAINER(widget), child->widget); +} + +- (BOOL)OG_willClose +{ + OFAutoreleasePool *pool = [OFAutoreleasePool new]; + + if ([delegate respondsToSelector: @selector(windowWillClose:)]) + return [delegate windowWillClose: self]; + + [pool release]; + + return YES; +} +@end ADDED gtk/test.m Index: gtk/test.m ================================================================== --- /dev/null +++ gtk/test.m @@ -0,0 +1,74 @@ +#import "OGApplication.h" +#import "OGWindow.h" +#import "OGButton.h" +#import "OGHBox.h" +#import "OGVBox.h" + +@interface Test: OFObject +@end + +OG_APPLICATION_DELEGATE(Test) + +@implementation Test +- (void)applicationDidFinishLaunching +{ + OGWindow *w = [OGWindow window]; + w.title = @"Hallo Welt!"; + w.position = of_point(100, 100); + w.dimension = of_dimension(600, 400); + w.delegate = self; + + OGVBox *vbox = [OGVBox box]; + [w addChild: vbox]; + + OGButton *b = [OGButton button]; + b.label = @"Klick mich!"; + b.delegate = self; + [vbox appendChild: b + expand: YES + fill: YES + padding: 0]; + + OGHBox *hbox = [OGHBox box]; + [vbox appendChild: hbox + expand: NO + fill: NO + padding: 0]; + + OGButton *b1 = [OGButton button]; + b1.label = @"Ich"; + [hbox appendChild: b1 + expand: YES + fill: YES + padding: 0]; + + OGButton *b2 = [OGButton button]; + b2.label = @"mach"; + [hbox appendChild: b2 + expand: YES + fill: YES + padding: 0]; + + OGButton *b3 = [OGButton button]; + b3.label = @"nix"; + [hbox appendChild: b3 + expand: YES + fill: YES + padding: 0]; + + [w show]; +} + +- (BOOL)windowWillClose: (OGWindow*)window +{ + [OGApplication quit]; + + return YES; +} + +- (void)buttonWasClicked: (OGButton*)button +{ + of_log(@"Hallo!"); +} +@end ADDED headers/OGApplication.h Index: headers/OGApplication.h ================================================================== --- /dev/null +++ headers/OGApplication.h @@ -0,0 +1,23 @@ +#include + +#import + +@protocol OGApplicationDelegate +- (void)applicationDidFinishLaunching; +@optional +- (void)applicationWillTerminate; +@end + +@interface OGApplication: OFObject +{ + id delegate; +} + ++ (void)quit; +@end + +#define OG_APPLICATION_DELEGATE(cls) \ + Class \ + og_application_delegate() { \ + return [cls class]; \ + } ADDED headers/OGBox.h Index: headers/OGBox.h ================================================================== --- /dev/null +++ headers/OGBox.h @@ -0,0 +1,14 @@ +#import "OGWidget.h" + +@interface OGBox: OGWidget ++ box; + +- (void)appendChild: (OGWidget*)child + expand: (BOOL)expand + fill: (BOOL)fill + padding: (float)padding; +- (void)prependChild: (OGWidget*)child + expand: (BOOL)expand + fill: (BOOL)fill + padding: (float)padding; +@end ADDED headers/OGButton.h Index: headers/OGButton.h ================================================================== --- /dev/null +++ headers/OGButton.h @@ -0,0 +1,19 @@ +#import "OGWidget.h" + +@class OGButton; + +@protocol OGButtonDelegate +@optional +- (void)buttonWasClicked: (OGButton*)button; +@end + +@interface OGButton: OGWidget +{ + id delegate; +} + +@property (assign) id delegate; +@property (copy) OFString *label; + ++ button; +@end ADDED headers/OGHBox.h Index: headers/OGHBox.h ================================================================== --- /dev/null +++ headers/OGHBox.h @@ -0,0 +1,4 @@ +#import "OGBox.h" + +@interface OGHBox: OGBox +@end ADDED headers/OGVBox.h Index: headers/OGVBox.h ================================================================== --- /dev/null +++ headers/OGVBox.h @@ -0,0 +1,4 @@ +#import "OGBox.h" + +@interface OGVBox: OGBox +@end ADDED headers/OGWidget.h Index: headers/OGWidget.h ================================================================== --- /dev/null +++ headers/OGWidget.h @@ -0,0 +1,15 @@ +#include + +#import + +@interface OGWidget: OFObject +{ +@public + GtkWidget *widget; +} + +- (void)show; +- (void)hide; +@end + +extern void og_destroy(GtkWidget*, OGWidget*); ADDED headers/OGWindow.h Index: headers/OGWindow.h ================================================================== --- /dev/null +++ headers/OGWindow.h @@ -0,0 +1,22 @@ +#import "OGWidget.h" + +@class OGWindow; + +@protocol OGWindowDelegate +@optional +- (BOOL)windowWillClose: (OGWindow*)window; +@end + +@interface OGWindow: OGWidget +{ + id delegate; +} + +@property (assign) id delegate; +@property (copy) OFString *title; +@property (assign) of_point_t position; +@property (assign) of_dimension_t dimension; + ++ window; +- (void)addChild: (OGWidget*)widget; +@end DELETED test.m Index: test.m ================================================================== --- test.m +++ /dev/null @@ -1,74 +0,0 @@ -#import "OGApplication.h" -#import "OGWindow.h" -#import "OGButton.h" -#import "OGHBox.h" -#import "OGVBox.h" - -@interface Test: OFObject -@end - -OG_APPLICATION_DELEGATE(Test) - -@implementation Test -- (void)applicationDidFinishLaunching -{ - OGWindow *w = [OGWindow window]; - w.title = @"Hallo Welt!"; - w.position = of_point(100, 100); - w.dimension = of_dimension(600, 400); - w.delegate = self; - - OGVBox *vbox = [OGVBox box]; - [w addChild: vbox]; - - OGButton *b = [OGButton button]; - b.label = @"Klick mich!"; - b.delegate = self; - [vbox appendChild: b - expand: YES - fill: YES - padding: 0]; - - OGHBox *hbox = [OGHBox box]; - [vbox appendChild: hbox - expand: NO - fill: NO - padding: 0]; - - OGButton *b1 = [OGButton button]; - b1.label = @"Ich"; - [hbox appendChild: b1 - expand: YES - fill: YES - padding: 0]; - - OGButton *b2 = [OGButton button]; - b2.label = @"mach"; - [hbox appendChild: b2 - expand: YES - fill: YES - padding: 0]; - - OGButton *b3 = [OGButton button]; - b3.label = @"nix"; - [hbox appendChild: b3 - expand: YES - fill: YES - padding: 0]; - - [w show]; -} - -- (BOOL)windowWillClose: (OGWindow*)window -{ - [OGApplication quit]; - - return YES; -} - -- (void)buttonWasClicked: (OGButton*)button -{ - of_log(@"Hallo!"); -} -@end