lilypond-1.1.31
[lilypond.git] / hdr / stem.hh
blob34776ea49cec6b45965221871b18e516d3d28f0a
1 /*
2 stem.hh -- declare Stem
4 (c) 1996,97 Han-Wen Nienhuys
5 */
7 #ifndef STEM_HH
8 #define STEM_HH
9 #include "item.hh"
10 #include "varray.hh"
11 #include "moment.hh"
14 /**the rule attached to the ball.
15 takes care of:
17 \begin{itemize}
18 \item the rule
19 \item the flag
20 \item up/down position.
21 \end{itemize}
24 struct Stem : Item {
25 /// heads that the stem encompasses (positions)
26 int minnote, maxnote;
28 /// false if in beam
29 bool print_flag;
31 int beams_left;
32 int beams_right;
34 /// needed for determining direction/length
35 int staff_center;
38 /**extent of the stem (positions).
39 fractional, since Beam has to adapt them.
42 Real bot, top;
43 Real stemlen;
45 /// flagtype? 4 none, 8 8th flag, 0 = beam.
46 int flag;
49 /**
50 geen gedonder, jij gaat onder.
51 -1 stem points down, +1: stem points up
54 int dir;
55 Real stem_xoffset;
57 Array<Notehead*> heads;
59 /* *************** */
60 Stem(int center); //, Moment duration);
62 /// ensure that this Stem also encompasses the Notehead #n#
63 void add(Notehead*n);
65 NAME_MEMBERS(Stem);
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();
77 Interval width() const;
79 Molecule* brew_molecule_p() const;
81 #endif