]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/system.hh
use classnames for interface naming; remove inclusion of
[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 #include "skyline.hh"
15 #include "grob-interface.hh"
16
17 /*
18   If you keep following offset reference points, you will always end
19   up at the root object. This root object is called @ref{System}, and it
20   represents a system (i.e. a line of music).
21 */
22 class System : public Spanner
23 {
24   int rank_;
25   Grob_array *all_elements_;
26   Drul_array<Skyline> skylines_;
27   void build_skylines ();
28   void init_elements ();
29   friend class Paper_score;     // ugh.
30   Paper_score *pscore_; // ugh.
31   
32 public:
33   Paper_score *paper_score () const;
34   int get_rank () const;
35   void post_processing ();
36   SCM get_paper_system ();
37   SCM get_paper_systems ();
38
39   System (SCM, Object_key const *);
40   System (System const &, int);
41
42   int element_count () const;
43   int spanner_count () const;
44
45   void break_into_pieces (vector<Column_x_positions> const &);
46   DECLARE_GROB_INTERFACE();
47
48   vector<Item*> broken_col_range (Item const *, Item const *) const;
49   vector<Grob*> columns () 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 (int count) const;
58 };
59
60 void set_loose_columns (System *which, Column_x_positions const *posns);
61
62 #endif /* SYSTEM_HH */
63