aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 264b3c7c..359b511b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -87,6 +87,8 @@ int APIENTRY wWinMain(
//test 2
+ Window child_window(&window);
+
const auto layout = CreateWithLayout<LinearLayout>(LayoutSideParams::Exactly(500), LayoutSideParams::Content());
layout->mouse_click_event.AddHandler([layout](cru::ui::events::MouseButtonEventArgs& args)
@@ -114,7 +116,11 @@ int APIENTRY wWinMain(
{
const auto button = Button::Create();
button->GetLayoutParams()->padding = Thickness(20, 5);
- button->AddChild(TextBlock::Create(L"button"));
+ button->AddChild(TextBlock::Create(L"Show child window."));
+ button->mouse_click_event.AddHandler([&child_window](auto)
+ {
+ child_window.Show();
+ });
layout->AddChild(button);
}
@@ -170,6 +176,7 @@ int APIENTRY wWinMain(
window.AddChild(linear_layout);
*/
+
window.Show();
return application.Run();