]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/figured-bass-engraver.cc
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / lily / figured-bass-engraver.cc
index 782574e5e6e97a491a977379d6f76a556e5199ec..2e2c519f7af88c7291d69d7c9ee2cfa1b891276c 100644 (file)
@@ -1,10 +1,21 @@
 /*
-  figured-bass-engraver.cc -- implement Figured_bass_engraver
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 2005--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "engraver.hh"
@@ -28,6 +39,10 @@ struct Figure_group
   
   SCM number_;
   SCM alteration_;
+  SCM augmented_;
+  SCM diminished_;
+  SCM augmented_slash_;
+  SCM text_;
   
   Item *figure_item_; 
   Stream_event *current_event_;
@@ -40,6 +55,10 @@ struct Figure_group
     continuation_line_ = 0;
     number_ = SCM_EOL;
     alteration_ = SCM_EOL;
+    augmented_ = SCM_EOL;
+    diminished_ = SCM_EOL;
+    augmented_slash_ = SCM_EOL;
+    text_ = SCM_EOL;
     group_ = 0;
     current_event_ = 0;
   }
@@ -51,7 +70,15 @@ struct Figure_group
       && ly_is_equal (number_,
                      current_event_->get_property ("figure"))
       && ly_is_equal (alteration_,
-                     current_event_->get_property ("alteration"));
+                     current_event_->get_property ("alteration"))
+      && ly_is_equal (augmented_,
+                     current_event_->get_property ("augmented"))
+      && ly_is_equal (diminished_,
+                     current_event_->get_property ("diminished"))
+      && ly_is_equal (augmented_slash_,
+                     current_event_->get_property ("augmented-slash"))
+      && ly_is_equal (text_,
+                     current_event_->get_property ("text"));
   }
 };
 
@@ -91,6 +118,10 @@ Figured_bass_engraver::derived_mark () const
     {
       scm_gc_mark (groups_[i].number_);
       scm_gc_mark (groups_[i].alteration_);
+      scm_gc_mark (groups_[i].augmented_);
+      scm_gc_mark (groups_[i].diminished_);
+      scm_gc_mark (groups_[i].augmented_slash_);
+      scm_gc_mark (groups_[i].text_);
     }
 }
 
@@ -162,10 +193,12 @@ Figured_bass_engraver::listen_bass_figure (Stream_event *ev)
   if (to_boolean (get_property ("useBassFigureExtenders")))
     {
       SCM fig = ev->get_property ("figure");
+      SCM txt = ev->get_property ("text");
       for (vsize i = 0; i < groups_.size (); i++)
        {
          if (!groups_[i].current_event_
-             && ly_is_equal (groups_[i].number_, fig))
+             && ly_is_equal (groups_[i].number_, fig)
+             && ly_is_equal (groups_[i].text_, txt))
            {
              groups_[i].current_event_ = ev;
              groups_[i].force_no_continuation_
@@ -348,6 +381,10 @@ Figured_bass_engraver::process_music ()
        {
          groups_[i].number_ = SCM_BOOL_F;
          groups_[i].alteration_ = SCM_BOOL_F;
+         groups_[i].augmented_ = SCM_BOOL_F;
+         groups_[i].diminished_ = SCM_BOOL_F;
+         groups_[i].augmented_slash_ = SCM_BOOL_F;
+         groups_[i].text_ = SCM_BOOL_F;
        }
     }
 
@@ -451,8 +488,12 @@ Figured_bass_engraver::create_grobs ()
          
          group.number_ = fig;
          group.alteration_ = group.current_event_->get_property ("alteration");
+         group.augmented_ = group.current_event_->get_property ("augmented");
+         group.diminished_ = group.current_event_->get_property ("diminished");
+         group.augmented_slash_ = group.current_event_->get_property ("augmented-slash");
+         group.text_ = group.current_event_->get_property ("text");
 
-         SCM text = group.current_event_->get_property ("text");
+         SCM text = group.text_;
          if (!Text_interface::is_markup (text)
              && ly_is_procedure (proc))
            {