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