]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/item.hh
Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond
[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 "grob-interface.hh"
12 #include "box.hh"
13 #include "grob.hh"
14
15 /**
16    A horizontally fixed size element of the score.
17
18    Item is the datastructure for printables whose width is known
19    before the spacing is calculated
20 */
21 class Item : public Grob
22 {
23   Drul_array<Item *> broken_to_drul_;
24
25   DECLARE_CLASSNAME(Item);
26 public:
27   Item (SCM, Object_key const *);
28   Item (Item const &, int count);
29
30   virtual Grob *clone (int count) const;
31
32   static bool is_non_musical (Grob *);
33   bool is_broken () const;
34   bool pure_is_visible (int start, int end) const;
35
36   Direction break_status_dir () const;
37
38   Item *find_prebroken_piece (Direction) const;
39   Grob *find_broken_piece (System *) const;
40   virtual System *get_system () const;
41   virtual Paper_column *get_column () const;
42   virtual void handle_prebroken_dependencies ();
43   virtual Interval_t<int> spanned_rank_iv ();
44   DECLARE_GROB_INTERFACE();
45 protected:
46   virtual void discretionary_processing ();
47   void copy_breakable_items ();
48   virtual void derived_mark () const;
49 };
50
51 #endif