2 p-score.hh -- declare PScore
4 source file of the LilyPond music typesetter
6 (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
15 #include "lily-proto.hh"
20 /** all stuff which goes onto paper. notes, signs, symbols in a score can be grouped in two ways:
21 horizontally (staffwise), and vertically (columns). #PScore#
22 contains the items, the columns and the staffs.
28 /// the columns, ordered left to right
29 Pointer_list<PCol *> cols;
31 /// the idealspacings, no particular order
32 Pointer_list<Idealspacing*> suz;
34 /// the staffs ordered top to bottom
35 Pointer_list<PStaff*> staffs;
37 /// all symbols in score. No particular order.
38 Pointer_list<Item*> its;
40 /// if broken, the different lines
41 Pointer_list<Line_of_score*> lines;
43 /// crescs etc; no particular order
44 Pointer_list<Spanner *> spanners;
47 Pointer_list<Spanner*> broken_spans;
49 Pointer_list<Vertical_spanner*> vspan_p_list_;
54 /// add a line to the broken stuff. Positions given in #config#
55 void set_breaking(Array<Col_hpositions> const &);
61 add the item in specified containers. If breakstatus is set
62 properly, add it to the {pre,post}break of the pcol.
64 void typeset_item(Item *item_p, PCol *pcol_l,PStaff*pstaf_l,int breakstatus=1);
67 void typeset_spanner(Spanner*, PStaff*);
69 /// add to bottom of pcols
71 void add_broken(Spanner*);
74 Array<Item*> select_items(PStaff*, PCol*);
77 @return argument as a cursor of the list
79 PCursor<PCol *> find_col(PCol const *)const;
84 /// last deed of this struct
85 void output(Tex_stream &ts);
87 /* UTILITY ROUTINES */
89 /// get the spacing between c1 and c2, create one if necessary.
90 Idealspacing* get_spacing(PCol *c1, PCol *c2);
93 void do_connect(PCol *c1, PCol *c2, Real distance_f, Real strength_f);
95 /// connect c1 and c2 and any children of c1 and c2
96 void connect(PCol* c1, PCol *c2, Real distance_f,Real strength_f= 1.0);
98 /* STANDARD ROUTINES */
102 /// before calc_breaking
105 /// calculate where the lines are to be broken, and use results
106 void calc_breaking();
108 /// after calc_breaking
111 /// delete unused columns