2 stem.hh -- declare Stem
4 (c) 1996--1998 Han-Wen Nienhuys
12 #include "molecule.hh"
15 /**the rule attached to the ball.
21 \item up/down position.
24 should move beam_{left, right} into Beam
28 Stem size depends on flag.
30 class Stem : public Item {
33 Drul_array<Real> yextent_drul_;
35 /// needed for determining direction/length
38 /**extent of the stem (positions).
39 fractional, since Beam has to adapt them.
44 geen gedonder, jij gaat onder.
45 -1 stem points down, +1: stem points up
49 Link_array<Note_head> head_l_arr_;
50 Link_array<Rest> rest_l_arr_;
54 /// how many abbrev beam don't reach stem?
57 /// log of the duration. Eg. 4 -> 16th note -> 2 flags
61 don't print flag when in beam.
62 our beam, for aligning abbrev flags
69 Drul_array<int> beams_i_drul_;
71 /// maximum number of beams
74 /// direction stem (that's me)
77 /// is direction explicitely specified?
80 /// direction of the beam
83 /// what staff am i on?
84 Staff_symbol* staff_sym_l_;
88 /// ensure that this Stem also encompasses the Notehead #n#
89 void add_head (Rhythmic_head*n);
94 Real chord_start_f () const;
98 void do_print() const;
99 void set_stemend (Real);
100 Direction get_default_dir() const;
101 Direction get_dir () const;
103 int get_center_distance(Direction) const;
104 void set_default_dir();
105 void set_default_stemlen();
106 void set_default_extents();
107 void set_noteheads();
109 Real stem_length_f() const;
110 Real stem_end_f() const;
111 Real stem_begin_f() const;
112 Real note_delta_f () const;
114 bool invisible_b() const;
116 /// heads that the stem encompasses (positions)
117 Interval_t<int> head_positions() const;
120 virtual void do_substitute_dependency (Score_element*,Score_element*);
121 virtual void do_pre_processing();
122 virtual Interval do_width() const;
123 virtual Molecule* do_brew_molecule_p() const;