/*
key-item.hh -- part of GNU LilyPond
- (c) 1996,97 Han-Wen Nienhuys
+ (c) 1996--1999 Han-Wen Nienhuys
*/
#ifndef KEYITEM_HH
#define KEYITEM_HH
#include "item.hh"
-#include "varray.hh"
-
+#include "array.hh"
+#include "staff-symbol-referencer.hh"
/// An item which places accidentals at the start of the line
-struct Key_item : Item {
- Array<int> pitch;
- Array<int> acc;
- int c_position;
- bool default_b_;
+class Key_item :public Item, public Staff_symbol_referencer {
+ Array<int> pitch_arr_;
+ Array<int> acc_arr_;
+ Array<int> old_pitch_arr_;
+ Array<int> old_acc_arr_;
+ int c0_position_;
+
+public:
+ bool multi_octave_b_;
+
+ int get_c_position () const;
- DECLARE_MY_RUNTIME_TYPEINFO;
- SCORE_ELEM_CLONE(Key_item);
+
+ VIRTUAL_COPY_CONS(Score_element);
+
+ Key_item ();
+ void add (int pitch, int acc);
+ void add_old (int pitch, int acc);
+ void set_c_position (int);
+ int calculate_position(int p, int a) const;
- Key_item(int cposition);
- void add(int pitch, int acc);
- void read(const Key_engraver&);
- void set_c_position(int);
protected:
- virtual void do_pre_processing();
- Molecule* brew_molecule_p()const;
+ virtual Molecule* do_brew_molecule_p() const;
};
#endif // KEYITEM_HH