2015-01-17 05:52:26 +00:00
[![License ](//img.shields.io/badge/license-LGPL-blue.svg?style=flat )](https://www.gnu.org/licenses/lgpl-3.0.en.html#content)
2015-02-03 13:38:53 +00:00
[![Clojars ](//img.shields.io/badge/clojars-0.1.0--SNAPSHOT-blue.svg?style=flat )](https://clojars.org/clojurefx/versions/0.1.0-SNAPSHOT)
2015-01-17 05:47:39 +00:00
[![Gratipay ](//img.shields.io/gratipay/zilti.svg?style=flat )](//gratipay.com/zilti)
2015-01-17 05:51:16 +00:00
[![Flattr this ](//api.flattr.com/button/flattr-badge-large.png )](https://flattr.com/submit/auto?user_id=zilti& url=https%3A%2F%2Fbitbucket.org%2Fzilti%2Fclojurefx)
2015-01-17 05:47:39 +00:00
2015-01-16 21:41:02 +00:00
# ClojureFX
2015-01-17 03:22:13 +00:00
```clojure
2015-02-03 13:38:53 +00:00
[clojurefx "0.1.0-SNAPSHOT"]
2015-01-17 03:22:13 +00:00
```
2015-01-17 00:01:47 +00:00
2016-01-02 22:08:45 +00:00
**Note: This project is still maintained. Miss a feature, found a bug? Open a ticket, and I'll fix and improve it.**
2015-01-16 21:51:01 +00:00
2015-01-16 21:43:33 +00:00
A Clojure extension to make working with [JavaFX ](http://download.java.net/jdk8/jfxdocs/index.html ) simpler and more idiomatic. It allows you to naturally work with stock JavaFX components through use of extended protocols. Should a feature be missing you can easily extend ClojureFX in your own codebase or just fall back to standard JavaFX methods.
2015-01-16 21:41:02 +00:00
## Features
2015-01-17 06:16:06 +00:00
This is in a very early state, so there isn't much yet. Take a look at the [ClojureFX wiki ](https://bitbucket.org/zilti/clojurefx/wiki/Home ).
* Declarative EDN GUI structure compilation
* FXML loading and scripting
2015-01-19 15:07:51 +00:00
* Simplified event binding (bind a Clojure function to an event trigger)
2015-01-17 06:16:06 +00:00
* Turn a scene graph into a flat id-node-map and/or get nodes by id out of a scene graph
2015-01-16 21:41:02 +00:00
### Declarative UI programming
```clojure
2015-01-19 14:19:19 +00:00
(def superbutton (compile [Button {:text "Close"
:action #'close-handler}]))
2015-01-16 21:41:02 +00:00
(compile [VBox {:id "TopLevelVBox"
:children [Label {:text "Hi!"}
Label {:text "I'm ClojureFX!"}
HBox {:id "HorizontalBox"
2015-01-19 14:19:19 +00:00
:children [Button {:text "OK"}
superbutton]}]}])
2016-01-02 22:08:45 +00:00
```