]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/staff-side.hh
release: 1.0.1
[lilypond.git] / lily / include / staff-side.hh
index 13008710236084287a239abb1ed5c5e79c7b7f58..5c95249868cae6799fbd45007740c7d61e81512c 100644 (file)
@@ -1,42 +1,60 @@
 /*
   staff-side.hh -- declare Staff_side
 
-  source file of the LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef STAFF_SIDE_HH
 #define STAFF_SIDE_HH
 
-#include "staff-elem.hh"
+#include "score-element.hh"
+#include "interval.hh"
+#include "direction.hh"
 
-/// A symbol which sits along  the staff
-class Staff_side  {
-    Array<Staff_elem*> support_l_arr_;
-    int staff_size_i_;
-    Staff_elem * elem_l_;
-    Interval support_height()const;
-    Staff_symbol* staff_sym_l_;
-    void read_staff_sym();
+/**
+
+   A symbol which sits either below or above "something" (usually, a
+   staff).
+
+*/
+class Staff_side : virtual Score_element
+{
 public:
-    Real inter_f_;
-    /**
-      Vertical dir of symbol relative to staff. -1 = below staff?
-      */
-    int dir_i_;
+
+  /**
+    Vertical dir of symbol relative to staff. -1 = below staff?
+    */
+  Direction dir_;
+  Axis axis_;
+  Interval sym_int_;
     
-    /// follow the support inside the staff?
-    bool inside_staff_b_;
+  Real coordinate_offset_f_;
 
-    void set_staffsym(Staff_symbol*);
-  
-    Staff_side(Staff_elem*);
-    void add_support(Staff_elem*);
+  /**
+     Add extra vertical space to the support symbols.
+   */
+  Real padding_f_;
+
+  Staff_side ();
+  void add_support (Score_element*);
+  DECLARE_MY_RUNTIME_TYPEINFO;
     
 protected:
-    int get_position_i()const;
-    int get_position_i(Interval)const;
+  virtual Interval symbol_height () const;
+  virtual Interval symbol_width () const;
+  Interval symbol_extent () const;
+  virtual Real get_position_f () const;
+  virtual void do_substitute_dependency (Score_element *, Score_element*);
+  virtual void do_pre_processing ();
+  virtual void do_post_processing ();
+  Interval support_extent () const;
+
+private:
+  void do_side_processing ();
+  Link_array<Score_element> support_l_arr_;
 };
+
 #endif // STAFF_SIDE_HH