Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 79 lines (53 sloc) 3.807 kb
c4fbc21 @daveray notes
authored
1 _Note that current development is on the *develop* branch, not master_
2
426da21 @daveray fix link. :(
authored
3 There's now a [Google Group] (https://groups.google.com/group/seesaw-clj) for discussion and questions.
39c617f @daveray Note google group.
authored
4
7df6864 @daveray Update readme a bit
authored
5 [Here's a brief tutorial] (https://gist.github.com/1441520) that covers some Seesaw basics. It assumes no knowledge of Swing or Java.
6
6a9c005 @daveray Update readme
authored
7 # Seesaw: Clojure + UI
cdb4045 @daveray readme and various cleanup
authored
8
31cbcf0 @Domon Fix a small typo in README.md
Domon authored
9 _*See [the Seesaw Wiki] (https://github.com/daveray/seesaw/wiki) and [the Seesaw API Docs] (http://daveray.github.com/seesaw/) for more detailed docs. Note that the docs in the code (use the `doc` function!) are always the most up-to-date and trustworthy.*_
a6ab8dd @daveray Update README.md
authored
10 t
6a9c005 @daveray Update readme
authored
11 Seesaw is a library/DSL for constructing user interfaces in Clojure. It happens to be built on Swing, but please don't hold that against it. It's an experiment to see what I can do to make user interface development funner in Clojure. It's kinda inspired by [Shoes](http://shoesrb.com/), [Stuart Sierra's Swing posts](http://stuartsierra.com/tag/swing), etc. [clojure.contrib.swing-utils](http://richhickey.github.com/clojure-contrib/swing-utils-api.html) is useful, but minimal and still means a lot of "Java-in-Clojure" coding.
cdb4045 @daveray readme and various cleanup
authored
12
a6ab8dd @daveray Update README.md
authored
13 ## Features
14
7df6864 @daveray Update readme a bit
authored
15 Seesaw is compatible with both Clojure 1.2 and 1.3.
16
38b0ed2 @daveray links
authored
17 * [Construct widgets](https://github.com/daveray/seesaw/wiki/Widgets) with simple functions, e.g. `(listbox :model (range 100))`
bf1ddd6 @daveray Update README.md
authored
18 * Support for all of Swing's built-in widgets as well as SwingX.
38b0ed2 @daveray links
authored
19 * Support for all of Swing's layout managers as well as MigLayout, and JGoodies Forms
bf1ddd6 @daveray Update README.md
authored
20 * Convenient shortcuts for most properties. For example, `:background :blue` or `:background "#00f"`, or `:size [640 :by 480]`.
38b0ed2 @daveray links
authored
21 * [CSS-style selectors](https://github.com/daveray/seesaw/wiki/Selectors) with same syntax as [Enlive](https://github.com/cgrand/enlive).
22 * Unified, extensible [event API](https://github.com/daveray/seesaw/wiki/Handling-events)
23 * Unified, extensible [selection API](https://github.com/daveray/seesaw/wiki/Handling-selection)
24 * [Widget binding](http://blog.darevay.com/2011/07/seesaw-widget-binding/), i.e. map changes from one widget into one or more others in a more functional style. Also integrates with Clojure's reference types.
25 * [Graphics](https://github.com/daveray/seesaw/wiki/Graphics)
26 * [i18n](https://github.com/daveray/seesaw/wiki/Resource-bundles-and-i18n)
27 * An extensive [test suite](https://github.com/daveray/seesaw/tree/master/test/seesaw/test)
a6ab8dd @daveray Update README.md
authored
28
29 _There are numerous Seesaw examples in [test/seesaw/test/examples](https://github.com/daveray/seesaw/tree/master/test/seesaw/test/examples)._
e5e53e5 @daveray Moved most stuff over to the wiki. README was getting unwieldy.
authored
30
97c54c9 @daveray Lein getting started...
authored
31 ## TL;DR
32
33 Here's how you use Seesaw with [Leiningen] (https://github.com/technomancy/leiningen)
34
35 Install `lein` as described and then:
36
37 $ lein new hello-seesaw
38 $ cd hello-seesaw
39
40 Add Seesaw to `project.clj`
41
42 (defproject hello-seesaw "1.0.0-SNAPSHOT"
43 :description "FIXME: write"
7df6864 @daveray Update readme a bit
authored
44 :dependencies [[org.clojure/clojure "1.3.0"]
fb20cba @daveray Doc updates
authored
45 [seesaw "x.y.z"]])
bfe3669 @daveray Figuring out this whole versioning/release process.
authored
46
fb20cba @daveray Doc updates
authored
47 _Replace the Seesaw version with whatever the latest version tag is. See below!_
97c54c9 @daveray Lein getting started...
authored
48
49 Now edit the generated `src/hello_seesaw/core.clj` file:
50
51 (ns hello-seesaw.core
52 (:use seesaw.core))
53
54 (defn -main [& args]
55 (invoke-later
22e5e67 @daveray update readme
authored
56 (-> (frame :title "Hello",
97c54c9 @daveray Lein getting started...
authored
57 :content "Hello, Seesaw",
22e5e67 @daveray update readme
authored
58 :on-close :exit)
59 pack!
60 show!)))
97c54c9 @daveray Lein getting started...
authored
61
62 Now run it:
63
64 $ lein run -m hello-seesaw.core
65
807577e @daveray Seesaw doesn't seem so experimental anymore.
authored
66 *NOTE:* Here's how you can run against the bleeding edge of Seesaw:
4b13830 @daveray add a note about bleeding edge
authored
67
d0962ce @daveray Mention dev branch
authored
68 * Clone Seesaw from github. Fork if you like. *Switch to the "develop" branch.*
4b13830 @daveray add a note about bleeding edge
authored
69 * In your Seesaw checkout, run `lein install` to build it
70 * In your project's `project.clj` file, change the Seesaw version to `X.Y.Z-SNAPSHOT` to match whatever's in Seesaw's `project.clj`.
71 * Run `lein deps`
72 * Move along
97c54c9 @daveray Lein getting started...
authored
73
cdb4045 @daveray readme and various cleanup
authored
74 ## License
75
76 Copyright (C) 2011 Dave Ray
77
78 Distributed under the Eclipse Public License, the same as Clojure.
Something went wrong with that request. Please try again.