]> git.donarmstrong.com Git - lilypond.git/blob - hdr/stem.hh
partial: 0.0.38.jcn
[lilypond.git] / hdr / 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     const char * name() const;
65
66     Real hindex()const;
67     void do_print() const;
68     void set_stemend(Real);
69     int get_default_dir();
70     void set_default_dir();
71     void set_default_stemlen();
72     void set_default_extents();
73     void set_noteheads();
74     void do_pre_processing();
75
76     Interval width() const;
77
78     Molecule* brew_molecule_p() const;
79 };
80 #endif