X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Flocal-key-item.hh;h=931c984c6ea43a3fba9bf58c77ea1591a84b15f5;hb=876ccb4004d92f3b7bd539753f8f9339b7d48490;hp=96bad9999e79352ff42dbdffb6ae30cc9e779514;hpb=daee8243ff1c66bc714455a2d265ab02f03546ec;p=lilypond.git diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index 96bad9999e..931c984c6e 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -1,33 +1,57 @@ /* - local-key-item.hh -- part of LilyPond + local-key-item.hh -- part of GNU LilyPond - (c) 1996,97 Han-Wen Nienhuys + (c) 1996--1999 Han-Wen Nienhuys */ #ifndef LOCALKEYITEM_HH #define LOCALKEYITEM_HH #include "item.hh" -#include "varray.hh" +#include "array.hh" +#include "musical-pitch.hh" +#include "staff-symbol-referencer.hh" +#include "note-head-side.hh" -struct Local_acc { - int name , acc, octave; - static int compare(Local_acc&, Local_acc&); +struct Local_key_cautionary_tuple +{ + Musical_pitch pitch_; + bool cautionary_b_; + bool natural_b_; + + Local_key_cautionary_tuple () + { + cautionary_b_ = false; + natural_b_ = false; + } + static int compare (Local_key_cautionary_tuple const&s1, Local_key_cautionary_tuple const&s2) + { + return Musical_pitch::compare (s1.pitch_, s2.pitch_); + } }; -struct Local_key_item : Item { -NAME_MEMBERS(Local_key_item); - Array accs; - Array support_items_; - int c0_position; - - /* *************** */ - - Local_key_item(int c0position); - void add(Item*); - void add(int oct, int pitch, int acc); - void add(Melodic_req*); - void do_pre_processing(); - Molecule* brew_molecule_p()const; +/** + Accidentals which can be different for each octave. + + + TODO + + Make an item for each accidental separately, and make a + Accidental_column to group them. + + */ + +class Local_key_item : public Note_head_side, public Staff_symbol_referencer { + Array accidental_arr_; + + Molecule accidental (int,bool) const; +public: + int c0_position_i_; + Local_key_item (); + void add_pitch (Musical_pitch, bool cautionary, bool natural); +protected: + virtual void do_pre_processing(); + virtual void do_substitute_element_pointer (Score_element*,Score_element*); + virtual Molecule* do_brew_molecule_p() const; }; #endif // LOCALKEYITEM_HH