Permalink
Browse files

update name and input map

  • Loading branch information...
ghostandthemachine committed Jun 9, 2012
1 parent 3566148 commit 1d99fecaf825dd860b3b39103e19fc5428258b4d
View
@@ -16,7 +16,7 @@
+ Extract clooj application components from clooj.core and create a new clooj.dev-tools namespace which will contain all of the application components.
+ Update clooj.core to build standard Clooj with simple (create-application) function where the desired components can be added and styled.
-- Create Sketchpad in overtone-sketchpad.core
+- Create Sketchpad in sketchpad.core
+ Use the clooj.dev-tools namespace to create custom Clooj base application as base of Sketchpad
+ Overhaul standard Clooj layout to be more suited to Overtone:
+ Use less real estate by making components collapsible
View
@@ -1,10 +1,10 @@
# Sketchpad
## Getting started
- $ git clone git@github.com:ghostandthemachine/overtone-sketchpad.git
+ $ git clone git@github.com:ghostandthemachine/sketchpad.git
$ git clone git@github.com:overtone/overtone.git
- $ cd overtone-sketchpad
+ $ cd sketchpad
$ lein deps
@@ -19,10 +19,10 @@ example you can evaluate an entire file in the repl by hitting cmd E.
The Overtone Sketchpad is a Google Summer of Code project which aims to create an IDE inspired by [Processing](processing.org) for programming audio with [Clojure](clojure.org) and [Overtone](http://overtone.github.com/). Like Processing, the goal is to create an editor and project management application simple enough for a child to download, load an example, and click run. Beyond that it will provide a centralized UI to incorporate new Overtone GUI elements, manage Overtone projects, live code with repl driven development, and most of all worry about sound design and not platforms, dependencies, and enviroments. The project will be built on top of [Clooj](https://github.com/arthuredelstein/clooj) and [seesaw](https://github.com/daveray/seesaw).
-There is a [wiki](https://github.com/ghostandthemachine/overtone-sketchpad/wiki/Overtone-Sketchpad-Features-and-Design-Wiki) setup for sharing ideas and features so please feel free to jump in the conversation.
+There is a [wiki](https://github.com/ghostandthemachine/sketchpad/wiki/Overtone-Sketchpad-Features-and-Design-Wiki) setup for sharing ideas and features so please feel free to jump in the conversation.
For the most current information on the project check out the project
-[blog](http://ghostandthemachine.github.com/overtone-sketchpad/)
+[blog](http://ghostandthemachine.github.com/sketchpad/)
## License
View
@@ -1,10 +1,11 @@
-(defproject overtone-sketchpad "0.0.1-SNAPSHOT"
+(defproject sketchpad "0.0.1-SNAPSHOT"
:description "A light weight IDE for programming with Overtone and Clojure"
- :main overtone-sketchpad.core
+ :main sketchpad.core
:dependencies [[org.clojure/clojure "1.3.0"]
[overtone "0.6.0"]
[franks42/seesaw "1.4.2-SNAPSHOT"]
[clooj "0.3.4.2-SNAPSHOT"]
- [com.github.insubstantial/substance "7.1"]]
- :jvm-opts ~(if (= (System/getProperty "os.name") "Mac OS X") ["-Xdock:name=Sketchpad"] [])
- )
+ ; [com.github.insubstantial/substance "7.1"]
+ [org.fife.ui/rsyntaxtextarea "2.0.3"]
+ ]
+ :jvm-opts ~(if (= (System/getProperty "os.name") "Mac OS X") ["-Xdock:name=Sketchpad"] []))
@@ -1,152 +0,0 @@
-(ns overtone-sketchpad.core
- (:use [seesaw core graphics color border font]
- [clooj.repl]
- [clooj.help]
- [clooj.utils]
- [clooj.navigate]
- [clooj.doc-browser]
- [clooj.filetree]
- [clooj.menus]
- [clooj.dev-tools]
- [clooj.indent]
- [clojure.pprint]
- [overtone-sketchpad.editor]
- [overtone-sketchpad.popup]
- [overtone-sketchpad.menu])
- (:require [overtone-sketchpad.theme :as theme]))
-
-(def overtone-handlers { :update-caret-position update-caret-position
- :save-caret-position save-caret-position
- :setup-autoindent setup-autoindent
- :switch-repl switch-repl
- :get-selected-projects get-selected-projects
- :apply-namespace-to-repl apply-namespace-to-repl
- :find-file find-file})
-
-(defn create-app []
- (let [app-init (atom {})
- editor (editor app-init)
- file-tree (file-tree app-init)
- repl (repl app-init)
- doc-view (doc-view app-init)
- doc-nav (doc-nav app-init)
- doc-split-pane (left-right-split
- file-tree
- editor
- :divider-location 0.25
- :resize-weight 0.25
- :divider-size 5)
- split-pane (left-right-split
- doc-split-pane
- repl
- :divider-location 0.66
- :resize-weight 0.66
- :divider-size 5)
- frame (frame
- :title "Sketchpad"
- :width 950
- :height 700
- :on-close :exit
- :minimum-size [500 :by 350]
- :content split-pane)
- app (merge {:file (atom nil)
- :repl (atom (create-outside-repl (@app-init :repl-out-writer) nil))
- :changed false}
- @app-init
- overtone-handlers
- (gen-map
- frame
- doc-split-pane
- split-pane))]
- app))
-
-(defn add-behaviors
- [app]
- ;; docs
- (setup-completion-list (app :completion-list) app)
- (setup-tab-help app (app :doc-text-area))
- ;;editor
- (setup-autoindent (app :doc-text-area))
- (doto (app :doc-text-area) attach-navigation-keys)
- (double-click-selector (app :doc-text-area))
- (add-caret-listener (app :doc-text-area) #(display-caret-position app))
- (setup-search-text-area app)
- (activate-caret-highlighter handle-caret-move app :doc-text-area)
- (activate-caret-highlighter handle-caret-move app :repl-in-text-area)
- (setup-temp-writer app)
- (attach-action-keys (app :doc-text-area)
- ["cmd1 ENTER" #(send-selected-to-repl app)])
-
- ; (gutter-popup (app :doc-scroll-pane))
- (setup-text-area-font app)
- (set-text-area-preffs app)
-
- ;; repl
- (setup-autoindent (app :repl-in-text-area))
- (setup-tab-help app (app :repl-in-text-area))
- (add-repl-input-handler app)
- (doto (app :repl-in-text-area)
- double-click-selector
- attach-navigation-keys)
- ;; file tree
- (setup-tree app)
- ;; global
- (add-visibility-shortcut app)
- (dorun (map #(attach-global-action-keys % app)
- [(app :docs-tree)
- (app :doc-text-area)
- (app :repl-in-text-area)
- (app :repl-out-text-area)
- (.getContentPane (app :frame))])))
-
-;; startup
-(defn startup-overtone [app]
- (Thread/setDefaultUncaughtExceptionHandler
- (proxy [Thread$UncaughtExceptionHandler] []
- (uncaughtException [thread exception]
- (println thread) (.printStackTrace exception))))
-
- (doall (map #(add-project app %) (load-project-set)))
- (let [frame (app :frame)]
- (persist-window-shape clooj-prefs "main-window" frame)
- (on-window-activation frame #(update-project-tree (app :docs-tree))))
- (load-font app)
- ;; set theme
- (let [doc-ta (app :doc-text-area)
- repl-in-ta (app :repl-in-text-area)
- repl-out-ta (app :repl-out-text-area)
- theme (theme/theme "src/overtone_sketchpad/themes/dark.xml")]
- (theme/apply! theme doc-ta)
- (theme/apply! theme repl-in-ta)
- (theme/apply! theme repl-out-ta))
- (let [tree (app :docs-tree)]
- (load-expanded-paths tree)
- (load-tree-selection tree))
- (app :frame))
-
-(defonce current-app (atom nil))
-
-(defn -show []
- (reset! embedded false)
- (reset! current-app (create-app))
- (add-behaviors @current-app)
- (create-menubar @current-app)
- (invoke-later
- (->
- (startup-overtone @current-app)
- show!)))
-
-(defn -main [& args]
- (reset! embedded false)
- (reset! current-app (create-app))
- ; (pprint (@current-app :doc-scroll-pane))
- (add-behaviors @current-app)
- (create-menubar @current-app)
- (invoke-later
- (->
- (startup-overtone @current-app)
- show!)))
-
-
-
-
Oops, something went wrong.

0 comments on commit 1d99fec

Please sign in to comment.