]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/item.hh
* lily/context.cc (Context): take key argument in ctor.
[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--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8 #ifndef ITEM_HH
9 #define ITEM_HH
10
11
12 #include "box.hh"
13 #include "grob.hh"
14 #include "drul-array.hh"
15
16
17 /**
18   A horizontally fixed size element of the score.
19
20   Item is the datastructure for printables whose width is known
21   before the spacing is calculated
22
23 */
24 class Item : public Grob
25 {
26   Drul_array<Item*> broken_to_drul_;
27
28 public:
29   Item (SCM, Object_key const*);
30   Item (Item const &, int count);
31   
32   virtual Grob *clone (int count) const;
33
34   static bool is_breakable (Grob *);
35   bool is_broken () const;
36   
37   Direction break_status_dir () const;
38   
39   Item *find_prebroken_piece (Direction) const;
40   Grob *find_broken_piece (System *) const;    
41   virtual System *get_system () const;
42   virtual Paper_column *get_column () const;
43   virtual void handle_prebroken_dependencies ();
44   static bool has_interface (Grob *);
45 protected:
46   virtual void discretionary_processing ();
47   void copy_breakable_items ();
48   virtual SCM do_derived_mark () const;
49 };
50
51
52
53 #endif