]> git.donarmstrong.com Git - lilypond.git/blob - lily/score-align-gravs.cc
release: 0.1.13
[lilypond.git] / lily / score-align-gravs.cc
1 /*
2   score-align-gravs.cc -- implement different alignment engravers.
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
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
15 #define IMPLEMENT_ALIGN_GRAV(C,T,p)\
16 class C ## _align_engraver : public Type_align_engraver         \
17 {                                                                       \
18 public:                                                                 \
19   DECLARE_MY_RUNTIME_TYPEINFO;                                  \
20   TRANSLATOR_CLONE(C ## _align_engraver);\
21   C ## _align_engraver() : Type_align_engraver () \
22   { type_ch_C_ = T::static_name();\
23   priority_i_ = p;}     \
24 };                                                                      \
25 ADD_THIS_TRANSLATOR(C ## _align_engraver);                              \
26 IMPLEMENT_IS_TYPE_B1(C ## _align_engraver, Type_align_engraver)         ;
27
28
29 IMPLEMENT_ALIGN_GRAV(Key,Key_item,3);
30 IMPLEMENT_ALIGN_GRAV(Clef,Clef_item,2);
31 IMPLEMENT_ALIGN_GRAV(Meter,Meter,4);
32 IMPLEMENT_ALIGN_GRAV(Bar, Bar,0);
33