]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/system.hh
* The grand 2005-2006 replace.
[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 "grob-array.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   void init_elements ();
25   friend class Paper_score;     // ugh.
26   Paper_score *pscore_; // ugh.
27   
28 public:
29   int get_rank () const;
30   void post_processing ();
31   SCM get_paper_system ();
32   SCM get_paper_systems ();
33
34   System (SCM, Object_key const *);
35   System (System const &, int);
36
37   int element_count () const;
38   int spanner_count () const;
39
40   void break_into_pieces (Array<Column_x_positions> const &);
41   static bool has_interface (Grob *);
42
43   Link_array<Item> broken_col_range (Item const *, Item const *) const;
44   Link_array<Grob> columns () const;
45
46   void add_column (Paper_column *);
47   void typeset_grob (Grob *);
48   void pre_processing ();
49
50 protected:
51   virtual void derived_mark () const;
52   virtual Grob *clone (int count) const;
53 };
54
55 void set_loose_columns (System *which, Column_x_positions const *posns);
56
57 #endif /* SYSTEM_HH */
58