]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/key-item.hh
release: 1.3.94
[lilypond.git] / lily / include / key-item.hh
index 2984d563200460242b4fd71727d4fffaa5b896f6..706f65530fd915a26d922493c9bd5473b44ecc83 100644 (file)
@@ -1,42 +1,32 @@
 /*
   key-item.hh -- part of GNU LilyPond
 
-  (c) 1996--1998 Han-Wen Nienhuys
+  (c) 1996--2000 Han-Wen Nienhuys
 */
 
 #ifndef KEYITEM_HH
 #define KEYITEM_HH
 
-#include "item.hh"
-#include "array.hh"
-
-
-/// An item which places accidentals at the start of the line
-struct Key_item : Item {
-  Array<int> pitch_arr_;
-  Array<int> acc_arr_;
-  Array<int> old_pitch_arr_;
-  Array<int> old_acc_arr_;
-
-  // ugh.  Naming 
-  int c_position;
-  // see above.
-  int c0_position;
-  bool default_b_;
-  bool multi_octave_b_;
-    
-  
-  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 Key_item::calculate_position(int p, int a) const;
-
-protected:
-  virtual void do_pre_processing();
-  virtual Molecule* do_brew_molecule_p() const;
+#include "lily-guile.hh"
+#include "lily-proto.hh"
+
+/**
+  A group of  accidentals.
+
+  Properties:
+
+  c0-position -- integer indicating the position of central C?
+
+  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