2 spanner.hh -- part of GNU LilyPond
4 (c) 1996--2000 Han-Wen Nienhuys
10 #include "lily-proto.hh"
11 #include "score-element.hh"
12 #include "drul-array.hh"
15 /** A symbol which is attached between two columns. A spanner is a
16 symbol which spans across several columns, so its final appearance
17 can only be calculated after the breaking problem is solved.
26 Spanner should know about the items which it should consider:
27 e.g. slurs should be steep enough to "enclose" all those items. This
28 is absolutely necessary for beams, since they have to adjust the
29 length of stems of notes they encompass.
32 class Spanner : public Score_element {
33 Drul_array<Item*> spanned_drul_;
36 Link_array<Spanner> broken_into_l_arr_;
38 // TODO: make virtual and do this for Items as well.
39 Interval_t<int> spanned_rank_iv ();
40 void set_bound (Direction d, Score_element*);
41 Item *get_bound (Direction d) const;
44 Spanner (Spanner const &);
45 bool broken_b () const;
47 Real spanner_length () const;
49 static int compare (Spanner * const &,Spanner * const &);
50 virtual Array<Rod> get_rods () const;
51 virtual Array<Spring> get_springs () const;
52 virtual Score_element* find_broken_piece (Line_of_score*) const;
53 virtual void do_derived_mark ();
55 void set_my_columns ();
56 VIRTUAL_COPY_CONS(Score_element);
57 Real get_broken_left_end_align () const;
59 virtual void do_space_processing ();
60 virtual void do_break_processing ();
61 virtual Line_of_score*line_l () const;
65 void add_bound_item (Spanner*, Item* n);