This commit is contained in:
Nishi 2026-04-17 19:42:14 +09:00
commit ae7df4cb63
Signed by: nishi
GPG key ID: 27EF69B208EB9343
52 changed files with 1818 additions and 39 deletions

37
test.cxx Normal file
View file

@ -0,0 +1,37 @@
#include <MwCXX/Core.h>
#include <MwCXX/Widget/Window.h>
#include <MwCXX/Widget/Button.h>
#include <iostream>
class MyButton : public MwCXX::Button {
protected:
void OnActivate() {
std::cout << "Hello" << std::endl;
}
public:
MWCXX_CONSTRUCTOR(MyButton, MwCXX::Button) {
this->SetText("Hello, world!");
}
};
class MyWindow : public MwCXX::Window {
private:
MyButton* epic;
public:
MWCXX_CONSTRUCTOR(MyWindow, MwCXX::Window) {
this->epic = new MyButton("epic app", this, 10, 10, 640 - 10 * 2, 480 - 10 * 2);
}
};
int main() {
MyWindow* wnd;
MwCXX::Init();
wnd = new MyWindow("epic app", NULL, MwDEFAULT, MwDEFAULT, 640, 480);
wnd->Loop();
}