aboutsummaryrefslogtreecommitdiff
path: root/demos/scroll_view/main.cpp
blob: be8bd2287ee8bc66aaa6cc6c548c7d266dd66938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#include "cru/platform/bootstrap/Bootstrap.hpp"
#include "cru/platform/gui/UiApplication.hpp"
#include "cru/ui/controls/ScrollView.hpp"
#include "cru/ui/controls/TextBlock.hpp"
#include "cru/ui/controls/Window.hpp"

using cru::platform::gui::IUiApplication;
using cru::ui::controls::ScrollView;
using cru::ui::controls::TextBlock;
using cru::ui::controls::Window;

int main() {
  IUiApplication* application = cru::platform::bootstrap::CreateUiApplication();

  auto window = Window::Create();

  auto scroll_view = ScrollView::Create();

  window->AddChild(scroll_view, 0);

  auto text_block = TextBlock::Create(
      uR"([Verse 1]
The snow glows white on the mountain tonight
Not a footprint to be seen
A kingdom of isolation
And it looks like I'm the queen
The wind is howling like this swirling storm inside
Couldn't keep it in, Heaven knows I tried

[Pre-Chorus]
Don't let them in, don't let them see
Be the good girl you always have to be
Conceal, don't feel, don't let them know
Well, now they know

[Chorus]
Let it go, let it go
Can't hold it back anymore
Let it go, let it go
Turn away and slam the door
I don't care what they're going to say
Let the storm rage on
The cold never bothered me anyway

[Verse 2]
It's funny how some distance
Makes everything seem small
And the fears that once controlled me
Can't get to me at all

[Pre-Chorus]
It's time to see what I can do
To test the limits and break through
No right, no wrong, no rules for me
I'm free

[Chorus]
Let it go, let it go
I'm one with the wind and sky
Let it go, let it go
You'll never see me cry
Here I stand, and here I'll stay
Let the storm rage on...

[Bridge]
My power flurries through the air into the ground
My soul is spiraling in frozen fractals all around
And one thought crystallizes like an icy blast:
I'm never going back, the past is in the past!

[Chorus]
Let it go, let it go
And I'll rise like the break of dawn
Let it go, let it go
That perfect girl is gone
Here I stand in the light of day
Let the storm rage on!
The cold never bothered me anyway)");

  text_block->SetSelectable(true);

  scroll_view->SetChild(text_block);

  window->Show();

  return application->Run();
}