2 spanner.hh -- part of GNU LilyPond
4 (c) 1996--1999 Han-Wen Nienhuys
10 #include "lily-proto.hh"
11 #include "score-element.hh"
12 #include "drul-array.hh"
15 struct Breaking_information
17 Line_of_score *line_l_;
18 Spanner * broken_spanner_l_;
19 Drul_array<Item*> bounds_;
20 Breaking_information ()
24 bounds_[LEFT] = bounds_[RIGHT] =0;
28 class Axis_group_spanner;
29 /** A symbol which is attached between two columns. A spanner is a
30 symbol which spans across several columns, so its final appearance
31 can only be calculated after the breaking problem is solved.
43 Spanner should know about the items which it should consider:
44 e.g. slurs should be steep enough to "enclose" all those items. This
45 is absolutely necessary for beams, since they have to adjust the
46 length of stems of notes they encompass.
49 class Spanner : public virtual Score_element {
51 Drul_array<Item*> spanned_drul_;
52 Link_array<Spanner> broken_into_l_arr_;
53 void set_bounds (Direction d, Item*);
57 Spanner (Spanner const &);
58 bool broken_b () const;
60 virtual Array<Rod> get_rods () const;
61 virtual Array<Spring> get_springs () const;
62 virtual Spanner* find_broken_piece (Line_of_score*) const;
64 void set_my_columns ();
65 VIRTUAL_COPY_CONS(Score_element);
68 this is virtual; for instance, Line_of_score overrides it.
70 virtual void break_into_pieces ();
71 Real get_broken_left_end_align () const;
73 friend Axis_group_spanner; // UGH
75 virtual void do_space_processing ();
76 void handle_broken_dependents ();
77 virtual void do_break_processing ();
78 virtual Interval do_width () const;
79 virtual void do_print () const;
80 virtual Line_of_score*line_l () const;