git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@203 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-07 11:04:51 +00:00
parent 9f2efd4771
commit 8c030ba778
12 changed files with 13 additions and 24 deletions

View File

@@ -6,11 +6,10 @@
class MwOOWidget {
protected:
MwClass widget_class = NULL;
MwWidget widget;
public:
MwOOWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h);
MwOOWidget(MwClass widget_class, const char* name, MwOOWidget* parent, int x, int y, int w, int h);
~MwOOWidget(void);
};

View File

@@ -1,8 +1,8 @@
/* $Id$ */
#include <MwOO/Base.h>
MwOOWidget::MwOOWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h){
this->widget = MwCreateWidget(this->widget_class, name, parent->widget, x, y, w, 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);
}
MwOOWidget::~MwOOWidget(void){

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/Button.h>
#include <Mw/Widget/Button.h>
MwOOButtonWidget::MwOOButtonWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwButtonClass;
MwOOButtonWidget::MwOOButtonWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwButtonClass, name, parent, x, y, w, h){
}

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/Frame.h>
#include <Mw/Widget/Frame.h>
MwOOFrameWidget::MwOOFrameWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwFrameClass;
MwOOFrameWidget::MwOOFrameWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwFrameClass, name, parent, x, y, w, h){
}

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/Image.h>
#include <Mw/Widget/Image.h>
MwOOImageWidget::MwOOImageWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwImageClass;
MwOOImageWidget::MwOOImageWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwImageClass, name, parent, x, y, w, h){
}

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/Menu.h>
#include <Mw/Widget/Menu.h>
MwOOMenuWidget::MwOOMenuWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwMenuClass;
MwOOMenuWidget::MwOOMenuWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwMenuClass, name, parent, x, y, w, h){
}

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/OpenGL.h>
#include <Mw/Widget/OpenGL.h>
MwOOOpenGLWidget::MwOOOpenGLWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwOpenGLClass;
MwOOOpenGLWidget::MwOOOpenGLWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwOpenGLClass, name, parent, x, y, w, h){
}

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/ScrollBar.h>
#include <Mw/Widget/ScrollBar.h>
MwOOScrollBarWidget::MwOOScrollBarWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwScrollBarClass;
MwOOScrollBarWidget::MwOOScrollBarWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwScrollBarClass, name, parent, x, y, w, h){
}

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/SubMenu.h>
#include <Mw/Widget/SubMenu.h>
MwOOSubMenuWidget::MwOOSubMenuWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwSubMenuClass;
MwOOSubMenuWidget::MwOOSubMenuWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwSubMenuClass, name, parent, x, y, w, h){
}

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/Vulkan.h>
#include <Mw/Widget/Vulkan.h>
MwOOVulkanWidget::MwOOVulkanWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwVulkanClass;
MwOOVulkanWidget::MwOOVulkanWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwVulkanClass, name, parent, x, y, w, h){
}

View File

@@ -2,6 +2,5 @@
#include <MwOO/Widget/Window.h>
#include <Mw/Widget/Window.h>
MwOOWindowWidget::MwOOWindowWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){
this->widget_class = MwWindowClass;
MwOOWindowWidget::MwOOWindowWidget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(MwWindowClass, name, parent, x, y, w, h){
}

View File

@@ -37,9 +37,8 @@ foreach my $f (@files) {
print(OUT "#include <Mw/Widget/$name.h>\n");
print(OUT "\n");
print(OUT
"MwOO${name}Widget::MwOO${name}Widget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(name, parent, x, y, w, h){\n"
"MwOO${name}Widget::MwOO${name}Widget(const char* name, MwOOWidget* parent, int x, int y, int w, int h) : MwOOWidget(Mw${name}Class, name, parent, x, y, w, h){\n"
);
print(OUT " this->widget_class = Mw${name}Class;\n");
print(OUT "}\n");
close(OUT);