+++ /dev/null
-package de.unixwork.rssreader
-
-//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
-// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
-fun main() {
- val name = "Kotlin"
- //TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
- // to see how IntelliJ IDEA suggests fixing it.
- println("Hello, " + name + "!")
-
- for (i in 1..5) {
- //TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
- // for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
- println("i = $i")
- }
-}
\ No newline at end of file
--- /dev/null
+package de.unixwork.rssreader
+
+import de.unixwork.ui.Application
+import de.unixwork.ui.Toolkit
+
+class App : Application {
+ override fun startup() {
+ val window = MainWindow()
+ window.show()
+ }
+}
+
+fun main() {
+ Toolkit.init("rssreader")
+ Toolkit.runApplication(App())
+}
--- /dev/null
+package de.unixwork.rssreader
+
+import de.unixwork.ui.SubListItem
+import de.unixwork.ui.UiObject
+import de.unixwork.ui.kotlin.Toplevel
+import de.unixwork.ui.kotlin.sidebarWindow
+
+class MainWindow {
+ val window : Toplevel
+
+ init {
+ window = sidebarWindow("RSS Reader") {
+ sidebar {
+ sourcelist { elm: Object ->
+ val item = SubListItem()
+ item.label = "todo"
+ item
+ }
+ }
+
+ hsplitpane(initialPosition = 300) {
+ vbox {
+ listview<String>(varname = "items", fill = true) { elm, col ->
+ "todo"
+ }
+ }
+
+ vbox {
+ webview(varname = "webview", fill = true)
+ }
+ }
+ }
+ }
+
+ fun show() {
+ window.show()
+ }
+}
\ No newline at end of file