lilypond-0.0.4
[lilypond.git] / pscore.hh
blob75da46a4a5274341443e96878e6e344c90ec23e9
1 // the breaking problem for a score.
3 #ifndef PSCORE_HH
4 #define PSCORE_HH
7 #include "vray.hh"
8 #include "cols.hh"
9 #include "pstaff.hh"
11 /// all stuff which goes onto paper
12 struct PScore {
13 /// width of paper
14 Real linewidth;
16 /// the columns, ordered left to right
17 PointerList<PCol *> cols;
19 /// the idealspacings, no particular order
20 PointerList<Idealspacing*> suz;
22 /// the staffs ordered top to bottom
23 PointerList<PStaff*> staffs;
25 /// all symbols in score. No particular order.
26 PointerList<Item*> its;
28 /// if broken, the different lines
29 PointerList<Line_of_score*> lines;
31 /// crescs etc; no particular order
32 PointerList<Spanner *> spanners;
34 /****************************************************************/
36 void calc_breaking();
37 /**
38 calculate where the lines are to be broken.
40 POST
42 lines contain the broken lines.
45 /// search all pcols which are breakable.
46 svec<const PCol *> find_breaks() const;
48 /// add a line to the broken stuff. Positions given in #config#
49 void add_line(svec<const PCol *> curline, svec<Real> config);
51 /// helper: solve for the columns in #curline#.
52 svec<Real> solve_line(svec<const PCol *> curline) const;
54 void add(PStaff *);
55 /// add item
56 void typeset_item(Item *, PCol *,PStaff*,int);
57 /// add to bottom of pcols
58 void add(PCol*);
59 /**
62 void output(Tex_stream &ts);
64 Idealspacing* get_spacing(PCol *, PCol *);
66 get the spacing between c1 and c2, create one if necessary.
70 PCursor<PCol *> find_col(PCol *);
71 void clean_cols();
72 void problem_OK() ;
74 PScore();
76 /** notes, signs, symbols in a score can be grouped in two ways:
77 horizontally (staffwise), and vertically (columns). #PScore#
78 contains the items, the columns and the staffs.
80 #endif