+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
======
*/
#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:
c0_position_i_ = 0;
clef_position_i_ = 0;
octave_dir_ = CENTER;
+ octavate_p_ = 0;
}
bool
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_));
}
}
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;
}
}
clef_req_l_ = 0;
}
-
-
-
ADD_THIS_TRANSLATOR(Clef_engraver);
}
-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);
-
- }
-
- }
-}
-
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);
};