]> git.donarmstrong.com Git - lilypond.git/blob - hdr/stem.hh
372011d1b1171d2ee4096da6b4fe510f55af8c93
[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     Real note_length;
14     
15     // heads the stem encompasses (positions)
16     int minnote, maxnote;
17
18     /// false if in beam
19     bool print_flag;
20     
21     int beams_left;
22     int beams_right;
23     
24     /// needed for determining direction/length
25     int staff_center;
26
27     // extent of the stem (positions)
28     Real bot, top;
29     /**
30       fractional, since Beam has to adapt them.
31       */
32
33     Real stemlen;
34     
35     /// flagtype? 4 none, 8 8th flag, 0 = beam.
36     int flag;
37
38     ///geen gedonder, jij gaat onder
39     int dir;
40     /**
41        -1 stem points down, +1: stem points up
42        */
43
44     Real stem_xoffset;
45     /****************/
46
47     /// ensure that this Stem also encompasses the Notehead #n#
48     void add(Notehead*n);
49     Real hpos()const;
50     void print() const;
51     void set_stemend(Real);
52     void set_default_dir();
53     void set_default_stemlen();
54     void set_default_extents();
55     void postprocess();
56     void preprocess();
57     Stem(int center, Real duration);
58
59     Interval width() const;
60 private:
61
62     void brew_molecole();
63 };
64 /**
65   takes care of:
66
67   \begin{itemize}
68   \item the rule
69   \item the flag
70   \item up/down position.
71   \end{itemize}
72   */
73
74 #endif