]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/staff-side.hh
release: 1.3.3
[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   Direction dir_;
32 public:
33   Score_element * to_position_l_;
34   
35   void set_direction (Direction d ) { dir_ =  d; }
36   Direction get_direction () const { return dir_; }
37   
38
39   Link_array<Score_element> support_l_arr_;
40   Axis axis_;
41   //junkme.
42   bool staff_support_b_;
43   
44   Staff_side_element ();
45   void set_victim (Score_element*);
46   void add_support (Score_element*);
47
48   VIRTUAL_COPY_CONS(Score_element);
49   virtual Direction get_default_direction () const;
50 protected:
51   virtual Interval do_height () const;
52   virtual void do_print () const;
53   virtual void do_add_processing ();
54   virtual void do_substitute_element_pointer (Score_element*,Score_element*);
55   virtual void do_pre_processing ();
56   virtual void do_post_processing ();
57 };
58
59 class Staff_side_item : public Staff_side_element, public Item
60 {
61 public:
62   VIRTUAL_COPY_CONS(Score_element);
63 protected:
64   virtual Interval do_width () const;
65   virtual void do_print () const;
66 };
67
68 class Staff_side_spanner : public Staff_side_element, public Spanner
69 {
70 public:
71   VIRTUAL_COPY_CONS(Score_element);
72 protected:
73   virtual void do_print () const;
74 };
75
76 #endif /* STAFF_SIDE_HH */
77