void createComplexUI() {
// Header row
auto headerRow = std::make_shared<RowWidget>(
0, 0, 800, 50,
std::vector<std::shared_ptr<Widget>>{
Text(Point(0, 0), "MyApp", 3, Colors::White),
Button(ButtonConfig(0, 0, 80, 30, "Menu"))
},
MainAxisAlignment::SpaceBetween,
CrossAxisAlignment::Center
);
// Main content column
auto contentColumn = std::make_shared<ColumnWidget>(
0, 50, 800, 500,
std::vector<std::shared_ptr<Widget>>{
Text(Point(0, 0), "Welcome", 4, Colors::White),
SizedBox(0, 20), // Spacing
// More content...
},
true, // fullWidth
MainAxisAlignment::Start,
CrossAxisAlignment::Center
);
// Footer
auto footer = Text(Point(0, 0), "© 2025", 1, Colors::Gray);
// Combine in main column
auto mainLayout = std::make_shared<ColumnWidget>(
0, 0, 800, 600,
std::vector<std::shared_ptr<Widget>>{
headerRow,
contentColumn,
footer
},
true,
MainAxisAlignment::SpaceBetween
);
addWidget(mainLayout);
}