[gsharp-cvs] CVS update: gsharp/gui.lisp gsharp/modes.lisp gsharp/packages.lisp gsharp/score-pane.lisp gsharp/system.lisp
Robert Strandh
rstrandh at common-lisp.net
Mon Jul 25 09:52:15 UTC 2005
Update of /project/gsharp/cvsroot/gsharp
In directory common-lisp.net:/tmp/cvs-serv18111
Modified Files:
gui.lisp modes.lisp packages.lisp score-pane.lisp system.lisp
Log Message:
Climacs is now an ESA (Emacs-style application) using the new package that
was abstracted out of Climacs.
Date: Mon Jul 25 11:52:14 2005
Author: rstrandh
Index: gsharp/gui.lisp
diff -u gsharp/gui.lisp:1.18 gsharp/gui.lisp:1.19
--- gsharp/gui.lisp:1.18 Sun Aug 15 17:49:41 2004
+++ gsharp/gui.lisp Mon Jul 25 11:52:14 2005
@@ -9,81 +9,56 @@
(defvar *gsharp-frame* nil)
-(defparameter *kbd-macro-recording-p* nil)
-(defparameter *kbd-macro-funs* '())
-
-(defparameter *accumulated-keys* '())
(defparameter *modes* (list *melody-layer-mode-table* *global-mode-table*))
-(defparameter *last-character* nil)
-(defmethod dispatch-event :around ((pane score-pane:score-pane) (event key-press-event))
- (when (or (keyboard-event-character event) (keyboard-event-key-name event))
- (let ((key (list (or (keyboard-event-character event) (keyboard-event-key-name event))
- (event-modifier-state event))))
- (setf *accumulated-keys* (append *accumulated-keys* (list key)))
- (setf *last-character* (char-to-unicode (car key)))
- (let (dico)
- (cond ((and (setf dico (find t *modes*
- :key (lambda (x)
- (multiple-value-bind (value exists-p prefix-p)
- (dico-object x *accumulated-keys*)
- (declare (ignore value prefix-p))
- exists-p))))
- (or (functionp (dico-object dico *accumulated-keys*))
- (fboundp (dico-object dico *accumulated-keys*))))
- (let ((command (dico-object dico *accumulated-keys*)))
- (when *kbd-macro-recording-p* (push command *kbd-macro-funs*))
- (handler-case (funcall command)
- (gsharp-condition (condition) (format *error-output* "~a~%" condition))))
- (setf *accumulated-keys* '()))
- ((setf dico (find-if (lambda (x)
- (multiple-value-bind (value exists-p prefix-p)
- (dico-object x *accumulated-keys*)
- (declare (ignore value exists-p))
- prefix-p))
- *modes*))
- nil)
- (t (format *error-output* "no command for ~a~%" *accumulated-keys*)
- (setf *accumulated-keys* '())
- (when *kbd-macro-recording-p* (setf *kbd-macro-funs* '()
- *kbd-macro-recording-p* nil)))))
- (redisplay-frame-panes *gsharp-frame*))))
+(defclass gsharp-minibuffer-pane (minibuffer-pane)
+ ()
+ (:default-initargs
+ :height 20 :max-height 20 :min-height 20))
+
+(define-command-table total-melody-table
+ :inherit-from (melody-table global-gsharp-table))
-(define-application-frame gsharp ()
+(define-application-frame gsharp (standard-application-frame
+ esa-frame-mixin)
((buffer :initarg :buffer :accessor buffer)
(cursor :initarg :cursor :accessor cursor)
(input-state :initarg :input-state :accessor input-state))
(:menu-bar menubar-command-table :height 25)
(:pointer-documentation t)
(:panes
- (score (make-pane 'score-pane:score-pane
- :width 700 :height 900
- :name "score"
- :display-time :no-clear
- :display-function 'display-score))
+ (score (let ((win (make-pane 'score-pane:score-pane
+ :width 400 :height 500
+ :name "score"
+ :display-time :no-clear
+ :display-function 'display-score
+ :command-table 'total-melody-table)))
+ (setf (windows *application-frame*) (list win))
+ win))
(state (make-pane 'score-pane:score-pane
:width 50 :height 200
:name "state"
:display-function 'display-state))
(element (make-pane 'score-pane:score-pane
- :width 50 :height 700
+ :width 50 :height 300
:min-height 100 :max-height 20000
:name "element"
:display-function 'display-element))
- (interactor :interactor :height 100 :min-height 50 :max-height 200))
+ (interactor (make-pane 'gsharp-minibuffer-pane :width 900)))
(:layouts
(default
(vertically ()
(horizontally ()
- (scrolling (:width 750 :height 900
+ (scrolling (:width 750 :height 500
:min-height 400 :max-height 20000)
score)
(vertically ()
(scrolling (:width 80 :height 200) state)
- (scrolling (:width 80 :height 700
- :min-height 400 :max-height 20000)
+ (scrolling (:width 80 :height 300
+ :min-height 300 :max-height 20000)
element)))
- interactor))))
+ interactor)))
+ (:top-level (esa-top-level)))
(defmethod execute-frame-command :around ((frame gsharp) command)
(handler-case (call-next-method)
@@ -632,7 +607,7 @@
#-(or cmu sbcl)
(error "write compatibility layer for RUN-PROGRAM")))
-(defun run-gsharp ()
+(defun run-gsharp (&key (width 900) (height 600))
(let* ((buffer (make-initialized-buffer))
(staff (car (staves buffer)))
(input-state (make-input-state))
@@ -640,7 +615,8 @@
(let ((*gsharp-frame* (make-application-frame 'gsharp
:buffer buffer
:input-state input-state
- :cursor cursor)))
+ :cursor cursor
+ :width width :height height)))
(setf (staves (car (layers (car (segments buffer))))) (list staff))
(run-frame-top-level *gsharp-frame*))))
@@ -1213,21 +1189,6 @@
((eq (aref keysig 4) :natural) (setf (aref keysig 4) :flat))
((eq (aref keysig 0) :natural) (setf (aref keysig 0) :flat))
((eq (aref keysig 3) :natural) (setf (aref keysig 3) :flat)))))
-
-;;; macro processing
-(define-gsharp-command com-start-kbd-macro ()
- (message "defining keyboad macro~%")
- (setf *kbd-macro-recording-p* t
- *kbd-macro-funs* '()))
-
-(define-gsharp-command com-end-kbd-macro ()
- (message "keyboad macro defined~%")
- (setf *kbd-macro-recording-p* nil
- *kbd-macro-funs* (nreverse (cdr *kbd-macro-funs*))))
-
-(define-gsharp-command com-call-last-kbd-macro ()
- (handler-case (mapc #'funcall *kbd-macro-funs*)
- (gsharp-condition (condition) (format *error-output* "~a~%" condition))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
Index: gsharp/modes.lisp
diff -u gsharp/modes.lisp:1.3 gsharp/modes.lisp:1.4
--- gsharp/modes.lisp:1.3 Sun Aug 1 17:14:33 2004
+++ gsharp/modes.lisp Mon Jul 25 11:52:14 2005
@@ -1,86 +1,72 @@
(in-package :gsharp)
-(defun transform-gesture (gesture)
- (list (car gesture) (apply #'make-modifier-state (cdr gesture))))
+(define-command-table global-gsharp-table
+ :inherit-from (global-esa-table keyboard-macro-table))
-(defun add-keyseq (gestures command table)
- (setf (dico-object table (mapcar #'transform-gesture gestures))
- command))
-
-
-;;; global mode table
-(defparameter *global-mode-table* (make-sequence-dico :test #'equal))
-
-(add-keyseq '((#\f :control)) 'com-forward-element *global-mode-table*)
-(add-keyseq '((#\b :control)) 'com-backward-element *global-mode-table*)
-(add-keyseq '((#\d :control)) 'com-delete-element *global-mode-table*)
-(add-keyseq '((#\| :shift)) 'com-insert-measure-bar *global-mode-table*)
-(add-keyseq '((#\.)) 'com-more-dots *global-mode-table*)
-(add-keyseq '((#\[)) 'com-more-lbeams *global-mode-table*)
-(add-keyseq '((#\])) 'com-more-rbeams *global-mode-table*)
-(add-keyseq '((#\l :meta)) 'com-left *global-mode-table*)
-(add-keyseq '((#\r :meta)) 'com-right *global-mode-table*)
-(add-keyseq '((#\x :control) (#\( :shift)) 'com-start-kbd-macro *global-mode-table*)
-(add-keyseq '((#\x :control) (#\()) 'com-start-kbd-macro *global-mode-table*)
-(add-keyseq '((#\x :control) (#\) :shift)) 'com-end-kbd-macro *global-mode-table*)
-(add-keyseq '((#\x :control) (#\))) 'com-end-kbd-macro *global-mode-table*)
-(add-keyseq '((#\x :control) (#\e)) 'com-call-last-kbd-macro *global-mode-table*)
-(add-keyseq '((#\r :control)) 'com-rotate-notehead *global-mode-table*)
-
-;;; melody mode table
-(defparameter *melody-layer-mode-table* (make-sequence-dico :test #'equal))
-
-(add-keyseq '((#\L :shift)) 'com-lower *melody-layer-mode-table*)
-(add-keyseq '((#\H :shift)) 'com-higher *melody-layer-mode-table*)
-(add-keyseq '((#\c)) 'com-insert-note-c *melody-layer-mode-table*)
-(add-keyseq '((#\d)) 'com-insert-note-d *melody-layer-mode-table*)
-(add-keyseq '((#\e)) 'com-insert-note-e *melody-layer-mode-table*)
-(add-keyseq '((#\f)) 'com-insert-note-f *melody-layer-mode-table*)
-(add-keyseq '((#\g)) 'com-insert-note-g *melody-layer-mode-table*)
-(add-keyseq '((#\a)) 'com-insert-note-a *melody-layer-mode-table*)
-(add-keyseq '((#\b)) 'com-insert-note-b *melody-layer-mode-table*)
-(add-keyseq '((#\,)) 'com-insert-rest *melody-layer-mode-table*)
-(add-keyseq '((#\Space)) 'com-insert-empty-cluster *melody-layer-mode-table*)
-(add-keyseq '((#\C :shift)) 'com-add-note-c *melody-layer-mode-table*)
-(add-keyseq '((#\D :shift)) 'com-add-note-d *melody-layer-mode-table*)
-(add-keyseq '((#\E :shift)) 'com-add-note-e *melody-layer-mode-table*)
-(add-keyseq '((#\F :shift)) 'com-add-note-f *melody-layer-mode-table*)
-(add-keyseq '((#\G :shift)) 'com-add-note-g *melody-layer-mode-table*)
-(add-keyseq '((#\A :shift)) 'com-add-note-a *melody-layer-mode-table*)
-(add-keyseq '((#\B :shift)) 'com-add-note-b *melody-layer-mode-table*)
-(add-keyseq '((#\p)) 'com-current-increment *melody-layer-mode-table*)
-(add-keyseq '((#\n)) 'com-current-decrement *Melody-Layer-mode-table*)
-(add-keyseq '((#\i) (#\.)) 'com-istate-more-dots *melody-layer-mode-table*)
-(add-keyseq '((#\i) (#\[)) 'com-istate-more-lbeams *melody-layer-mode-table*)
-(add-keyseq '((#\i) (#\])) 'com-istate-more-rbeams *melody-layer-mode-table*)
-(add-keyseq '((#\i) (#\h)) 'com-istate-rotate-notehead *melody-layer-mode-table*)
-(add-keyseq '((#\i) (#\s)) 'com-istate-rotate-stem-direction *melody-layer-mode-table*)
-(add-keyseq '((#\i) (#\x) (#\.)) 'com-istate-fewer-dots *melody-layer-mode-table*)
-(add-keyseq '((#\i) (#\x) (#\[)) 'com-istate-fewer-lbeams *melody-layer-mode-table*)
-(add-keyseq '((#\i) (#\x) (#\])) 'com-istate-fewer-rbeams *melody-layer-mode-table*)
-(add-keyseq '((#\x) (#\.)) 'com-fewer-dots *melody-layer-mode-table*)
-(add-keyseq '((#\x) (#\[)) 'com-fewer-lbeams *melody-layer-mode-table*)
-(add-keyseq '((#\x) (#\])) 'com-fewer-rbeams *melody-layer-mode-table*)
-(add-keyseq '((#\h :control)) 'com-erase-element *melody-layer-mode-table*)
-(add-keyseq '((#\h :meta)) 'com-rotate-notehead *melody-layer-mode-table*)
-(add-keyseq '((#\s :meta)) 'com-rotate-stem-direction *melody-layer-mode-table*)
-(add-keyseq '((#\#)) 'com-sharper *melody-layer-mode-table*)
-(add-keyseq '((#\# :shift)) 'com-sharper *melody-layer-mode-table*)
-(add-keyseq '((#\@ :shift)) 'com-flatter *melody-layer-mode-table*)
-(add-keyseq '((#\# :meta)) 'com-more-sharps *melody-layer-mode-table*)
-(add-keyseq '((#\# :meta :shift)) 'com-more-sharps *melody-layer-mode-table*)
-(add-keyseq '((#\@ :meta :shift)) 'com-more-flats *melody-layer-mode-table*)
-(add-keyseq '((#\u :meta)) 'com-up *melody-layer-mode-table*)
-(add-keyseq '((#\d :meta)) 'com-down *melody-layer-mode-table*)
+(set-key 'com-forward-element 'global-gsharp-table '((#\f :control)))
+(set-key 'com-backward-element 'global-gsharp-table '((#\b :control)))
+(set-key 'com-delete-element 'global-gsharp-table '((#\d :control)))
+(set-key 'com-insert-measure-bar 'global-gsharp-table '(#\|))
+(set-key 'com-more-dots 'global-gsharp-table '((#\.)))
+(set-key 'com-more-lbeams 'global-gsharp-table '((#\[)))
+(set-key 'com-more-rbeams 'global-gsharp-table '((#\])))
+(set-key 'com-left 'global-gsharp-table '((#\l :meta)))
+(set-key 'com-right 'global-gsharp-table '((#\r :meta)))
+(set-key 'com-rotate-notehead 'global-gsharp-table '((#\r :control)))
+
+;;; melody table
+
+(define-command-table melody-table)
+
+(set-key 'com-lower 'melody-table '((#\L :shift)))
+(set-key 'com-higher 'melody-table '((#\H :shift)))
+(set-key 'com-insert-note-a 'melody-table '(#\a))
+(set-key 'com-insert-note-b 'melody-table '(#\b))
+(set-key 'com-insert-note-c 'melody-table '(#\c))
+(set-key 'com-insert-note-d 'melody-table '(#\d))
+(set-key 'com-insert-note-e 'melody-table '(#\e))
+(set-key 'com-insert-note-f 'melody-table '(#\f))
+(set-key 'com-insert-note-g 'melody-table '(#\g))
+(set-key 'com-insert-rest 'melody-table '((#\,)))
+(set-key 'com-insert-empty-cluster 'melody-table '((#\Space)))
+(set-key 'com-add-note-c 'melody-table '(#\C))
+(set-key 'com-add-note-d 'melody-table '(#\D))
+(set-key 'com-add-note-e 'melody-table '(#\E))
+(set-key 'com-add-note-f 'melody-table '(#\F))
+(set-key 'com-add-note-g 'melody-table '(#\G))
+(set-key 'com-add-note-a 'melody-table '(#\A))
+(set-key 'com-add-note-b 'melody-table '(#\B))
+(set-key 'com-current-increment 'melody-table '((#\p)))
+(set-key 'com-current-decrement 'melody-table '((#\n)))
+(set-key 'com-istate-more-dots 'melody-table '((#\i) (#\.)))
+(set-key 'com-istate-more-lbeams 'melody-table '((#\i) (#\[)))
+(set-key 'com-istate-more-rbeams 'melody-table '((#\i) (#\])))
+(set-key 'com-istate-rotate-notehead 'melody-table '((#\i) (#\h)))
+(set-key 'com-istate-rotate-stem-direction 'melody-table '((#\i) (#\s)))
+(set-key 'com-istate-fewer-dots 'melody-table '((#\i) (#\x) (#\.)))
+(set-key 'com-istate-fewer-lbeams 'melody-table '((#\i) (#\x) (#\[)))
+(set-key 'com-istate-fewer-rbeams 'melody-table '((#\i) (#\x) (#\])))
+(set-key 'com-fewer-dots 'melody-table '((#\x) (#\.)))
+(set-key 'com-fewer-lbeams 'melody-table '((#\x) (#\[)))
+(set-key 'com-fewer-rbeams 'melody-table '((#\x) (#\])))
+(set-key 'com-erase-element 'melody-table '((#\h :control)))
+(set-key 'com-rotate-notehead 'melody-table '((#\h :meta)))
+(set-key 'com-rotate-stem-direction 'melody-table '((#\s :meta)))
+(set-key 'com-sharper 'melody-table '((#\#)))
+(set-key 'com-flatter 'melody-table '(#\@))
+(set-key 'com-more-sharps 'melody-table '((#\# :meta)))
+(set-key 'com-more-sharps 'melody-table '((#\# :meta :shift)))
+(set-key 'com-more-flats 'melody-table '((#\@ :meta :shift)))
+(set-key 'com-up 'melody-table '((#\u :meta)))
+(set-key 'com-down 'melody-table '((#\d :meta)))
;;; lyrics mode table
-(defparameter *lyrics-layer-mode-table* (make-sequence-dico :test #'equal))
+(define-command-table lyrics-table)
-(add-keyseq '((#\h :control)) (lambda () (erase-char (cur-element)))
- *lyrics-layer-mode-table*)
-(add-keyseq '((#\h :meta)) 'com-erase-element *lyrics-layer-mode-table*)
-(add-keyseq '((#\Space :control)) 'insert-lyrics-element *lyrics-layer-mode-table*)
+(set-key (lambda () (erase-char (cur-element))) 'lyrics-table '((#\h :control)))
+(set-key 'com-erase-element 'lyrics-table '((#\h :meta)))
+(set-key 'insert-lyrics-element 'lyrics-table '((#\Space :control)))
(defun make-insert-fun (code)
@@ -89,78 +75,78 @@
(loop for c in '(#\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M
#\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z)
for i from 65
- do (add-keyseq `((,c :shift)) (make-insert-fun i) *lyrics-layer-mode-table*))
+ do (set-key (make-insert-fun i) 'lyrics-table `((,c :shift))))
(loop for c in '(#\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m
#\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z)
for i from 97
- do (add-keyseq `((,c)) (make-insert-fun i) *lyrics-layer-mode-table*))
+ do (set-key (make-insert-fun i) 'lyrics-table`((,c))))
;;; try some latin prefix mode for national characters
-(add-keyseq '((:dead--grave) (#\A :shift)) (make-insert-fun 192) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\A :shift)) (make-insert-fun 193) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\A :shift)) (make-insert-fun 194) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--tilde :shift) (#\A :shift)) (make-insert-fun 195) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\A :shift)) (make-insert-fun 196) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead-above-ring) (#\A :shift)) (make-insert-fun 197) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead-above-ring) (#\E :shift)) (make-insert-fun 198) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead-above-ring) (#\C :shift)) (make-insert-fun 199) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--grave) (#\E :shift)) (make-insert-fun 200) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\E :shift)) (make-insert-fun 201) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\E :shift)) (make-insert-fun 202) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\E :shift)) (make-insert-fun 203) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--grave) (#\I :shift)) (make-insert-fun 204) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\I :shift)) (make-insert-fun 205) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\I :shift)) (make-insert-fun 206) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\I :shift)) (make-insert-fun 207) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead-above-ring) (#\D :shift)) (make-insert-fun 208) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--tilde :shift) (#\N :shift)) (make-insert-fun 209) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--grave) (#\O :shift)) (make-insert-fun 210) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\O :shift)) (make-insert-fun 211) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\O :shift)) (make-insert-fun 212) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--tilde :shift) (#\O :shift)) (make-insert-fun 213) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\O :shift)) (make-insert-fun 214) *lyrics-layer-mode-table*)
-
-(add-keyseq '((:dead-above-ring) (#\O :shift)) (make-insert-fun 216) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--grave) (#\U :shift)) (make-insert-fun 217) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\U :shift)) (make-insert-fun 218) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\U :shift)) (make-insert-fun 219) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\U :shift)) (make-insert-fun 220) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\Y :shift)) (make-insert-fun 221) *lyrics-layer-mode-table*)
-
-
-(add-keyseq '((:dead--grave) (#\a)) (make-insert-fun 224) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\a)) (make-insert-fun 225) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\a)) (make-insert-fun 226) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--tilde :shift) (#\a)) (make-insert-fun 227) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\a)) (make-insert-fun 228) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead-above-ring) (#\a)) (make-insert-fun 229) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead-above-ring) (#\e)) (make-insert-fun 230) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--tilde :shift) (#\c)) (make-insert-fun 231) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--grave) (#\e)) (make-insert-fun 232) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\e)) (make-insert-fun 233) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\e)) (make-insert-fun 234) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\e)) (make-insert-fun 235) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--grave) (#\i)) (make-insert-fun 236) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\i)) (make-insert-fun 237) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\i)) (make-insert-fun 238) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\i)) (make-insert-fun 239) *lyrics-layer-mode-table*)
-
-
-(add-keyseq '((:dead--grave) (#\o)) (make-insert-fun 242) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\o)) (make-insert-fun 243) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\o)) (make-insert-fun 244) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--tilde :shift) (#\o)) (make-insert-fun 245) *lyrics-layer-mode-table*)
-(add-keyseq `((:dead--diaeresis :shift) (#\o)) (make-insert-fun 246) *lyrics-layer-mode-table*)
-
-(add-keyseq '((:dead-above-ring) (#\o)) (make-insert-fun 248) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--grave) (#\u)) (make-insert-fun 249) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\u)) (make-insert-fun 250) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--circumflex :shift) (#\u)) (make-insert-fun 251) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--diaeresis :shift) (#\u)) (make-insert-fun 252) *lyrics-layer-mode-table*)
-(add-keyseq '((:dead--acute) (#\y)) (make-insert-fun 253) *lyrics-layer-mode-table*)
+(set-key (make-insert-fun 192) 'lyrics-table '((:dead--grave) (#\A :shift)))
+(set-key (make-insert-fun 193) 'lyrics-table '((:dead--acute) (#\A :shift)))
+(set-key (make-insert-fun 194) 'lyrics-table '((:dead--circumflex :shift) (#\A :shift)))
+(set-key (make-insert-fun 195) 'lyrics-table '((:dead--tilde :shift) (#\A :shift)))
+(set-key (make-insert-fun 196) 'lyrics-table '((:dead--diaeresis :shift) (#\A :shift)))
+(set-key (make-insert-fun 197) 'lyrics-table '((:dead-above-ring) (#\A :shift)))
+(set-key (make-insert-fun 198) 'lyrics-table '((:dead-above-ring) (#\E :shift)))
+(set-key (make-insert-fun 199) 'lyrics-table '((:dead-above-ring) (#\C :shift)))
+(set-key (make-insert-fun 200) 'lyrics-table '((:dead--grave) (#\E :shift)))
+(set-key (make-insert-fun 201) 'lyrics-table '((:dead--acute) (#\E :shift)))
+(set-key (make-insert-fun 202) 'lyrics-table '((:dead--circumflex :shift) (#\E :shift)))
+(set-key (make-insert-fun 203) 'lyrics-table '((:dead--diaeresis :shift) (#\E :shift)))
+(set-key (make-insert-fun 204) 'lyrics-table '((:dead--grave) (#\I :shift)))
+(set-key (make-insert-fun 205) 'lyrics-table '((:dead--acute) (#\I :shift)))
+(set-key (make-insert-fun 206) 'lyrics-table '((:dead--circumflex :shift) (#\I :shift)))
+(set-key (make-insert-fun 207) 'lyrics-table '((:dead--diaeresis :shift) (#\I :shift)))
+(set-key (make-insert-fun 208) 'lyrics-table '((:dead-above-ring) (#\D :shift)))
+(set-key (make-insert-fun 209) 'lyrics-table '((:dead--tilde :shift) (#\N :shift)))
+(set-key (make-insert-fun 210) 'lyrics-table '((:dead--grave) (#\O :shift)))
+(set-key (make-insert-fun 211) 'lyrics-table '((:dead--acute) (#\O :shift)))
+(set-key (make-insert-fun 212) 'lyrics-table '((:dead--circumflex :shift) (#\O :shift)))
+(set-key (make-insert-fun 213) 'lyrics-table '((:dead--tilde :shift) (#\O :shift)))
+(set-key (make-insert-fun 214) 'lyrics-table '((:dead--diaeresis :shift) (#\O :shift)))
+
+(set-key (make-insert-fun 216) 'lyrics-table '((:dead-above-ring) (#\O :shift)))
+(set-key (make-insert-fun 217) 'lyrics-table '((:dead--grave) (#\U :shift)))
+(set-key (make-insert-fun 218) 'lyrics-table '((:dead--acute) (#\U :shift)))
+(set-key (make-insert-fun 219) 'lyrics-table '((:dead--circumflex :shift) (#\U :shift)))
+(set-key (make-insert-fun 220) 'lyrics-table '((:dead--diaeresis :shift) (#\U :shift)))
+(set-key (make-insert-fun 221) 'lyrics-table '((:dead--acute) (#\Y :shift)))
+
+
+(set-key (make-insert-fun 224) 'lyrics-table '((:dead--grave) (#\a)))
+(set-key (make-insert-fun 225) 'lyrics-table '((:dead--acute) (#\a)))
+(set-key (make-insert-fun 226) 'lyrics-table '((:dead--circumflex :shift) (#\a)))
+(set-key (make-insert-fun 227) 'lyrics-table '((:dead--tilde :shift) (#\a)))
+(set-key (make-insert-fun 228) 'lyrics-table '((:dead--diaeresis :shift) (#\a)))
+(set-key (make-insert-fun 229) 'lyrics-table '((:dead-above-ring) (#\a)))
+(set-key (make-insert-fun 230) 'lyrics-table '((:dead-above-ring) (#\e)))
+(set-key (make-insert-fun 231) 'lyrics-table '((:dead--tilde :shift) (#\c)))
+(set-key (make-insert-fun 232) 'lyrics-table '((:dead--grave) (#\e)))
+(set-key (make-insert-fun 233) 'lyrics-table '((:dead--acute) (#\e)))
+(set-key (make-insert-fun 234) 'lyrics-table '((:dead--circumflex :shift) (#\e)))
+(set-key (make-insert-fun 235) 'lyrics-table '((:dead--diaeresis :shift) (#\e)))
+(set-key (make-insert-fun 236) 'lyrics-table '((:dead--grave) (#\i)))
+(set-key (make-insert-fun 237) 'lyrics-table '((:dead--acute) (#\i)))
+(set-key (make-insert-fun 238) 'lyrics-table '((:dead--circumflex :shift) (#\i)))
+(set-key (make-insert-fun 239) 'lyrics-table '((:dead--diaeresis :shift) (#\i)))
+
+
+(set-key (make-insert-fun 242) 'lyrics-table '((:dead--grave) (#\o)))
+(set-key (make-insert-fun 243) 'lyrics-table '((:dead--acute) (#\o)))
+(set-key (make-insert-fun 244) 'lyrics-table '((:dead--circumflex :shift) (#\o)))
+(set-key (make-insert-fun 245) 'lyrics-table '((:dead--tilde :shift) (#\o)))
+(set-key (make-insert-fun 246) 'lyrics-table `((:dead--diaeresis :shift) (#\o)))
+
+(set-key (make-insert-fun 248) 'lyrics-table '((:dead-above-ring) (#\o)))
+(set-key (make-insert-fun 249) 'lyrics-table '((:dead--grave) (#\u)))
+(set-key (make-insert-fun 250) 'lyrics-table '((:dead--acute) (#\u)))
+(set-key (make-insert-fun 251) 'lyrics-table '((:dead--circumflex :shift) (#\u)))
+(set-key (make-insert-fun 252) 'lyrics-table '((:dead--diaeresis :shift) (#\u)))
+(set-key (make-insert-fun 253) 'lyrics-table '((:dead--acute) (#\y)))
-(add-keyseq '((:dead--diaeresis :shift) (#\y)) (make-insert-fun 255) *lyrics-layer-mode-table*)
+(set-key (make-insert-fun 255) 'lyrics-table '((:dead--diaeresis :shift) (#\y)))
Index: gsharp/packages.lisp
diff -u gsharp/packages.lisp:1.8 gsharp/packages.lisp:1.9
--- gsharp/packages.lisp:1.8 Sat Jul 24 22:09:55 2004
+++ gsharp/packages.lisp Mon Jul 25 11:52:14 2005
@@ -1,8 +1,3 @@
-(defpackage :sequence-dico
- (:use :clim-lisp)
- (:export #:sequence-dico #:standard-sequence-dico
- #:make-sequence-dico #:dico-object))
-
(defpackage :gsharp-utilities
(:shadow built-in-class)
(:use :clim-lisp :clim-mop)
@@ -131,8 +126,19 @@
#:quarter-rest #:8th-rest #:16th-rest #:32nd-rest #:64th-rest
#:128th-rest #:measure-rest #:double-whole-rest))
+(defpackage :esa
+ (:use :clim-lisp :clim)
+ (:export #:minibuffer-pane #:display-message
+ #:esa-pane-mixin #:previous-command
+ #:info-pane #:master-pane
+ #:esa-frame-mixin #:windows #:recordingp #:executingp
+ #:*numeric-argument-p* #:*current-gesture*
+ #:esa-top-level #:simple-command-loop
+ #:global-esa-table #:keyboard-macro-table
+ #:set-key))
+
(defpackage :score-pane
- (:use :clim :clim-extensions :clim-lisp :sdl)
+ (:use :clim :clim-extensions :clim-lisp :sdl :esa)
(:shadow #:rest)
(:export #:draw-fiveline-staff #:draw-lyrics-staff
#:draw-stem #:draw-right-stem #:draw-left-stem
@@ -196,7 +202,7 @@
#:unknown-event #:status #:data-byte))
(defpackage :gsharp
- (:use :clim :clim-lisp :gsharp-utilities
+ (:use :clim :clim-lisp :gsharp-utilities :esa
:gsharp-buffer :gsharp-cursor :gsharp-drawing :gsharp-numbering
:gsharp-measure :sdl :midi :sequence-dico)
(:shadowing-import-from :gsharp-numbering #:number)
Index: gsharp/score-pane.lisp
diff -u gsharp/score-pane.lisp:1.6 gsharp/score-pane.lisp:1.7
--- gsharp/score-pane.lisp:1.6 Fri Jul 23 18:51:16 2004
+++ gsharp/score-pane.lisp Mon Jul 25 11:52:14 2005
@@ -2,7 +2,7 @@
(defclass score-view (view) ())
-(defclass score-pane (application-pane)
+(defclass score-pane (esa-pane-mixin application-pane)
((pixmaps :initform (make-hash-table :test #'eq) :reader pane-pixmaps)
(darker-gray-progressions :initform (make-array 10 :initial-element nil :adjustable t)
:reader darker-gray-progressions)
Index: gsharp/system.lisp
diff -u gsharp/system.lisp:1.5 gsharp/system.lisp:1.6
--- gsharp/system.lisp:1.5 Thu Jun 2 13:52:37 2005
+++ gsharp/system.lisp Mon Jul 25 11:52:14 2005
@@ -22,7 +22,6 @@
(gsharp-defsystem (:gsharp :depends-on (:mcclim))
"packages"
- "sequence-dico"
"utilities"
"gf"
"sdl"
@@ -40,4 +39,5 @@
"input-state"
"midi"
"modes"
+ "esa"
"gui")
More information about the Gsharp-cvs
mailing list