]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.0.1
authorfred <fred>
Sun, 24 Mar 2002 19:56:50 +0000 (19:56 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:56:50 +0000 (19:56 +0000)
lily/include/key-engraver.hh [new file with mode: 0644]
lily/include/key-item.hh

diff --git a/lily/include/key-engraver.hh b/lily/include/key-engraver.hh
new file mode 100644 (file)
index 0000000..ce154b1
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+  key-engraver.hh -- declare Key_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#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<Musical_pitch> accidental_idx_arr_;
+  Array<Musical_pitch> 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
index 3f4b7f30e067d962b82add51a2f885c102ad938b..9056db33b8761c2e813d93daba8c79145dd0b1e9 100644 (file)
@@ -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<int> pitch;
-    Array<int> acc;
-    int c_position;
-    bool default_b_;
-
+  Array<int> pitch;
+  Array<int> acc;
+  Array<int> old_pitch;
+  Array<int> 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