things
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@204 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
8c030ba778
commit
7dda33ee1c
22 changed files with 204 additions and 39 deletions
|
|
@ -1,10 +1,43 @@
|
|||
/* $Id$ */
|
||||
#include <MwOO/Base.h>
|
||||
|
||||
MwOOWidget::MwOOWidget(MwClass widget_class, const char* name, MwOOWidget* parent, int x, int y, int w, int h){
|
||||
this->widget = MwCreateWidget(widget_class, name, parent->widget, x, y, w, h);
|
||||
MwOO::Base::Base(MwClass widget_class, const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h){
|
||||
this->widget = MwCreateWidget(widget_class, widget_name, parent == NULL ? NULL : parent->widget, x, y, w, h);
|
||||
if(this->widget != NULL){
|
||||
this->SetHandler();
|
||||
}
|
||||
}
|
||||
|
||||
MwOOWidget::~MwOOWidget(void){
|
||||
MwOO::Base::~Base(void){
|
||||
MwDestroyWidget(this->widget);
|
||||
}
|
||||
|
||||
void MwOO::Base::Loop(void){
|
||||
MwLoop(this->widget);
|
||||
}
|
||||
|
||||
/* BEGIN AUTOGENERATE */
|
||||
static void __OnActivate(MwWidget widget, void* user, void* call){
|
||||
MwOO::Base* c = (MwOO::Base*)user;
|
||||
c->OnActivate(call);
|
||||
}
|
||||
static void __OnResize(MwWidget widget, void* user, void* call){
|
||||
MwOO::Base* c = (MwOO::Base*)user;
|
||||
c->OnResize(call);
|
||||
}
|
||||
static void __OnTick(MwWidget widget, void* user, void* call){
|
||||
MwOO::Base* c = (MwOO::Base*)user;
|
||||
c->OnTick(call);
|
||||
}
|
||||
static void __OnMenu(MwWidget widget, void* user, void* call){
|
||||
MwOO::Base* c = (MwOO::Base*)user;
|
||||
c->OnMenu(call);
|
||||
}
|
||||
|
||||
void MwOO::Base::SetHandler(void){
|
||||
MwAddUserHandler(this->widget, MwNactivateHandler, __OnActivate, this);
|
||||
MwAddUserHandler(this->widget, MwNresizeHandler, __OnResize, this);
|
||||
MwAddUserHandler(this->widget, MwNtickHandler, __OnTick, this);
|
||||
MwAddUserHandler(this->widget, MwNmenuHandler, __OnMenu, this);
|
||||
}
|
||||
/* END AUTOGENERATE */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue