]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/staff-side.hh
release: 1.0.1
[lilypond.git] / lily / include / staff-side.hh
1 /*
2   staff-side.hh -- declare Staff_side
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef STAFF_SIDE_HH
11 #define STAFF_SIDE_HH
12
13 #include "score-element.hh"
14 #include "interval.hh"
15 #include "direction.hh"
16
17 /**
18
19    A symbol which sits either below or above "something" (usually, a
20    staff).
21
22 */
23 class Staff_side : virtual Score_element
24 {
25 public:
26
27   /**
28     Vertical dir of symbol relative to staff. -1 = below staff?
29     */
30   Direction dir_;
31   Axis axis_;
32   Interval sym_int_;
33     
34   Real coordinate_offset_f_;
35
36   /**
37      Add extra vertical space to the support symbols.
38    */
39   Real padding_f_;
40
41   Staff_side ();
42   void add_support (Score_element*);
43   DECLARE_MY_RUNTIME_TYPEINFO;
44     
45 protected:
46   virtual Interval symbol_height () const;
47   virtual Interval symbol_width () const;
48   Interval symbol_extent () const;
49   virtual Real get_position_f () const;
50   virtual void do_substitute_dependency (Score_element *, Score_element*);
51   virtual void do_pre_processing ();
52   virtual void do_post_processing ();
53   Interval support_extent () const;
54
55 private:
56   void do_side_processing ();
57   Link_array<Score_element> support_l_arr_;
58 };
59
60 #endif // STAFF_SIDE_HH