]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/stem.hh
release: 1.3.19
[lilypond.git] / lily / include / stem.hh
index 7da90a36493009e90690d4a1ab0b6d3943364217..2f8298c4d80192d865e55d3b44ed62b768eab419 100644 (file)
@@ -1,7 +1,7 @@
 /*
   stem.hh -- declare Stem
 
-  (c) 1996--1999 Han-Wen Nienhuys
+  (c) 1996--2000 Han-Wen Nienhuys
 */
 
 #ifndef STEM_HH
@@ -11,7 +11,6 @@
 #include "array.hh"
 #include "moment.hh"
 #include "molecule.hh"
-#include "directional-element.hh"
 #include "stem-info.hh"
 
 /**the rule attached to the ball.
 
   
   */
-class Stem : public Item,
-            public Directional_element
+class Stem : public Item
 {
-
-  /**extent of the stem (positions).
-    fractional, since Beam has to adapt them.
-    */
-  Interval yextent_;
-
 public:
   /// log of the duration. Eg. 4 -> 16th note -> 2 flags
   int flag_i () const;
@@ -62,35 +54,38 @@ public:
    */
   Beam* beam_l () const;
   Note_head * first_head () const;
+  Drul_array<Note_head*> extremal_heads () const;
+
   Score_element * support_head () const;
   Stem ();
+
   /// ensure that this Stem also encompasses the Notehead #n#
   void add_head (Rhythmic_head*n);
 
-  Real hpos_f () const;
   Stem_info calc_stem_info () const;
 
   Real chord_start_f () const;
-  
+  Direction get_direction () const;
   int type_i () const;
   void set_stemend (Real);
   Direction get_default_dir() const;
 
   int get_center_distance(Direction) const;
-
-  void set_default_stemlen();
-  void set_default_extents();
-  void set_noteheads();
-
-  Real stem_end_f() const;
-  Real stem_begin_f() const;
-  Real note_delta_f () const;
+  int heads_i () const;
 
   bool invisible_b() const;
     
   /// heads that the stem encompasses (positions)
-  Interval_t<int> head_positions() const;
+  Interval head_positions() const;
+
+protected:
+  friend class Stem_tremolo;   // ugh.
+  Real  get_default_stem_end_position () const;
+  void position_noteheads();
+
 
+  Real stem_end_position () const;
+  static Real off_callback (Dimension_cache const*);
 protected:
   Molecule flag () const;