]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/system.hh
918243d0a0e47e7bc6b40f8f840345e29d57c326
[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   void init_elements ();
24   friend class Paper_score;     // ugh.
25   Paper_score *pscore_; // ugh.
26   
27 public:
28   Paper_score *paper_score () const;
29   int get_rank () const;
30   void do_break_substitution_and_fixup_refpoints ();
31   void post_processing ();
32   SCM get_paper_system ();
33   SCM get_paper_systems ();
34   SCM get_broken_system_grobs ();
35
36   System (SCM);
37   System (System const &);
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 () const;
56 };
57
58 void set_loose_columns (System *which, Column_x_positions const *posns);
59
60 #endif /* SYSTEM_HH */
61