]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/key-item.hh
9056db33b8761c2e813d93daba8c79145dd0b1e9
[lilypond.git] / lily / include / key-item.hh
1 /*
2   key-item.hh -- part of GNU LilyPond
3
4   (c) 1996--1998 Han-Wen Nienhuys
5 */
6
7 #ifndef KEYITEM_HH
8 #define KEYITEM_HH
9
10 #include "item.hh"
11 #include "array.hh"
12
13
14 /// An item which places accidentals at the start of the line
15 struct Key_item : Item {
16   Array<int> pitch;
17   Array<int> acc;
18   Array<int> old_pitch;
19   Array<int> old_acc;
20   int c_position;
21   int c0_position;
22   bool default_b_;
23   bool multi_octave_b_;
24     
25   DECLARE_MY_RUNTIME_TYPEINFO;
26   SCORE_ELEMENT_CLONE(Key_item);
27
28   Key_item ();
29   void add (int pitch, int acc);
30   void add (const Musical_pitch&);
31   void add_old (int pitch, int acc);
32   void add_old (const Musical_pitch&);
33   void read (const Key_engraver&);
34   void set_c_position (int);
35   int Key_item::calculate_position(int p, int a) const;
36
37 protected:
38   virtual void do_pre_processing();
39   Molecule* brew_molecule_p() const;
40 };
41
42 #endif // KEYITEM_HH