]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/item.hh
e8ac64c183e68affdce2a1ff78c8663edb594e3b
[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--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8 #ifndef ITEM_HH
9 #define ITEM_HH
10
11
12 #include "box.hh"
13 #include "string.hh"
14 #include "score-element.hh"
15 #include "drul-array.hh"
16 #include "protected-scm.hh"
17
18 /**
19   A horizontally fixed size element of the score.
20
21   Item is the datastructure for printables whose width is known
22   before the spacing is calculated
23
24   NB. This doesn't mean an Item has to initialize the output field before
25   spacing calculation. 
26   
27
28   
29   @signature
30   visibility_lambda :: int -> (bool . bool)
31      
32   @in
33   break direction
34      
35   @out
36   (transparent, empty) cons
37      
38    */
39 class Item : public virtual Score_element {
40   void do_break ();
41   void try_visibility_lambda ();
42   Drul_array<Item*> broken_to_drul_;
43
44
45 public:
46
47   /// I am really to be broken?
48   bool breakable_b () const;
49   bool broken_b () const;
50   
51   Direction break_status_dir () const;
52   
53   Item * find_broken_piece (Direction) const;
54   Score_element * find_broken_piece (Line_of_score*) const;    
55
56   Item();
57   Real hpos_f() const;
58   
59   virtual Line_of_score * line_l() const;
60   virtual Paper_column * column_l () const;
61     
62   static int left_right_compare (Item const *, Item const*);
63   
64   Item (Item const &);
65 protected:
66   virtual void do_breakable_col_processing();
67
68   void copy_breakable_items();
69 };
70
71
72
73 #endif