aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-04-19 19:54:44 +0800
committercrupest <crupest@outlook.com>2020-04-19 19:54:44 +0800
commit494d2db1c1203acc9d9f2b127b75c6df6160057a (patch)
treea0e4eaf7540ac4af3b50baf085113122ef2ca651 /src/main.cpp
parent76f62be24b7e612b1f6880f9d7b0ddc07a8d38eb (diff)
downloadcru-494d2db1c1203acc9d9f2b127b75c6df6160057a.tar.gz
cru-494d2db1c1203acc9d9f2b127b75c6df6160057a.tar.bz2
cru-494d2db1c1203acc9d9f2b127b75c6df6160057a.zip
...
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/main.cpp b/src/main.cpp
deleted file mode 100644
index 0172838e..00000000
--- a/src/main.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "cru/platform/heap_debug.hpp"
-#include "cru/platform/native/window.hpp"
-#include "cru/ui/controls/button.hpp"
-#include "cru/ui/controls/flex_layout.hpp"
-#include "cru/ui/controls/stack_layout.hpp"
-#include "cru/ui/controls/text_block.hpp"
-#include "cru/ui/ui_host.hpp"
-#include "cru/ui/window.hpp"
-#include "cru/win/native/ui_application.hpp"
-
-using cru::platform::native::win::WinUiApplication;
-using cru::ui::Rect;
-using cru::ui::Thickness;
-using cru::ui::Window;
-using cru::ui::controls::Button;
-using cru::ui::controls::FlexLayout;
-using cru::ui::controls::StackLayout;
-using cru::ui::controls::TextBlock;
-
-int main() {
-#ifdef CRU_DEBUG
- cru::platform::SetupHeapDebug();
-#endif
-
- std::unique_ptr<WinUiApplication> application =
- std::make_unique<WinUiApplication>();
-
- const auto window = Window::CreateOverlapped();
-
- const auto flex_layout = FlexLayout::Create();
-
- window->SetChild(flex_layout);
-
- const auto button = Button::Create();
- const auto text_block1 = TextBlock::Create();
- text_block1->SetText("Hello World!");
- button->SetChild(text_block1);
- flex_layout->AddChild(button, 0);
-
- const auto text_block2 = TextBlock::Create();
- text_block2->SetText("Hello World!");
-
- const auto text_block3 = TextBlock::Create();
- text_block3->SetText("Overlapped text");
-
- const auto stack_layout = StackLayout::Create();
- stack_layout->AddChild(text_block2, 0);
- stack_layout->AddChild(text_block3, 1);
- flex_layout->AddChild(stack_layout, 1);
-
- const auto text_block4 = TextBlock::Create();
- text_block4->SetText("Hello World!!!");
- flex_layout->AddChild(text_block4, 2);
-
- window->GetUiHost()->GetNativeWindowResolver()->Resolve()->SetVisible(true);
-
- return application->Run();
-}