lilypond-1.3.28
[lilypond.git] / lily / score-align-gravs.cc
blob28bb70bcc81473a935fe7a76464fc0f6e6c2c673
1 /*
2 score-align-gravs.cc -- implement different alignment engravers.
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "key-item.hh"
10 #include "clef-item.hh"
11 #include "meter.hh"
12 #include "bar.hh"
13 #include "score-align-grav.hh"
14 #include "score-bar.hh"
15 #include "normal-bar.hh"
17 #define IMPLEMENT_ALIGN_GRAV(C,T,p)\
18 class C ## _align_engraver : public Type_align_engraver \
19 { \
20 public: \
21 DECLARE_MY_RUNTIME_TYPEINFO; \
22 TRANSLATOR_CLONE(C ## _align_engraver);\
23 C ## _align_engraver() : Type_align_engraver () \
24 { type_ch_C_ = T::static_name();\
25 priority_i_ = p;} \
26 }; \
27 ADD_THIS_TRANSLATOR(C ## _align_engraver); \
28 IMPLEMENT_IS_TYPE_B1(C ## _align_engraver, Type_align_engraver) ;
31 IMPLEMENT_ALIGN_GRAV(Key,Key_item,3);
32 IMPLEMENT_ALIGN_GRAV(Clef,Clef_item,2);
33 IMPLEMENT_ALIGN_GRAV(Normal_bar, Normal_bar,4);
34 IMPLEMENT_ALIGN_GRAV(Meter,Meter,5);
35 IMPLEMENT_ALIGN_GRAV(Score_bar, Score_bar,0);