Also some package exports.
(defclass element (gsharp-object)
((bar :initform nil :initarg :bar :accessor bar)
(xoffset :initform 0 :initarg :xoffset :accessor xoffset)
+ (right-pad :initform 0 :initarg :right-pad :accessor right-pad)
+ (left-pad :initform 0 :initarg :left-pad :accessor left-pad)
(annotations :initform nil :initarg :annotations :accessor annotations)))
(defmethod slots-to-be-saved append ((e element))
- '(xoffset annotations))
+ '(xoffset annotations left-pad right-pad))
(defmethod duration ((element element)) 0)
(defmethod rbeams ((element element)) 0)
@@ -148,6 +148,11 @@ right of the center of its timeline"))
(score-pane:staff-step 0)))
(score-pane:staff-step 2)))
+(defmethod left-bulge :around ((element element) pane)
+ (+ (gsharp-buffer::left-pad element) (call-next-method)))
+(defmethod right-bulge :around ((element element) pane)
+ (+ (gsharp-buffer::right-pad element) (call-next-method)))
+
(defmethod right-bulge ((element element) pane)
(score-pane:staff-step 1))
"")
pane))))
+(defun x-offset-label (frame pane)
+ (declare (ignore frame))
+ (when (handler-case (cur-cluster)
+ (gsharp-condition () nil))
+ (princ (gsharp-buffer::xoffset (cur-element)) pane)))
+(defun x-pad-label (frame pane)
+ (declare (ignore frame))
+ (when (handler-case (cur-cluster)
+ (gsharp-condition () nil))
+ (princ (gsharp-buffer::left-pad (cur-element)) pane)))
+
(define-application-frame gsharp (esa-frame-mixin
standard-application-frame)
((views :initarg :views :initform '() :accessor views)
#:tie-right #:tie-left
#:needs-saving
#:tuning #:master-pitch-note #:master-pitch-freq
- #:note-cents #:12-edo #:regular-temperament))
+ #:note-cents #:12-edo #:regular-temperament
+ #:x-offset #:left-pad #:right-pad
+ #:rastral-size #:zoom-level))
(defpackage :gsharp-numbering
(:use :gsharp-utilities :gsharp-buffer :clim-lisp)