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