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: move to somewhere else.
39 Real get_broken_left_end_align () const;
41 // TODO: make virtual and do this for Items as well.
42 Interval_t<int> spanned_rank_iv ();
43 void set_bound (Direction d, Score_element*);
44 Item *get_bound (Direction d) const;
47 Spanner (Spanner const &);
48 bool broken_b () const;
50 Real spanner_length () const;
52 static int compare (Spanner * const &,Spanner * const &);
53 virtual Score_element* find_broken_piece (Line_of_score*) const;
54 virtual SCM do_derived_mark ();
56 void set_my_columns ();
57 VIRTUAL_COPY_CONS(Score_element);
58 virtual void do_break_processing ();
59 virtual Line_of_score*line_l () const;
63 void add_bound_item (Spanner*, Item* n);
64 void extend_spanner_over_elements (Score_element* span);