]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.47
authorfred <fred>
Tue, 26 Mar 2002 23:21:28 +0000 (23:21 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:21:28 +0000 (23:21 +0000)
CHANGES
lily/clef-engraver.cc
lily/clef-item.cc
lily/include/clef-item.hh

diff --git a/CHANGES b/CHANGES
index 7250774b624d1c89650468bc04a1319078b3824b..ba1a1e5bdb48c5d6e7483bbe7759f48194c41749 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,16 @@
+1.3.46.jcn2
+===========
+
+* Drastically reduced vertical space used by headers/footers, when using
+  ly2dvi.  See input/test/fill-a4.ly.
+
+* Fixed bug with colons appearing on repeat span-bars.
+
+* Added Bar_number_engraver to standard Score context
+
+* Construct octavation scripts in the clef-engraver; this fixes the
+hara + clef8 problem
+
 1.3.46
 ======
 
index bfd3c54f5a2a565b046fa92c31447b948453a383..8df115231cec6fcfe66261b1edde1a880eed94a3 100644 (file)
@@ -9,6 +9,7 @@
 */
 
 #include <ctype.h>
+
 #include "staff-symbol-referencer.hh"
 #include "bar.hh"
 #include "clef-item.hh"
 #include "array.hh"
 #include "engraver.hh"
 #include "direction.hh"
+#include "side-position-interface.hh"
+#include "text-item.hh"
 
 /// where is c-0 in the staff?
 class Clef_engraver : public  Engraver {
   Clef_item * clef_p_;
+  Text_item * octavate_p_;
   Clef_change_req * clef_req_l_;
+  
   void create_clef();
   bool set_type (String);
 protected:
@@ -55,6 +60,7 @@ Clef_engraver::Clef_engraver()
   c0_position_i_ = 0;
   clef_position_i_ = 0;
   octave_dir_ = CENTER;
+  octavate_p_ = 0;
 }
 
 bool
@@ -177,7 +183,21 @@ Clef_engraver::create_clef()
   si.set_position (clef_position_i_);
   if (octave_dir_)
     {
-      clef_p_->set_elt_property ("octave-dir", gh_int2scm (octave_dir_));
+      Text_item * g = new Text_item;
+      Side_position_interface spi (g);
+      spi.set_axis (Y_AXIS);
+      spi.add_support (clef_p_);
+      g->set_elt_property ("text", ly_str02scm ( "8"));
+      g->set_elt_property ("style", gh_str02scm ("italic"));
+      g->set_parent (clef_p_, Y_AXIS);
+      g->set_parent (clef_p_, X_AXIS);
+         
+      g->set_elt_property ("self-alignment-X", gh_int2scm (0));
+      g->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS);
+      g->add_offset_callback (Side_position_interface::centered_on_parent, X_AXIS);
+      g->set_elt_property ("direction", gh_int2scm (octave_dir_));
+      octavate_p_ = g;
+      announce_element (Score_element_info (octavate_p_, clef_req_l_));
     }
 }
 
@@ -198,11 +218,19 @@ Clef_engraver::do_pre_move_processing()
   if (clef_p_)
     {
       if(to_boolean (clef_p_->remove_elt_property("non-default")))
-        clef_p_->set_elt_property("visibility-lambda",
-                                  scm_eval (ly_symbol2scm ("all-visible")));
-      
+       {
+         SCM all = scm_eval (ly_symbol2scm ("all-visible"));
+         clef_p_->set_elt_property("visibility-lambda", all);
+         if (octavate_p_)
+           octavate_p_->set_elt_property("visibility-lambda", all);
+       }
       typeset_element (clef_p_);
       clef_p_ =0;
+
+      if (octavate_p_)
+       typeset_element(octavate_p_);
+
+      octavate_p_ = 0;
     }
 }
 
@@ -212,8 +240,5 @@ Clef_engraver::do_post_move_processing()
   clef_req_l_ = 0;
 }
 
-
-
-
 ADD_THIS_TRANSLATOR(Clef_engraver);
 
index af14a41828c35d82ab9509bc4b608b1ec8e6d5fa..f0a8b8566f9d8175ae8bd1b423f2a4798ca33873 100644 (file)
@@ -52,42 +52,4 @@ Clef_item::before_line_breaking ()
 }
 
 
-void
-Clef_item::do_add_processing ()
-{
-  if (!break_status_dir ())    // broken stuff takes care of their own texts
-    {
-      Text_item *g =0;
-
-      SCM octave_dir = remove_elt_property ("octave-dir");
-      if (isdir_b (octave_dir))
-       {
-         g = new Text_item;
-         Side_position_interface spi (g);
-         spi.set_axis (Y_AXIS);
-         
-         pscore_l_->line_l_->typeset_element (g);
-      
-         spi.add_support (this);
-         g->set_elt_property ("text", ly_str02scm ( "8"));
-         g->set_elt_property ("style", gh_str02scm ("italic"));
-         g->set_parent (this, Y_AXIS);
-         g->set_parent (this, X_AXIS);
-         
-         g->set_elt_property ("self-alignment-X", gh_int2scm (0));
-         g->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS);
-         g->add_offset_callback (Side_position_interface::centered_on_parent, X_AXIS);
-
-         g->set_elt_property ("direction", octave_dir);
-         
-         add_dependency (g);   // just to be sure.
-         SCM my_vis = get_elt_property ("visibility-lambda");
-         if (gh_procedure_p (my_vis))
-           g->set_elt_property ("visibility-lambda", my_vis);
-                       
-       }
-
-    }
-}
-
 
index 60322e19ed3f59c38c67267b2b78b5f300eb63c6..758e42a8a6458eadc3ccaa8b336b825a435eccec 100644 (file)
 
   properties:
 
-  nondefault: not set because of existence of a bar
+  nondefault -- not set because of existence of a bar?
 
-  octave_dir: should we print an octave symbol (8), and where? (up=1, down=-1)?
+  change -- is this a change clef (smaller size)?
 
-  change: is this a change clef (smaller size)?
+  glyph -- a string determining what glyph is typeset
   
  */
 class Clef_item : public Item
 {
 protected:
   virtual void before_line_breaking ();
-  virtual void do_add_processing ();
 public:
   VIRTUAL_COPY_CONS(Score_element);
 };