]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/piano-pedal-engraver.cc
($(outdir)/%.pdf): add DVIPS_FLAGS. This will
[lilypond.git] / lily / piano-pedal-engraver.cc
index 0a9ddd16028bdae38cb88829364f8505ae92253f..77283f3bce6442ec8bcaa617e1b5cd8b50cd12fe 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
- (c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
   
   Chris Jackson <chris@fluffhouse.org.uk> - extended to support
   bracketed pedals.
@@ -159,19 +159,7 @@ Piano_pedal_engraver::acknowledge_grob (Grob_info info)
 bool
 Piano_pedal_engraver::try_music (Music *m)
 {
-  if (m->is_mus_type ("abort-event"))
-    {
-      for (Pedal_info*p = info_list_; p->name_; p ++)
-       {
-         p->event_drul_[START] = 0;
-         p->event_drul_[STOP] = 0;
-         
-         if (p->bracket_)
-           p->bracket_->suicide ();
-         p->bracket_ = 0;
-       }
-    }
-  else if  (m->is_mus_type ("pedal-event"))
+ if  (m->is_mus_type ("pedal-event"))
     {
       for (Pedal_info*p = info_list_; p->name_; p ++)
        {
@@ -198,7 +186,7 @@ Piano_pedal_engraver::process_music ()
          if (!p->line_spanner_)
            {
              String name  = String (p->name_) + "PedalLineSpanner";
-             p->line_spanner_ = new Spanner (get_property (name.to_str0 ()));
+             p->line_spanner_ = make_spanner (name.to_str0 ());
 
              Music * rq = (p->event_drul_[START]  ?  p->event_drul_[START]  :  p->event_drul_[STOP]);
              announce_grob (p->line_spanner_, rq->self_scm ());
@@ -309,8 +297,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
     {
       String propname = String (p->name_) + "Pedal";
 
-      SCM b = get_property (propname.to_str0 ());
-      p->item_ = new Item (b);
+      p->item_ = make_item (propname.to_str0 ());
       p->item_->set_grob_property ("text", s);
       Axis_group_interface::add_element (p->line_spanner_, p->item_);
          
@@ -353,7 +340,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
        p->bracket_->set_bound (RIGHT, cmc);
 
       /*
-       Set properties so that the molecule-creating function will
+       Set properties so that the stencil-creating function will
        know whether the right edge should be flared ___/
        */
 
@@ -374,10 +361,10 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       p->start_ev_ = p->event_drul_[START];
       p->current_bracket_ev_ = p->event_drul_[START];
 
-      p->bracket_  = new Spanner (get_property ("PianoPedalBracket"));
+      p->bracket_  = make_spanner ("PianoPedalBracket");
 
       /*
-       Set properties so that the molecule-creating function will
+       Set properties so that the stencil-creating function will
        know whether the left edge should be flared \___
       */
 
@@ -389,7 +376,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
 
 
       /* Set this property for 'mixed style' pedals,    Ped._______/\ ,  
-        so the molecule function will shorten the ____ line by the length of the Ped. text.
+        so the stencil function will shorten the ____ line by the length of the Ped. text.
       */
 
       if (mixed)
@@ -545,7 +532,6 @@ Piano_pedal_engraver::typeset_all ()
 
       if (p->finished_line_spanner_)
        {
-         Side_position_interface::add_staff_support (p->finished_line_spanner_);
          Grob * l = p->finished_line_spanner_->get_bound (LEFT);
          Grob * r = p->finished_line_spanner_->get_bound (RIGHT);      
          if (!r && l)
@@ -568,7 +554,7 @@ Piano_pedal_engraver::typeset_all ()
 ENTER_DESCRIPTION (Piano_pedal_engraver,
 /* descr */       "Engrave piano pedal symbols and brackets.",
 /* creats*/       "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner",
-/* accepts */     "pedal-event abort-event",
+/* accepts */     "pedal-event",
 /* acks  */       "note-column-interface",
 /* reads */       "pedalSostenutoStrings pedalSustainStrings pedalUnaCordaStrings pedalSostenutoStyle pedalSustainStyle pedalUnaCordaStyle",
 /* write */       "");