Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ASDF-ification.

  • Loading branch information...
commit 067d1b1eb0c1228f73a6f249c28db7441be6e9af 1 parent 99061b4
Jesse Alama authored
Showing with 79 additions and 14 deletions.
  1. +38 −0 application.lisp
  2. +7 −0 packages.lisp
  3. +17 −14 tabs.lisp
  4. +17 −0 ucw-sandbox.asd
View
38 application.lisp
@@ -0,0 +1,38 @@
+
+(in-package :ucw-sandbox)
+
+;;; server configuration
+
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (defparameter *sandbox-server-port* 8001))
+
+(defun make-sandbox-backend ()
+ (make-backend
+ :httpd
+ :host "127.0.0.1"
+ :port *sandbox-server-port*))
+
+(defun make-sandbox-server ()
+ (make-instance
+ 'standard-server
+ :backend (make-sandbox-backend)))
+
+(defvar *sandbox-server* (make-sandbox-server))
+
+(defun startup-sandbox-server ()
+ (startup-server *sandbox-server*))
+
+(defun shutdown-sandbox-server ()
+ (shutdown-server *sandbox-server*))
+
+(defclass sandbox-application (standard-application)
+ ()
+ (:default-initargs
+ :url-prefix "/"
+ :debug-on-error nil))
+
+(defvar *sandbox-application* (make-instance 'sandbox-application))
+
+(register-application *sandbox-server* *sandbox-application*)
+
+;;; application.lisp ends here
View
7 packages.lisp
@@ -0,0 +1,7 @@
+
+(in-package :cl-user)
+
+(defpackage :ucw-sandbox
+ (:use :cl :ucw :ucw-core))
+
+;;; packages.lisp ends here
View
31 tabs.lisp
@@ -1,27 +1,30 @@
-(in-package :dialogues)
+(in-package :ucw-sandbox)
-(defcomponent dialogue-frontend-about-page ()
+;;; tab components
+
+(defcomponent tab-window (standard-window-component)
+ ()
+ (:default-initargs
+ :body (make-instance 'tabbed-pane
+ :current-component-key 'about
+ :contents `((about . ,(make-instance 'about-page))
+ (play . ,(make-instance 'game-page))))))
+
+(defcomponent about-page ()
())
-(defmethod render ((self dialogue-frontend-about-page))
+(defmethod render ((self about-page))
(<:p "this is the about page"))
-(defcomponent dialogue-frontend-game-page ()
+(defcomponent game-page ()
())
-(defmethod render ((self dialogue-frontend-game-page))
+(defmethod render ((self game-page))
(<:p "this is the game page"))
-(defentry-point "test3" (:application *dialogue-application*)
- ()
- (call 'dialogue-frontend-window))
-
-(defentry-point "test2" (:application *dialogue-application*)
+(defentry-point "tab-test" (:application *sandbox-application*)
()
- (make-instance 'dialogue-frontend-pane
- :current-component-key 'about
- :contents `((about . ,(make-instance 'dialogue-frontend-about-page))
- (play . ,(make-instance 'dialogue-frontend-game-page)))))
+ (call 'tab-window))
;;; tabs.lisp ends here
View
17 ucw-sandbox.asd
@@ -0,0 +1,17 @@
+
+(in-package :cl-user)
+
+(defpackage :ucw-sandbox-asd
+ (:use :cl :asdf))
+
+(in-package :ucw-sandbox-asd)
+
+(defsystem :ucw-sandbox
+ :description "A pile of UCW hacks, so I can learn this beast."
+ :author "Jesse Alama <jesse.alama@gmail.com>"
+ :maintainer "Jesse Alama <jesse.alama@gmail.com>"
+ :serial t
+ :depends-on (:ucw)
+ :components ((:file "packages")
+ (:file "application")
+ (:file "tabs")))
Please sign in to comment.
Something went wrong with that request. Please try again.