]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/item.hh
7c28a35240f5f212b6ee0c654b9acde45e8bbbe6
[lilypond.git] / lily / include / item.hh
1 /*
2   item.hh -- declare Item
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8 #ifndef ITEM_HH
9 #define ITEM_HH
10
11 #include "box.hh"
12 #include "grob.hh"
13
14 /**
15    A horizontally fixed size element of the score.
16
17    Item is the datastructure for printables whose width is known
18    before the spacing is calculated
19 */
20 class Item : public Grob
21 {
22   Drul_array<Item *> broken_to_drul_;
23
24   DECLARE_CLASSNAME(Item);
25 public:
26   Item (SCM, Object_key const *);
27   Item (Item const &, int count);
28
29   virtual Grob *clone (int count) const;
30
31   static bool is_non_musical (Grob *);
32   bool is_broken () const;
33   bool pure_is_visible (int start, int end) const;
34
35   Direction break_status_dir () const;
36
37   Item *find_prebroken_piece (Direction) const;
38   Grob *find_broken_piece (System *) const;
39   virtual System *get_system () const;
40   virtual Paper_column *get_column () const;
41   virtual void handle_prebroken_dependencies ();
42   virtual Interval_t<int> spanned_rank_iv ();
43   static bool has_interface (Grob *);
44 protected:
45   virtual void discretionary_processing ();
46   void copy_breakable_items ();
47   virtual void derived_mark () const;
48 };
49
50 #endif