-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0021_Simple_application_code_ui.kt
43 lines (41 loc) · 1.35 KB
/
0021_Simple_application_code_ui.kt
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
package proto;
import org.rubber.framework.*;
import org.rubber.framework.yaml.*;
import org.rubber.framework.css.*;
import org.rubber.framework.ui.*;
import org.rubber.framework.window.*;
import org.rubber.framework.data.*;
import org.rubber.framework.input.*;
fun main(args: Array<String>) {
Application(
PrimaryMonitor(
Monitors(),
Window(
WindowCenterPos(),
WindowAutoSize(),
WindowTitle("Hello World!"),
Root(
Component(
Content(
FlexBox(
TextBlock(
StyleId("text"),
Text("Count: {}"),
FormattingBinding { listOf(vm.count) }
),
Button(
StyleId("increment"),
Text("increment"),
CommandBinding { vm.increment }
)
)
),
Stylesheet("home.css"),
HomeViewModel()
)
)
)
),
ApplicationArgs(args)
).go();
}