From: fred Date: Sun, 24 Mar 2002 19:56:50 +0000 (+0000) Subject: lilypond-1.0.1 X-Git-Tag: release/1.5.59~3939 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=68591a9643a30e4565b53ad38e281d1b5345c041;p=lilypond.git lilypond-1.0.1 --- diff --git a/lily/include/key-engraver.hh b/lily/include/key-engraver.hh new file mode 100644 index 0000000000..ce154b12da --- /dev/null +++ b/lily/include/key-engraver.hh @@ -0,0 +1,44 @@ +/* + key-engraver.hh -- declare Key_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1997--1998 Han-Wen Nienhuys +*/ + + +#ifndef KEYGRAV_HH +#define KEYGRAV_HH + +#include "engraver.hh" +#include "key.hh" +#include "musical-pitch.hh" + +/** + Make the key signature. + */ +class Key_engraver : public Engraver { + void create_key(); + void read_req (Key_change_req const * r); + +public: + Key_engraver(); + DECLARE_MY_RUNTIME_TYPEINFO; + TRANSLATOR_CLONE(Key_engraver); + Key key_; + Key_change_req * keyreq_l_; + Key_item * kit_p_; + Array accidental_idx_arr_; + Array old_accidental_idx_arr_; + bool default_key_b_; + bool change_key_b_; + +protected: + virtual bool do_try_request (Request *req_l); + virtual void do_process_requests(); + virtual void do_pre_move_processing(); + virtual void do_post_move_processing(); + virtual void acknowledge_element (Score_element_info); +}; + +#endif // KEYGRAV_HH diff --git a/lily/include/key-item.hh b/lily/include/key-item.hh index 3f4b7f30e0..9056db33b8 100644 --- a/lily/include/key-item.hh +++ b/lily/include/key-item.hh @@ -1,34 +1,42 @@ /* key-item.hh -- part of GNU LilyPond - (c) 1996,97 Han-Wen Nienhuys + (c) 1996--1998 Han-Wen Nienhuys */ #ifndef KEYITEM_HH #define KEYITEM_HH #include "item.hh" -#include "varray.hh" +#include "array.hh" /// An item which places accidentals at the start of the line struct Key_item : Item { - Array pitch; - Array acc; - int c_position; - bool default_b_; - + Array pitch; + Array acc; + Array old_pitch; + Array old_acc; + int c_position; + int c0_position; + bool default_b_; + bool multi_octave_b_; - DECLARE_MY_RUNTIME_TYPEINFO; - SCORE_ELEM_CLONE(Key_item); + DECLARE_MY_RUNTIME_TYPEINFO; + SCORE_ELEMENT_CLONE(Key_item); + + Key_item (); + void add (int pitch, int acc); + void add (const Musical_pitch&); + void add_old (int pitch, int acc); + void add_old (const Musical_pitch&); + void read (const Key_engraver&); + void set_c_position (int); + int Key_item::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 void do_pre_processing(); + Molecule* brew_molecule_p() const; }; #endif // KEYITEM_HH