]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/system.hh
Merge branch 'jneeman' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond into jneeman
[lilypond.git] / lily / include / system.hh
1
2 /*
3   line-of-score.hh -- part of GNU LilyPond
4
5   (c) 1996--2006 Han-Wen Nienhuys
6 */
7
8 #ifndef SYSTEM_HH
9 #define SYSTEM_HH
10
11 #include "column-x-positions.hh"
12 #include "spanner.hh"
13 #include "skyline.hh"
14
15 /*
16   If you keep following offset reference points, you will always end
17   up at the root object. This root object is called @ref{System}, and it
18   represents a system (i.e. a line of music).
19 */
20 class System : public Spanner
21 {
22   int rank_;
23   Grob_array *all_elements_;
24   Drul_array<Skyline> skylines_;
25   void build_skylines ();
26   void init_elements ();
27   friend class Paper_score;     // ugh.
28   Paper_score *pscore_; // ugh.
29   
30 public:
31   Paper_score *paper_score () const;
32   int get_rank () const;
33   void post_processing ();
34   SCM get_paper_system ();
35   SCM get_paper_systems ();
36
37   System (SCM, Object_key const *);
38   System (System const &, int);
39
40   int element_count () const;
41   int spanner_count () const;
42
43   void break_into_pieces (vector<Column_x_positions> const &);
44   DECLARE_GROB_INTERFACE();
45
46   vector<Item*> broken_col_range (Item const *, Item const *) const;
47   vector<Grob*> columns () const;
48
49   void add_column (Paper_column *);
50   void typeset_grob (Grob *);
51   void pre_processing ();
52
53 protected:
54   virtual void derived_mark () const;
55   virtual Grob *clone (int count) const;
56 };
57
58 void set_loose_columns (System *which, Column_x_positions const *posns);
59
60 #endif /* SYSTEM_HH */
61