From: hanwen <hanwen>
Date: Mon, 18 Apr 2005 12:10:37 +0000 (+0000)
Subject: * input/regression/line-arrows.ly: new file.
X-Git-Tag: release/2.5.23~133
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d10c04ddd54c12aeef51d7294b108284a039972b;p=lilypond.git

* input/regression/line-arrows.ly: new file.

* lily/paper-score.cc (process): run get_paper_systems() only once.
---

diff --git a/ChangeLog b/ChangeLog
index 546085c1c0..ad4fe48c90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-04-18  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+	* input/regression/line-arrows.ly: new file.
+
 	* lily/paper-score.cc (process): run get_paper_systems() only once.
 
 	* lily/line-interface.cc (make_arrow): new function. Patch by
diff --git a/input/regression/line-arrows.ly b/input/regression/line-arrows.ly
new file mode 100644
index 0000000000..47e9ebbb92
--- /dev/null
+++ b/input/regression/line-arrows.ly
@@ -0,0 +1,23 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\version "2.5.18"
+
+%% demonstration of line arrows
+%% By Jonatan Liljedahl <http://kymatica.com>
+
+\relative c'' {
+    %% Arrow between two texts    
+    \override TextSpanner #'edge-text = #'("foo" . "bar")
+    \override TextSpanner #'dash-fraction = #'()
+    \override TextSpanner #'style = #'line
+    \override TextSpanner #'arrow = ##t
+    
+    %% Default arrow size
+%    \override TextSpanner #'arrow-length = #1.3
+%    \override TextSpanner #'arrow-width = #0.5
+
+    %% We can put arrows to a glissando line
+    \override Glissando #'arrow = ##t
+    
+    a8\startTextSpan gis8\< a2 b4\glissando
+    c,4 g'\! c\stopTextSpan c
+}
diff --git a/lily/book.cc b/lily/book.cc
index e0388c00c3..b1d3ff1165 100644
--- a/lily/book.cc
+++ b/lily/book.cc
@@ -121,7 +121,7 @@ Book::process (String outname, Output_def *default_def)
 		}
 	      else if (Paper_score *pscore = dynamic_cast<Paper_score *> (output)) 
 		{
-		  SCM systems = pscore->get_systems ();
+		  SCM systems = pscore->get_paper_systems ();
 		  if (ly_c_module_p (score->header_))
 		    paper_book->add_score (score->header_);
 		  paper_book->add_score (systems);
diff --git a/lily/include/paper-score.hh b/lily/include/paper-score.hh
index 7a6b1f1472..bf9443cd50 100644
--- a/lily/include/paper-score.hh
+++ b/lily/include/paper-score.hh
@@ -29,7 +29,7 @@ public:
   void typeset_system (System *);
   Array<Column_x_positions> calc_breaking ();
 
-  SCM get_systems () const;
+  SCM get_paper_systems () const;
 protected:
   virtual void process ();
   virtual void derived_mark () const;
diff --git a/lily/paper-book.cc b/lily/paper-book.cc
index cd9f4cbc45..19669737e7 100644
--- a/lily/paper-book.cc
+++ b/lily/paper-book.cc
@@ -7,7 +7,7 @@
 */
 
 #include "paper-book.hh"
-
+#include "paper-score.hh"
 #include "main.hh"
 #include "output-def.hh"
 #include "paper-score.hh"
@@ -250,8 +250,10 @@ Paper_book::systems ()
 	  if (header_0_ == SCM_EOL)
 	    header_0_ = header;
 	}
-      else if (scm_is_vector (scm_car (s)))
+      else if (Paper_score *pscore
+	       = dynamic_cast<Paper_score *> (unsmob_music_output (scm_car (s))))
 	{
+	  
 	  Stencil title = score_title (header);
 	  if (title.is_empty ())
 	    title = score_title (header_);
@@ -264,7 +266,8 @@ Paper_book::systems ()
 	    }
 	  header = SCM_EOL;
 
-	  SCM system_list = scm_vector_to_list (scm_car (s));
+	  
+	  SCM system_list = scm_vector_to_list (pscore->get_paper_systems ());
 	  system_list = scm_reverse (system_list);
 	  systems_ = scm_append (scm_list_2 (system_list, systems_));
 	}
diff --git a/lily/paper-score.cc b/lily/paper-score.cc
index eb431864b2..2c1f0797d0 100644
--- a/lily/paper-score.cc
+++ b/lily/paper-score.cc
@@ -109,7 +109,7 @@ Paper_score::layout () const
   
 
 SCM
-Paper_score::get_systems () const
+Paper_score::get_paper_systems () const
 {
   return paper_systems_;
 }