From: fred Date: Tue, 26 Mar 2002 23:21:28 +0000 (+0000) Subject: lilypond-1.3.47 X-Git-Tag: release/1.5.59~1650 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f788fe1be02b15d303dac6445190c502e1b33b05;p=lilypond.git lilypond-1.3.47 --- diff --git a/CHANGES b/CHANGES index 7250774b62..ba1a1e5bdb 100644 --- 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 ====== diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index bfd3c54f5a..8df115231c 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -9,6 +9,7 @@ */ #include + #include "staff-symbol-referencer.hh" #include "bar.hh" #include "clef-item.hh" @@ -21,11 +22,15 @@ #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); diff --git a/lily/clef-item.cc b/lily/clef-item.cc index af14a41828..f0a8b8566f 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -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); - - } - - } -} - diff --git a/lily/include/clef-item.hh b/lily/include/clef-item.hh index 60322e19ed..758e42a8a6 100644 --- a/lily/include/clef-item.hh +++ b/lily/include/clef-item.hh @@ -16,18 +16,17 @@ 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); };