]> git.donarmstrong.com Git - lilypond.git/blob - hdr/stem.hh
release: 0.0.30
[lilypond.git] / hdr / stem.hh
1 /*
2   stem.hh -- 
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 /// the rule attached to the ball
14 /**
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 /*
26     /// rhythmical length
27     Moment note_length;
28     */  
29     // heads the stem encompasses (positions)
30     int minnote, maxnote;
31
32     /// false if in beam
33     bool print_flag;
34     
35     int beams_left;
36     int beams_right;
37     
38     /// needed for determining direction/length
39     int staff_center;
40
41     // extent of the stem (positions)
42     /**
43       fractional, since Beam has to adapt them.
44       */
45
46     Real bot, top;
47     Real stemlen;
48     
49     /// flagtype? 4 none, 8 8th flag, 0 = beam.
50     int flag;
51
52     ///geen gedonder, jij gaat onder
53     /**
54        -1 stem points down, +1: stem points up
55        */
56
57     int dir;
58     Real stem_xoffset;
59     
60     Array<Notehead*> heads;
61
62     /* *************** */
63     Stem(int center); //, Moment duration);
64     
65     /// ensure that this Stem also encompasses the Notehead #n#
66     void add(Notehead*n);
67     const char * name() const;
68
69     Real hpos()const;
70     void do_print() const;
71     void set_stemend(Real);
72     int get_default_dir();
73     void set_default_dir();
74     void set_default_stemlen();
75     void set_default_extents();
76     void set_noteheads();
77     void do_pre_processing();
78
79     Interval width() const;
80
81     Molecule* brew_molecule_p() const;
82 };
83 #endif