#include "Label.hpp" #include "Window.hpp" #include "Widget.hpp" #include "Button.hpp" #include "Box.hpp" #include "Label.hpp" #include "Layout.hpp" #include "src/DocumentLayout.hpp" #include #include #include int main() { Raven::Window window {}; auto main_widget = window.set_main_widget(); main_widget->set_layout(6.0); int number = 0; for (int i = 0; i < 100; i++) { auto button = main_widget->add("0"); button->on_click = [&]() { number++; for (auto& c : main_widget->children()) { if (c->type() == Raven::WidgetType::Button) { auto button_child = std::static_pointer_cast(c); button_child->set_text(std::to_string(number)); } } }; } window.spawn_window(); window.run(true); return 0; }