add joke example program
This commit is contained in:
parent
b0315b76be
commit
a1f544ae82
1 changed files with 5 additions and 12 deletions
17
src/main.cpp
17
src/main.cpp
|
@ -23,18 +23,11 @@ int main() {
|
|||
auto main_widget = window.set_main_widget<Raven::Widget>();
|
||||
main_widget->set_layout<Raven::VerticalBoxLayout>(6.0);
|
||||
|
||||
auto scroll_container = main_widget->add<Raven::ScrollContainer>();
|
||||
scroll_container->set_scroll(Raven::Point(0, 0));
|
||||
scroll_container->resize_fixed(100, 100);
|
||||
scroll_container->set_style(&Raven::accent_widget_style);
|
||||
|
||||
auto target = scroll_container->make_target();
|
||||
target->set_layout<Raven::DocumentLayout>(6.0);
|
||||
|
||||
auto hello_button = target->add<Raven::Button>("hello");
|
||||
hello_button->set_style(&Raven::accent_button_style);
|
||||
auto bye_button = target->add<Raven::Button>("bye");
|
||||
bye_button->set_style(&Raven::accent_button_style);
|
||||
auto compile_button = main_widget->add<Raven::Button>("compile and run program");
|
||||
compile_button->set_style(&Raven::accent_button_style);
|
||||
compile_button->on_click = []() {
|
||||
system("./compile.sh");
|
||||
};
|
||||
|
||||
window.run(true);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue