A Clojure library designed to allow opening HTML windows from Clojure.
Find a file
2019-08-03 09:45:16 +01:00
doc Corrected minor documentation and license detail 2019-06-15 13:47:02 +01:00
src/swingbox_clj Added scroll bars 2019-08-03 09:45:16 +01:00
test/swingbox_clj Added unit tests 2019-06-15 14:18:56 +01:00
.gitignore Added files 2019-06-15 13:42:11 +01:00
CHANGELOG.md Added files 2019-06-15 13:42:11 +01:00
LICENSE Initial commit 2019-06-15 13:39:18 +01:00
project.clj lein-release plugin: preparing 0.1.0 release 2019-06-15 14:22:31 +01:00
README.md Corrected minor documentation and license detail 2019-06-15 13:47:02 +01:00

swingbox-clj

A Clojure library designed to allow opening HTML windows from Clojure.

Rationale

It's pretty hard to visualise data or create desktop UI components for Clojure applications. This is part of an exploration to see whether an HTML component can help.

There is a supposedly open source Java wrapper for chromium, java-cef, but it doesn't build (for me, following the instructions, although it does appear to be under current development); There's another that's commercial, jxbrowser but it isn't useful when trying to develop open source components. SwingBox is pure Java and open source so I thought it worth playing with.

This is simple and within limitations works. The browser isn't live (at least not at this stage), clicking links does not work and does not reload pages. Also, JavaScript is not interpreted.

Usage

(show-in-window "From a string" "Hello")

(show-in-window "From the tinkerweb" "https://www.journeyman.cc/~simon/")

(show-in-window "From Hiccup" [:html [:head [:title "Test from Hiccup"]][:body [:h1 "Excuse me"] [:p "This is hiccup"]]])

(set-visible (set-content-markdown (create-window "From a Markdown file") "README.md"))

License

Copyright © 2019 FIXME

Distributed under the GNU Lesser General Public Licence 3.0 or (at your option) any later version, following the license of SwingBox.