source file of the GNU LilyPond music typesetter
- (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>,
+ (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>,
Mats Bengtsson <matsb@s3.kth.se>
*/
#include <cctype>
+using namespace std;
#include "context.hh"
#include "bar-line.hh"
void
Clef_engraver::set_glyph ()
{
- SCM glyph_sym = ly_symbol2scm ("glyph-name");
- SCM glyph = get_property ("clefGlyph");
-
+ SCM glyph_sym = ly_symbol2scm ("glyph");
SCM basic = ly_symbol2scm ("Clef");
execute_pushpop_property (context (), basic, glyph_sym, SCM_UNDEFINED);
- execute_pushpop_property (context (), basic, glyph_sym, glyph);
+ execute_pushpop_property (context (), basic, glyph_sym, get_property ("clefGlyph"));
}
/**
{
Item *item = dynamic_cast<Item *> (info.grob ());
if (item && scm_is_string (get_property ("clefGlyph")))
- {
- create_clef ();
- }
+ create_clef ();
}
void
SCM octavation = get_property ("clefOctavation");
SCM force_clef = get_property ("forceClef");
- if (clefpos == SCM_EOL
- || scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F
- || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F
- || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F
- || to_boolean (force_clef))
+ if (clefpos == SCM_EOL
+ || scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F
+ || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F
+ || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F
+ || to_boolean (force_clef))
{
+ set_context_property_on_children (context (),
+ ly_symbol2scm ("localKeySignature"),
+ get_property ("keySignature"));
+
set_glyph ();
if (prev_cpos_ != SCM_BOOL_F || to_boolean (get_property ("firstClef")))
create_clef ();
{
SCM vis = 0;
if (to_boolean (clef_->get_property ("non-default")))
- {
- vis = get_property ("explicitClefVisibility");
- }
+ vis = get_property ("explicitClefVisibility");
if (vis)
{
clef_->set_property ("break-visibility", vis);
if (octavate_)
- {
- octavate_->set_property ("break-visibility", vis);
- }
+ octavate_->set_property ("break-visibility", vis);
}
clef_ = 0;
ADD_ACKNOWLEDGER (Clef_engraver, bar_line);
ADD_TRANSLATOR (Clef_engraver,
- /* descr */ "Determine and set reference point for pitches",
- /* creats*/ "Clef OctavateEight",
- /* accepts */ "",
- /* reads */ "clefPosition clefGlyph middleCPosition clefOctavation explicitClefVisibility forceClef",
+ /* doc */ "Determine and set reference point for pitches",
+ /* create */ "Clef OctavateEight",
+ /* accept */ "",
+ /* read */ "clefPosition clefGlyph middleCPosition clefOctavation explicitClefVisibility forceClef",
/* write */ "");