]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/key-item.hh
release: 1.3.94
[lilypond.git] / lily / include / key-item.hh
index 3f4b7f30e067d962b82add51a2f885c102ad938b..706f65530fd915a26d922493c9bd5473b44ecc83 100644 (file)
@@ -1,34 +1,32 @@
 /*
   key-item.hh -- part of GNU LilyPond
 
-  (c) 1996,97 Han-Wen Nienhuys
+  (c) 1996--2000 Han-Wen Nienhuys
 */
 
 #ifndef KEYITEM_HH
 #define KEYITEM_HH
 
-#include "item.hh"
-#include "varray.hh"
+#include "lily-guile.hh"
+#include "lily-proto.hh"
 
+/**
+  A group of  accidentals.
 
-/// 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_;
+  Properties:
 
-    
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    SCORE_ELEM_CLONE(Key_item);
+  c0-position -- integer indicating the position of central C?
 
-    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;
+  old-accidentals -- list of (pitch, accidental) pairs
+
+  new-accidentals -- list of (pitch, accidental) pairs
+ */
+struct Key_item
+{
+  static int calculate_position(Score_element*,SCM pair) ;
+  static void set_interface (Score_element*);
+  static bool has_interface (Score_element*);
+  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
 };
 
 #endif // KEYITEM_HH