summaryrefslogtreecommitdiff
path: root/line.hh
blob: ec45bd577cded00100880f8e1777ca04cbefed02 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef LINE_HH
#define LINE_HH

/*
    horizontal structures for broken scores.
*/

#include "real.hh"
#include "list.hh"
#include "vray.hh"
#include "glob.hh"
#include "pstaff.hh"



/// the columns of a score that form one line.
struct
Line_of_score {
    List<const PCol *> cols;

    // need to store height of each staff.
    PointerList<Line_of_staff*> staffs;
    const PScore * score;	// needed to generate staffs

    /****************/
    
    Line_of_score(svec<const PCol *> sv, const PScore *);

    String TeXstring() const;

    // is #c# contained in #*this#?
    bool element(const PCol *c);
};

/// one broken line of staff.
struct Line_of_staff {
    Real height;

    /// y-pos of the baseline, measured from the top.
    Real base;
    
    PointerList<Spanner *> brokenspans;    
    Line_of_score const * scor;
    const PStaff *pstaff_;

    /****************/
    
    String TeXstring() const;
    Line_of_staff(Line_of_score*, PStaff *);
    Real maxheight()const;
};

#endif