-/*
- staff-side.hh -- declare Staff_side
-
+/*
+ staff-side.hh -- declare Staff_side_{element,spanner,item}
+
source file of the GNU LilyPond music typesetter
-
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
#ifndef STAFF_SIDE_HH
#define STAFF_SIDE_HH
-#include "score-elem.hh"
-#include "interval.hh"
-#include "direction.hh"
-/** A symbol which sits along a staff.
+#include "spanner.hh"
+#include "item.hh"
+#include "staff-symbol-referencer.hh"
- */
-class Staff_side : virtual Score_elem {
- Link_array<Score_elem> support_l_arr_;
- int staff_size_i_;
- Interval support_height() const;
- Staff_symbol* staff_sym_l_;
- Real get_position_f() const;
+/**
+ Position myself next to a set of elements. Configurable in axis
+ and direction.
- void read_staff_sym();
-public:
+ Properties:
+
+ padding :: Real
+
+ Amount of extra space to add.
+*/
+class Staff_side_element : public Staff_symbol_referencer
+{
+ void position_self ();
- /**
- Vertical dir of symbol relative to staff. -1 = below staff?
- */
+public:
+ Score_element * to_position_l_;
Direction dir_;
- Interval sym_int_;
-
- /// follow the support inside the staff?
- bool inside_staff_b_;
+ Link_array<Score_element> support_l_arr_;
+ Axis axis_;
+ //junkme.
+ bool staff_support_b_;
+
+ Staff_side_element ();
+ void set_victim (Score_element*);
+ void add_support (Score_element*);
- Real y_;
+ VIRTUAL_COPY_CONS(Score_element);
+ virtual Direction get_default_direction () const;
+protected:
+ 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 ();
+};
+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;
+};
- void set_staffsym (Staff_symbol * );
-
- Staff_side();
- void add_support (Score_elem*);
- DECLARE_MY_RUNTIME_TYPEINFO;
-
+class Staff_side_spanner : public Staff_side_element, public Spanner
+{
+public:
+ VIRTUAL_COPY_CONS(Score_element);
protected:
- virtual Interval symbol_height() const;
- virtual void do_substitute_dependency (Score_elem *, Score_elem*);
- virtual void do_post_processing();
+ virtual void do_print () const;
};
-#endif // STAFF_SIDE_HH
+
+#endif /* STAFF_SIDE_HH */
+