2 spanner.hh -- part of GNU LilyPond
4 (c) 1996--2003 Han-Wen Nienhuys
10 #include "lily-proto.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 Grob {
33 Drul_array<Item*> spanned_drul_;
36 DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
38 Link_array<Spanner> broken_intos_;
41 // todo: move to somewhere else.
42 Real get_broken_left_end_align () const;
43 void substitute_one_mutable_property (SCM sym, SCM val) ;
44 bool fast_fubstitute_grob_list (SCM sym, SCM grob_list);
45 // TODO: make virtual and do this for Items as well.
46 Interval_t<int> spanned_rank_iv ();
47 void set_bound (Direction d, Grob*);
48 Item *get_bound (Direction d) const;
51 Spanner (Spanner const &);
52 bool broken_b () const;
54 Real spanner_length () const;
56 static int compare (Spanner * const &,Spanner * const &);
57 virtual Grob* find_broken_piece (System*) const;
58 virtual SCM do_derived_mark () const;
59 static bool has_interface (Grob*);
60 virtual System *get_system () const;
62 void set_my_columns ();
64 VIRTUAL_COPY_CONS (Grob);
65 virtual void do_break_processing ();
68 void add_bound_item (Spanner*, Grob*);
69 ///DECLARE_UNSMOB (Spanner, spanner);
71 int broken_spanner_index (Spanner * sp);