]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/staff-side.hh
release: 1.1.51
[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
18 /**
19    Position myself next to a set of elements.  Configurable in axis
20    and direction.
21
22   Properties:
23
24     padding :: Real
25
26     Amount of extra space to add.
27 */
28 class Staff_side_element :  public Staff_symbol_referencer
29 {
30   void position_self ();
31
32 public:
33   Score_element * to_position_l_;
34   Direction dir_;
35   Link_array<Score_element> support_l_arr_;
36   Axis axis_;
37   //junkme.
38   bool staff_support_b_;
39   
40   Staff_side_element ();
41   void set_victim (Score_element*);
42   void add_support (Score_element*);
43
44   VIRTUAL_COPY_CONS(Score_element);
45   virtual Direction get_default_direction () const;
46 protected:
47   virtual Interval do_height () const;
48   virtual void do_print () const;
49   virtual void do_add_processing ();
50   virtual void do_substitute_element_pointer (Score_element*,Score_element*);
51   virtual void do_pre_processing ();
52   virtual void do_post_processing ();
53 };
54
55 class Staff_side_item : public Staff_side_element, public Item
56 {
57 public:
58   VIRTUAL_COPY_CONS(Score_element);
59 protected:
60   virtual Interval do_width () const;
61   virtual void do_print () const;
62 };
63
64 class Staff_side_spanner : public Staff_side_element, public Spanner
65 {
66 public:
67   VIRTUAL_COPY_CONS(Score_element);
68 protected:
69   virtual void do_print () const;
70 };
71
72 #endif /* STAFF_SIDE_HH */
73