]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/staff-side.hh
81510632aa429d7acfd1f0c910bade5f94576cba
[lilypond.git] / lily / include / staff-side.hh
1 /*   
2   staff-side.hh -- declare Staff_side_{element,spanner,item}
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef STAFF_SIDE_HH
11 #define STAFF_SIDE_HH
12
13
14 #include "spanner.hh"
15 #include "item.hh"
16 #include "staff-symbol-referencer.hh"
17 #include "directional-element.hh"
18
19 /**
20    Position myself next to a set of elements.  Configurable in axis
21    and direction.
22
23   Properties:
24
25     padding :: Real
26
27     Amount of extra space to add.
28 */
29 class Staff_side_element :  public Staff_symbol_referencer,
30   public Directional_element
31 {
32   void position_self ();
33
34 public:
35   Score_element * to_position_l_;
36   
37
38   Link_array<Score_element> support_l_arr_;
39   Axis axis_;
40   //junkme.
41   bool staff_support_b_;
42   
43   Staff_side_element ();
44   void set_victim (Score_element*);
45   void add_support (Score_element*);
46
47   VIRTUAL_COPY_CONS(Score_element);
48   virtual Direction get_default_direction () const;
49 protected:
50   virtual Interval do_height () const;
51   virtual void do_print () const;
52   virtual void do_add_processing ();
53   virtual void do_substitute_element_pointer (Score_element*,Score_element*);
54   virtual void do_pre_processing ();
55   virtual void do_post_processing ();
56 };
57
58 class Staff_side_item : public Staff_side_element, public Item
59 {
60 public:
61   VIRTUAL_COPY_CONS(Score_element);
62 protected:
63   virtual Interval do_width () const;
64   virtual void do_print () const;
65 };
66
67 class Staff_side_spanner : public Staff_side_element, public Spanner
68 {
69 public:
70   VIRTUAL_COPY_CONS(Score_element);
71 protected:
72   virtual void do_print () const;
73 };
74
75 #endif /* STAFF_SIDE_HH */
76