]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/staff-side.hh
partial: 1.1.61.jcn
[lilypond.git] / lily / include / staff-side.hh
index e24dfa62e6e200441752d7e6fac153f67149e5ad..76e764b13bbaf84585b13159e385fb56f5784a75 100644 (file)
@@ -1,40 +1,73 @@
-/*
-  staff-side.hh -- declare Staff_side
+/*   
+  staff-side.hh -- declare Staff_side_{element,spanner,item}
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
 
-  source file of the LilyPond music typesetter
+#ifndef STAFF_SIDE_HH
+#define STAFF_SIDE_HH
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
 
+#include "spanner.hh"
+#include "item.hh"
+#include "staff-symbol-referencer.hh"
 
-#ifndef STAFF_SIDE_HH
-#define STAFF_SIDE_HH
+/**
+   Position myself next to a set of elements.  Configurable in axis
+   and direction.
 
-#include "staff-elem.hh"
+  Properties:
 
-/// A symbol which sits along  the staff
-class Staff_side  {
-    Array<Staff_elem*> support_l_arr_;
+    padding :: Real
+
+    Amount of extra space to add.
+*/
+class Staff_side_element :  public Staff_symbol_referencer
+{
+  void position_self ();
 
-    Staff_symbol * staff_sym_l_;
-    Staff_elem * elem_l_;
-    Interval support_height()const;
 public:
-       /**
-      Vertical dir of symbol relative to staff. -1 = below staff?
-      */
-    int dir_i_;
-    
-    /// follow the support inside the staff?
-    bool inside_staff_b_;
-
-    void set_staffsym(Staff_symbol*);
+  Score_element * to_position_l_;
+  Direction dir_;
+  Link_array<Score_element> support_l_arr_;
+  Axis axis_;
+  //junkme.
+  bool staff_support_b_;
   
-    Staff_side(Staff_elem*);
-    void add_support(Staff_elem*);
-    
+  Staff_side_element ();
+  void set_victim (Score_element*);
+  void add_support (Score_element*);
+
+  VIRTUAL_COPY_CONS(Score_element);
+  virtual Direction get_default_direction () const;
 protected:
-    int get_position_i()const;
-    int get_position_i(Interval)const;
+  virtual Interval do_height () const;
+  virtual void do_print () const;
+  virtual void do_add_processing ();
+  virtual void do_substitute_element_pointer (Score_element*,Score_element*);
+  virtual void do_pre_processing ();
+  virtual void do_post_processing ();
 };
-#endif // STAFF_SIDE_HH
+
+class Staff_side_item : public Staff_side_element, public Item
+{
+public:
+  VIRTUAL_COPY_CONS(Score_element);
+protected:
+  virtual Interval do_width () const;
+  virtual void do_print () const;
+};
+
+class Staff_side_spanner : public Staff_side_element, public Spanner
+{
+public:
+  VIRTUAL_COPY_CONS(Score_element);
+protected:
+  virtual void do_print () const;
+};
+
+#endif /* STAFF_SIDE_HH */
+