]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/paper-outputter.cc (file): New method.
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 17 Jun 2004 10:09:50 +0000 (10:09 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 17 Jun 2004 10:09:50 +0000 (10:09 +0000)
(dump_string): Use it.

* scm/output-gnome.scm: Update with pango CVS info, lilylib
musing.

* lily/accidental-engraver.cc: Bugfix: (do not sort lines if one
of them has a comma :-).

* scm/framework-gnome.scm: Add pango decoders.

ChangeLog
lily/accidental-engraver.cc
lily/include/paper-outputter.hh
lily/paper-outputter.cc
scm/framework-gnome.scm
scm/output-gnome.scm

index 76778c0377805e1f895be89cb2c399c810a8e6bc..45a3c43de1d952b3e0fdf2b95716edab32f186ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2004-06-17  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * lily/paper-outputter.cc (file): New method.
+       (dump_string): Use it.
+
+       * scm/output-gnome.scm: Update with pango CVS info, lilylib
+       musing.
+       
+       * lily/accidental-engraver.cc: Bugfix: (do not sort lines if one
+       of them has a comma :-).
+
        * scm/framework-gnome.scm: Add pango decoders.
 
        * lily/include/pangofc-afm-decoder.hh: 
index a43cf8b6a60e4973409fce2460171e7fbe6720f8..31e0998c9e00e1cb7611c6c9f9260caa7be46e93 100644 (file)
@@ -485,21 +485,22 @@ ENTER_DESCRIPTION (Accidental_engraver,
                   "Catch note heads, ties and notices key-change events.  "
                   "This engraver usually lives at Staff level, but "
                   "reads the settings for Accidental at @code{Voice} level, " 
-                  "so you can @code{\\override} them at @code{Voice}. ",
-                  
-                  "Accidental",
-                  
-                  "",
-                  
-                  "arpeggio-interface ",
-                  "autoAccidentals "
-                  "autoCautionaries",
+                  "so you can @code{\\override} them at @code{Voice}. "
+                  ,
+                  "Accidental"
+                  ,
+                  ""
+                  ,
+                  "arpeggio-interface "
                   "finger-interface "
                   "rhythmic-head-interface "
                   "tie-interface "
-                  
+                  ,
+                  "autoAccidentals "
+                  "autoCautionaries "
                   "extraNatural "
                   "harmonicAccidentals "
-                  "localKeySignature "
-                  
-                  "localKeySignature");
+                  "localKeySignature"
+                  ,
+                  "localKeySignature"
+                  );
index 730748dd0acba0a76bc0c953192b1e6296631551..96544542e1391d3bfea44c8d96ea6c016d024aa1 100644 (file)
 class Paper_outputter
 {
   SCM output_module_;
-  SCM file_;
   String filename_;
+  SCM file_;
+
+  SCM file ();
 
 public:
-  DECLARE_SMOBS(Paper_outputter,);
+  DECLARE_SMOBS (Paper_outputter,);
 
 public:
   SCM dump_string (SCM);
@@ -37,7 +39,7 @@ public:
   void output_stencil (Stencil);
 };
 
-Paper_outputter* get_paper_outputter (String,String);
-DECLARE_UNSMOB(Paper_outputter, outputter);
+Paper_outputter *get_paper_outputter (String, String);
+DECLARE_UNSMOB (Paper_outputter, outputter);
 
 #endif /* PAPER_OUTPUTTER_HH */
index 163673e31ec62cd0b907f408daf4b2d5d112d714..bb9c3812cf8ed9138793f8a04dcc8f1efdaf3c48 100644 (file)
@@ -38,9 +38,6 @@ Paper_outputter::Paper_outputter (String filename, String format)
   smobify_self ();
   
   filename_ = filename;
-  file_ = scm_open_file (scm_makfrom0str (filename.to_str0 ()),
-                        scm_makfrom0str ("w"));
-
   String module_name = "scm output-" + format;
   output_module_ = scm_c_resolve_module (module_name.to_str0 ());
 }
@@ -69,10 +66,19 @@ Paper_outputter::print_smob (SCM x, SCM p, scm_print_state*)
   return 1;
 }
 
+SCM
+Paper_outputter::file ()
+{
+  if (file_ == SCM_EOL)
+    file_ = scm_open_file (scm_makfrom0str (filename_.to_str0 ()),
+                          scm_makfrom0str ("w"));
+  return file_;
+}
+
 SCM
 Paper_outputter::dump_string (SCM scm)
 {
-  return scm_display (scm, file_);
+  return scm_display (scm, file ());
 }
 
 SCM
@@ -101,7 +107,6 @@ Paper_outputter::output_stencil (Stencil stil)
                                 (void*) this, Offset (0,0));
 }
 
-
 Paper_outputter *
 get_paper_outputter (String outname, String f) 
 {
index bc62a7aa227d71e092ec7a8a36ce2c3a98d95ec5..031cb3c972731349d71e36947ae5009121f7fdcd 100644 (file)
     (use-modules (gnome gw libgnomecanvas)))
 
 (define-public (output-framework-gnome outputter book scopes fields basename)
-  (if #t
-      (gnome-main book)
-      (ly:outputter-dump-stencil
-       outputter
-       (ly:make-stencil (list 'gnome-main book) '(0 . 0) '(0 . 0)))))
+  (newline (current-error-port))
+  
+;   ;; Hmm, 
+;   (let ((port (ly:outputter-get-output-port outputter)))
+;     (remove port)
+;     (close port))
+
+  (gnome-main book))
+
 
 ;; WTF? -- jcn
 ;; Yay, I *finally* found it!
index 972a50c703dc7e6d6af81c096ef7816b95dd0e8d..1364e4a7ecf7b5e3840ba0095e42fc328f9410a9 100644 (file)
@@ -4,64 +4,61 @@
 ;;;; 
 ;;;; (c)  2004 Jan Nieuwenhuizen <janneke@gnu.org>
 
-;;; HIP -- hack in progress
+;;; TODO:
 ;;;
+;;;  * Figure out and fix font scaling and character placement
+;;;  * User-interface, keybindings
+;;;  * Implement missing stencil functions
+;;;  * Implement missing commands
+;;;  * Embedded Lily:
+;;;    - allow GnomeCanvas or `toplevel' GtkWindow to be created
+;;;      outside of LilyPond
+;;;    - lilylib.
+;;;  * Release schedule and packaging of dependencies.  This hack
+;;;    depends on several CVS and TLA developent sources.
+
 ;;; You need:
 ;;;
-;;;   * guile-1.6.4 (NOT CVS)
-;;;   * Rotty's g-wrap--tng, possibly Janneke's if you have libffi-3.4.
-;;;
-;;; see also: guile-gtk-general@gnu.org
+;;;   * guile-1.6.4 (NOT CVS -- we are working on this)
+;;;   * Rotty's g-wrap--tng TLA, possibly Janneke's if you have libffi-3.4.
+;;;   * guile-gnome TLA
+;;;   * pango CVS (ie, > 2004-06-12)
 ;;;
+;;; See also: guile-gtk-general@gnu.org
+
 ;;; Try it
 ;;;
-;;;   * If using GUILE CVS , then compile LilyPond with GUILE 1.6, 
-;;;
-;;;    PATH=/usr/bin/:$PATH ./configure --enable-config=g16  ; make conf=g16
-;;;
-;;;   * Install gnome/gtk development stuff and g-wrap, guile-gnome
-;;;     see buildscripts/guile-gnome.sh
-;;;  
-;;;   * Use latin1 encoding for gnome backend, do
-;;;
+;;;   * If you are using GUILE CVS, recompile LilyPond with GUILE 1.6.
+
+;;;     [If for some unknown or funny reason you do not want to
+;;;      overwrite your lilypond-bin with GUILE CVS, you can
+;;;      reconfigure a new configuration, say g16:
 "
-       ./configure --prefix=$(pwd) --enable-config=g16
-       make -C mf conf=g16 clean
-       make -C mf conf=g16 ENCODING_FILE=$(kpsewhich cork.enc)
-       (cd mf/out-g16 && mkfontdir)
-       xset +fp $(pwd)/mf/out-g16
+PATH=/usr/bin/:$PATH ./configure --enable-config=g16 && make conf=g16
 "
+;;;     ]
 ;;;
+;;;   * Install gnome/gtk development stuff
+;;;
+;;;   * Install g-wrap and guile-gnome, see buildscripts/guile-gnome.sh
+;;;  
 ;;;   * Setup environment
 "
 export GUILE_LOAD_PATH=$HOME/usr/pkg/g-wrap/share/guile/site:$HOME/usr/pkg/g-wrap/share/guile/site/g-wrap:$HOME/usr/pkg/guile-gnome/share/guile
 export LD_LIBRARY_PATH=$HOME/usr/pkg/g-wrap/lib:$HOME/usr/pkg/guile-gnome/lib
 export XEDITOR='/usr/bin/emacsclient --no-wait +%l:%c %f'
 "
-;;;  * For GNOME point-and-click, add
-;;;     #(ly:set-point-and-click 'line-column)
-;;;    to your .ly; just click an object on the canvas.
+;;;  * Also for GNOME point-and-click, you need to set XEDITOR and add
+"
+#(ly:set-point-and-click 'line-column)
+"
+;;;    to your .ly; then click an object on the canvas.
 ;;;
 ;;;  * Run lily:
 "
 lilypond-bin -fgnome input/simple-song.ly
 "
 
-;;; TODO:
-;;;  * pango+feta font (see archives gtk-i18n-list@gnome.org and
-;;;    lilypond-devel)
-;;;    - wait for/help with pango 1.6
-;;;    - convert feta to OpenType (CFF) or TrueType (fontforge?)
-;;;    - hack feta20/feta20.pfa?:
-;;;  * font, canvas, scaling?
-;;;  * implement missing stencil functions
-;;;  * implement missing commands
-;;;  * user-interface, keybindings
-;;;  * papersize, outputscale from book
-
-
-;;; SCRIPT moved to buildscripts/guile-gnome.sh
-
 
 (debug-enable 'backtrace)
 
@@ -74,19 +71,24 @@ lilypond-bin -fgnome input/simple-song.ly
  (lily)
  (gnome gtk))
 
-;; the name of the module will change to canvas rsn
+
+;; The name of the module will change to `canvas' rsn
 (if (resolve-module '(gnome gw canvas))
     (use-modules (gnome gw canvas))
     (use-modules (gnome gw libgnomecanvas)))
 
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; globals
+
+;; junkme
 (define system-origin '(0 . 0))
 
-;;; set by framework-gnome.scm:
+;;; set by framework-gnome.scm
 (define canvas-root #f)
 (define output-scale #f)
 
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; helper functions
 
@@ -129,13 +131,16 @@ lilypond-bin -fgnome input/simple-song.ly
 ;;; stencil outputters
 ;;;
 
+;;; catch-all for missing stuff
+;;; comment this out to see find out what functions you miss :-)
 (define (dummy . foo) #f)
-
 (map (lambda (x) (module-define! this-module x dummy))
      (append
       (ly:all-stencil-expressions)
       (ly:all-output-backend-commands)))
 
+
+
 (define (char font i)
   (text font (utf8 i)))
 
@@ -163,6 +168,7 @@ lilypond-bin -fgnome input/simple-song.ly
    ((equal? (ly:font-name font) "GNU-LilyPond-feta-20")
     "lilypond-feta, regular 32")
    (else
+    ;; FIXME
     "ecrm12")))
     ;;(ly:font-name font))))
     ;;(ly:font-filename font))))
@@ -234,12 +240,8 @@ lilypond-bin -fgnome input/simple-song.ly
 
 ;; WTF is this in every backend?
 (define (horizontal-line x1 x2 thickness)
-  ;;(let ((thickness 2))
   (filledbox (- x1) (- x2 x1) (* .5 thickness) (* .5 thickness)))
 
 (define (define-origin file line col)
   (if (procedure? point-and-click)
-      ;; duh, only silly string append
-      ;; (point-and-click line col file)
-      (list 'location line col file)
-      #f))
+      (list 'location line col file)))