// // Created by Administrator on 25-2-26. // #include "mirage.h" #include "core/window/mwindow.h" #include "widget/compound_widget/mbutton.h" #include "widget/panel_widget/mbox.h" int main(int argc, char* argv[]) { mirage_app app; app.init(); auto window = std::make_shared(); window->create_window(800, 600, L"Hello, World!"); window->show(); mirage_app::get_render_context()->setup_surface(window.get()); auto border = std::make_shared(); auto h_box = std::make_shared(); window->set_content(h_box); auto v_box = std::make_shared(); v_box->add_slot() .auto_size() .margin({ 5 }) [ std::make_shared() ]; v_box->add_slot() .stretch() .margin({ 5 }) [ std::make_shared() ]; v_box->add_slot() .auto_size() .margin({ 5 }) [ std::make_shared() ]; h_box->add_slot() .auto_size() .margin({ 5 }) [ std::make_shared() ]; h_box->add_slot() .auto_size() .margin({ 5 }) [ std::make_shared() ]; h_box->add_slot() .auto_size() .margin({ 5 }) [ std::make_shared() ]; h_box->add_slot() .stretch() [ v_box ]; h_box->add_slot() .stretch() .margin({ 5 }) [ std::make_shared() ]; app.run(); return 0; }