]> git.donarmstrong.com Git - lilypond.git/blob - hdr/item.hh
release: 0.0.9
[lilypond.git] / hdr / item.hh
1 #ifndef ITEM_HH
2 #define ITEM_HH
3
4 #include "glob.hh"
5 #include "boxes.hh"
6 #include "string.hh"
7     
8 /// a horizontally fixed size element of the score
9 struct Item {
10     /// indirection to the column it is in
11     PCol * pcol_;
12
13     /// indirection to the pstaff it is in
14     PStaff *pstaff_;
15     
16     /// member: the symbols
17     Molecule *output;
18
19     /// 
20     Offset offset_;
21     /**
22       This is  needed, because #output# may still be
23       NULL.
24       */
25     /****************/
26
27     void translate(Offset);
28     
29     /// do calculations after determining horizontal spacing
30     virtual void postprocess();
31
32     /// do calculations before determining horizontal spacing
33     virtual void preprocess();
34     /**
35       This is executed directly after the item is added to the
36       PScore
37       */
38     
39     virtual Interval width() const;    
40     virtual Interval height() const;
41     String TeXstring () const ;
42     Item();
43     void print()const;
44     virtual ~Item();
45     Paperdef *paper() const;
46 };
47 /** Item is the datastructure for printables whose width is known
48   before the spacing is calculated
49
50   NB. This doesn't mean an Item has to initialize the output field before
51   spacing calculation. 
52   
53 */
54
55
56 #endif