mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-23 01:24:11 +00:00
update c++ binding
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@265 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -14,18 +14,22 @@ class Base {
|
|||||||
MwWidget widget;
|
MwWidget widget;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
int can_be_gc;
|
||||||
void SetHandler(void);
|
void SetHandler(void);
|
||||||
|
Base(MwWidget widget, int gc = 0);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Loop(void);
|
MwOO::Base MessageBox(const char* title, const char* text, unsigned int flags);
|
||||||
void SetX(int value);
|
MwOO::Base MessageBoxGetChild(int num);
|
||||||
void SetY(int value);
|
void Loop(void);
|
||||||
void SetWidth(int value);
|
void SetX(int value);
|
||||||
void SetHeight(int value);
|
void SetY(int value);
|
||||||
int GetX(void);
|
void SetWidth(int value);
|
||||||
int GetY(void);
|
void SetHeight(int value);
|
||||||
int GetWidth(void);
|
int GetX(void);
|
||||||
int GetHeight(void);
|
int GetY(void);
|
||||||
|
int GetWidth(void);
|
||||||
|
int GetHeight(void);
|
||||||
/* BEGIN AUTOGENERATE */
|
/* BEGIN AUTOGENERATE */
|
||||||
virtual void OnActivate(void*) {};
|
virtual void OnActivate(void*) {};
|
||||||
virtual void OnResize(void*) {};
|
virtual void OnResize(void*) {};
|
||||||
|
|||||||
@@ -3,13 +3,32 @@
|
|||||||
|
|
||||||
MwOO::Base::Base(MwClass widget_class, const char* widget_name, MwOO::Base* parent, int x, int y, int w, int 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);
|
this->widget = MwCreateWidget(widget_class, widget_name, parent == NULL ? NULL : parent->widget, x, y, w, h);
|
||||||
|
this->can_be_gc = 1;
|
||||||
if(this->widget != NULL){
|
if(this->widget != NULL){
|
||||||
this->SetHandler();
|
this->SetHandler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MwOO::Base::Base(MwWidget widget, int gc){
|
||||||
|
this->widget = widget;
|
||||||
|
this->can_be_gc = gc;
|
||||||
|
this->SetHandler();
|
||||||
|
}
|
||||||
|
|
||||||
MwOO::Base::~Base(void){
|
MwOO::Base::~Base(void){
|
||||||
MwDestroyWidget(this->widget);
|
if(this->can_be_gc) MwDestroyWidget(this->widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
MwOO::Base MwOO::Base::MessageBox(const char* title, const char* text, unsigned int flags){
|
||||||
|
MwWidget widget = MwMessageBox(this->widget, title, text, flags);
|
||||||
|
|
||||||
|
return MwOO::Base(widget, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
MwOO::Base MwOO::Base::MessageBoxGetChild(int num){
|
||||||
|
MwWidget widget = MwMessageBoxGetChild(this->widget, num);
|
||||||
|
|
||||||
|
return MwOO::Base(widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MwOO::Base::Loop(void){
|
void MwOO::Base::Loop(void){
|
||||||
|
|||||||
Reference in New Issue
Block a user