raven/src/main.cpp

24 lines
636 B
C++
Raw Normal View History

#include <iostream>
2022-03-08 02:25:22 +02:00
#include "Window.hpp"
#include "Widget.hpp"
2022-03-09 20:16:05 +02:00
#include "Button.hpp"
#include "Box.hpp"
int main() {
Raven::Window window {};
2022-03-18 02:49:16 +02:00
Raven::Widget main_widget {};
2022-03-09 20:16:05 +02:00
Raven::Button button {"click me!"};
window.spawn_window();
2022-03-09 20:16:05 +02:00
button.set_current_geometry(Raven::Box(10, 10, 100, 30));
2022-03-18 02:49:16 +02:00
main_widget.set_current_geometry(window.get_current_geometry());
main_widget.set_style_background_fill_color(Raven::RGB(0.9764, 0.9607, 0.8431));
main_widget.set_style_do_background_fill(true);
window.set_main_widget(&main_widget);
main_widget.add_child(&button);
window.run(true);
return 0;
2022-03-08 02:25:22 +02:00
}