2 staff-symbol-engraver.cc -- implement Staff_symbol_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "staff-symbol.hh"
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
{
21 Staff_symbol
*span_p_
;
23 VIRTUAL_COPY_CONS(Translator
);
24 Staff_symbol_engraver();
27 virtual ~Staff_symbol_engraver();
29 virtual void acknowledge_element (Score_element_info
);
30 virtual void do_removal_processing();
31 virtual void do_creation_processing();
36 Staff_symbol_engraver::~Staff_symbol_engraver()
41 Staff_symbol_engraver::Staff_symbol_engraver()
47 Staff_symbol_engraver::do_creation_processing()
49 span_p_
= new Staff_symbol (get_property ("staffSymbolBasicProperties"));
50 span_p_
->set_bound(LEFT
,unsmob_element (get_property ("currentCommandColumn")));
52 announce_element (Score_element_info (span_p_
, 0));
56 Staff_symbol_engraver::do_removal_processing()
58 SCM n
= get_property ("numberOfStaffLines");
59 SCM ss
= get_property ("staffSpace");
62 span_p_
->set_elt_property ("staff-space", ss
);
64 span_p_
->set_elt_property ("line-count", n
);
66 span_p_
->set_bound(RIGHT
,unsmob_element (get_property ("currentCommandColumn")));
67 typeset_element (span_p_
);
72 Staff_symbol_engraver::acknowledge_element (Score_element_info s
)
74 s
.elem_l_
->set_elt_pointer ("staff-symbol", span_p_
->self_scm_
);
75 s
.elem_l_
->add_dependency (span_p_
); // UGH. UGH. UGH
79 ADD_THIS_TRANSLATOR(Staff_symbol_engraver
);