]> git.donarmstrong.com Git - lilypond.git/blob - lily/score-align-regs.cc
release: 0.0.71pre
[lilypond.git] / lily / score-align-regs.cc
1 /*
2   score-align-regs.cc -- implement different alignment registers.
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-reg.hh"
14
15 #define IMPLEMENT_ALIGN_REG(C,T,p)\
16 class C ## _align_register : public Score_align_register                \
17 {                                                                       \
18 public:                                                                 \
19     NAME_MEMBERS();                                                     \
20     C ## _align_register() : Score_align_register() \
21     { type_ch_C_ = T::static_name();\
22     priority_i_ = p;}   \
23 };                                                                      \
24 IMPLEMENT_STATIC_NAME(C ## _align_register)     ;                       \
25 ADD_THIS_REGISTER(C ## _align_register);                                \
26 IMPLEMENT_IS_TYPE_B1(C ## _align_register, Score_align_register)        ;
27
28
29 IMPLEMENT_ALIGN_REG(Key,Key_item,3);
30 IMPLEMENT_ALIGN_REG(Clef,Clef_item,2);
31 IMPLEMENT_ALIGN_REG(Meter,Meter,4);
32 IMPLEMENT_ALIGN_REG(Bar, Bar,0);
33