Update of /project/gsharp/cvsroot/gsharp In directory common-lisp.net:/tmp/cvs-serv20069
Modified Files: esa.lisp gui.lisp modes.lisp score-pane.lisp Log Message: Fixed a bug in esa.lisp that made numeric arguments not work.
Error messages are now displayed in the minibuffer.
Some commands like forward-element, backward-element, and delete-element now accept numeric arguments.
Prepared for incremental redisplay by changing inheritance of pixmap records. This is nontrivial, though, and will require some more thinking about. The best thing would be to fix McCLIM, but that looks nontrivial as well.
Date: Tue Aug 2 02:34:42 2005 Author: rstrandh
Index: gsharp/esa.lisp diff -u gsharp/esa.lisp:1.1 gsharp/esa.lisp:1.2 --- gsharp/esa.lisp:1.1 Mon Jul 25 11:53:28 2005 +++ gsharp/esa.lisp Tue Aug 2 02:34:41 2005 @@ -145,12 +145,12 @@ (let ((gesture (esa-read-gesture))) (cond ((event-matches-gesture-name-p gesture - '(:keyboard #\u (make-modifier-state :control))) + `(:keyboard #\u ,(make-modifier-state :control))) (let ((numarg 4)) (loop for gesture = (esa-read-gesture) while (event-matches-gesture-name-p gesture - '(:keyboard #\u (make-modifier-state :control))) + `(:keyboard #\u ,(make-modifier-state :control))) do (setf numarg (* 4 numarg)) finally (esa-unread-gesture gesture stream)) (let ((gesture (esa-read-gesture)))
Index: gsharp/gui.lisp diff -u gsharp/gui.lisp:1.21 gsharp/gui.lisp:1.22 --- gsharp/gui.lisp:1.21 Mon Aug 1 01:36:56 2005 +++ gsharp/gui.lisp Tue Aug 2 02:34:41 2005 @@ -58,7 +58,7 @@
(defmethod execute-frame-command :around ((frame gsharp) command) (handler-case (call-next-method) - (gsharp-condition (condition) (message "~a~%" condition)))) + (gsharp-condition (condition) (beep) (display-message "~a" condition))))
(defmethod display-state ((frame gsharp) pane) (let ((state (input-state *application-frame*))) @@ -895,10 +895,11 @@ ;;; ;;; motion by element
-(define-gsharp-command com-forward-element () - (forward-element (cursor *application-frame*))) +(define-gsharp-command com-forward-element ((count 'integer :prompt "Number of Elements")) + (loop repeat count + do (forward-element (cursor *application-frame*))))
-(define-gsharp-command com-backward-element () +(define-gsharp-command com-backward-element ((count 'integer :prompt "Number of Elements")) (backward-element (cursor *application-frame*)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -925,15 +926,17 @@ (insert-element element cursor) (forward-element cursor))))
-(define-gsharp-command com-delete-element () +(define-gsharp-command com-delete-element ((count 'integer :prompt "Number of Elements")) (let ((cursor (cursor *application-frame*))) - ;;; this will signal a condition if in last bar and - ;;; interrupt the execution of the command - (forward-element cursor) - (backward-element cursor) - (if (end-of-bar-p cursor) - (fuse-bar-with-next cursor) - (delete-element cursor)))) + (loop repeat count + do (progn + ;; this will signal a condition if in last bar and + ;; interrupt the execution of the command + (forward-element cursor) + (backward-element cursor) + (if (end-of-bar-p cursor) + (fuse-bar-with-next cursor) + (delete-element cursor))))))
(define-gsharp-command com-erase-element () (let ((cursor (cursor *application-frame*)))
Index: gsharp/modes.lisp diff -u gsharp/modes.lisp:1.5 gsharp/modes.lisp:1.6 --- gsharp/modes.lisp:1.5 Mon Jul 25 13:14:37 2005 +++ gsharp/modes.lisp Tue Aug 2 02:34:41 2005 @@ -3,9 +3,9 @@ (define-command-table global-gsharp-table :inherit-from (global-esa-table keyboard-macro-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-forward-element ,*numeric-argument-marker*) 'global-gsharp-table '((#\f :control))) +(set-key `(com-backward-element ,*numeric-argument-marker*) 'global-gsharp-table '((#\b :control))) +(set-key `(com-delete-element ,*numeric-argument-marker*) '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 '((#[)))
Index: gsharp/score-pane.lisp diff -u gsharp/score-pane.lisp:1.8 gsharp/score-pane.lisp:1.9 --- gsharp/score-pane.lisp:1.8 Mon Aug 1 01:36:56 2005 +++ gsharp/score-pane.lisp Tue Aug 2 02:34:41 2005 @@ -50,7 +50,12 @@ ;;; ;;; output recording
-(defclass score-output-record (displayed-output-record) +;;; we should not have to inherit from standard-boudning-rectangle, +;;; but the implementation of incremental redisplay in McCLIM assumes +;;; that this is the case for all output records participating in +;;; incremental redisplay. + +(defclass score-output-record (displayed-output-record standard-bounding-rectangle) ((parent :initarg :parent :initform nil :accessor output-record-parent) (x :initarg :x1 :initarg :x-position) (y :initarg :y1 :initarg :y-position)