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