From: Olaf Wintermann Date: Tue, 15 Jul 2025 18:30:30 +0000 (+0200) Subject: rss reader gui prototype X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=1bfe437ac48702b4b64af05bb078ad4e9870b6c8;p=rssreader.git rss reader gui prototype --- diff --git a/rss-application/src/main/kotlin/Main.kt b/rss-application/src/main/kotlin/Main.kt deleted file mode 100644 index 4e66522..0000000 --- a/rss-application/src/main/kotlin/Main.kt +++ /dev/null @@ -1,16 +0,0 @@ -package de.unixwork.rssreader - -//TIP To Run code, press or -// click the icon in the gutter. -fun main() { - val name = "Kotlin" - //TIP Press 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 to start debugging your code. We have set one breakpoint - // for you, but you can always add more by pressing . - println("i = $i") - } -} \ No newline at end of file diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/App.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/App.kt new file mode 100644 index 0000000..4d1b0a5 --- /dev/null +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/App.kt @@ -0,0 +1,16 @@ +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()) +} diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt new file mode 100644 index 0000000..4bab4e9 --- /dev/null +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt @@ -0,0 +1,38 @@ +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(varname = "items", fill = true) { elm, col -> + "todo" + } + } + + vbox { + webview(varname = "webview", fill = true) + } + } + } + } + + fun show() { + window.show() + } +} \ No newline at end of file