]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/system.hh
Merge branch 'master' of ssh+git://gpercival@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   Drul_array<Skyline> 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 post_processing ();
33   SCM get_paper_system ();
34   SCM get_paper_systems ();
35
36   System (SCM, Object_key const *);
37   System (System const &, int);
38
39   int element_count () const;
40   int spanner_count () const;
41
42   void break_into_pieces (vector<Column_x_positions> const &);
43   DECLARE_GROB_INTERFACE();
44
45   vector<Item*> broken_col_range (Item const *, Item const *) const;
46   vector<Grob*> used_columns () const;
47   Paper_column *column (vsize i) 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