lilypond-1.3.26
[lilypond.git] / hdr / spanner.hh
blob43a3567fa52faf609869d1d3b9bc7aa3117fa391
1 /*
2 spanner.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
5 */
7 #ifndef SPANNER_HH
8 #define SPANNER_HH
10 #include "proto.hh"
11 #include "staff-elem.hh"
14 /** a symbol which is attached between two columns. A spanner is a symbol which spans across several columns, so its
15 final appearance can only be calculated after the breaking problem
16 is solved.
18 Examples
20 - (de)crescendo
21 - slur
22 - beam
23 - bracket
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 struct Spanner:Staff_elem {
33 PCol *left, *right;
36 /* *************** */
38 Spanner();
39 virtual Interval width()const;
40 void do_print()const;
42 Spanner *broken_at(PCol *c1, PCol *c2) const;
43 virtual Spanner* spanner() { return this; }
44 protected:
46 /**
47 clone a piece of this spanner.
48 PRE
49 c1 >= start, c2 <= stop
51 virtual Spanner *do_break_at( PCol *c1, PCol *c2) const=0;
52 NAME_MEMBERS(Spanner);
54 #endif