]> git.donarmstrong.com Git - lilypond.git/blob - hdr/stem.hh
release: 0.0.9
[lilypond.git] / hdr / stem.hh
1 /*
2   stem.hh -- 
3
4   (c) 1996 Han-Wen Nienhuys
5 */
6
7 #ifndef STEM_HH
8 #define STEM_HH
9 #include "item.hh"
10
11 /// the rule attached to the ball
12 struct Stem : public Item {
13     // heads the stem encompasses (positions)
14     int minnote, maxnote;
15
16     /// false if in beam
17     bool print_flag;
18     
19     /// needed for determining direction/length
20     int staff_center;
21
22     // extent of the stem (positions)
23     Real bot, top;
24     /**
25       fractional, since Beam has to adapt them.
26       */
27
28     Real stemlen;
29     // flagtype? 4 none, 8 8th flag, 0 = beam.
30     int flag;
31
32     ///geen gedonder, jij gaat onder
33     int dir;
34     /**
35        -1 stem points down, +1: stem points up
36        */
37
38     Real stem_xoffset;
39     /****************/
40
41     /// ensure that this Stem also encompasses the Notehead #n#
42     void add(Notehead*n);
43     Real hpos()const;
44     void set_stemend(Real);
45     void set_default_dir();
46     void set_default_stemlen();
47     void set_default_extents();
48     void postprocess();
49     Stem(int center);
50     void print() const;
51     Interval width() const;
52 private:
53
54     void brew_molecole();
55 };
56 /**
57   takes care of:
58
59   \begin{itemize}
60   \item the rule
61   \item the flag
62   \item up/down position.
63   \end{itemize}
64   */
65
66 #endif