2 staff-symbol-engraver.cc -- implement Staff_symbol_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
11 #include "paper-column.hh"
12 #include "paper-def.hh"
13 #include "side-position-interface.hh"
14 #include "engraver.hh"
18 Manage the staff symbol.
20 class Staff_symbol_engraver
: public Engraver
{
23 VIRTUAL_COPY_CONS (Translator
);
24 Staff_symbol_engraver ();
27 virtual ~Staff_symbol_engraver ();
28 virtual void acknowledge_grob (Grob_info
);
29 virtual void finalize ();
30 virtual void initialize ();
34 Staff_symbol_engraver::~Staff_symbol_engraver ()
39 Staff_symbol_engraver::Staff_symbol_engraver ()
45 Staff_symbol_engraver::initialize ()
47 span_p_
= new Spanner (get_property ("StaffSymbol"));
49 span_p_
->set_bound (LEFT
, unsmob_grob (get_property ("currentCommandColumn")));
51 announce_grob (span_p_
, 0);
55 Staff_symbol_engraver::finalize ()
57 span_p_
->set_bound (RIGHT
,unsmob_grob (get_property ("currentCommandColumn")));
58 typeset_grob (span_p_
);
63 Staff_symbol_engraver::acknowledge_grob (Grob_info s
)
65 s
.elem_l_
->set_grob_property ("staff-symbol", span_p_
->self_scm ());
67 // remove this. probly not necessary?
68 s
.elem_l_
->add_dependency (span_p_
); // UGH. UGH. UGH
72 ADD_THIS_TRANSLATOR (Staff_symbol_engraver
);