2 stem.hh -- declare Stem
4 (c) 1996--1999 Han-Wen Nienhuys
12 #include "molecule.hh"
13 #include "staff-symbol-referencer.hh"
14 #include "directional-element.hh"
16 /**the rule attached to the ball.
22 \item up/down position.
25 should move beam_{left, right} into Beam
29 Stem size depends on flag.
33 beam_dir: direction of the beam (int)
35 dir_force: is direction explicitely specified? (bool)
37 /// how many abbrev beam don't reach stem?
43 // todo: remove baseclass Staff_symbol_referencer, since stem
44 // can be across a staff.
45 class Stem : public Item, public Staff_symbol_referencer,
46 public Directional_element
49 /**extent of the stem (positions).
50 fractional, since Beam has to adapt them.
52 Drul_array<Real> yextent_drul_;
56 Link_array<Note_head> head_l_arr_;
57 Link_array<Rest> rest_l_arr_;
59 /// log of the duration. Eg. 4 -> 16th note -> 2 flags
63 don't print flag when in beam.
64 our beam, for aligning abbrev flags
68 Drul_array<int> beams_i_drul_;
71 /// ensure that this Stem also encompasses the Notehead #n#
72 void add_head (Rhythmic_head*n);
75 Real chord_start_f () const;
79 void do_print() const;
80 void set_stemend (Real);
81 Direction get_default_dir() const;
83 int get_center_distance(Direction) const;
85 void set_default_stemlen();
86 void set_default_extents();
89 Real stem_length_f() const;
90 Real stem_end_f() const;
91 Real stem_begin_f() const;
92 Real note_delta_f () const;
94 bool invisible_b() const;
96 /// heads that the stem encompasses (positions)
97 Interval_t<int> head_positions() const;
100 Molecule flag () const;
101 virtual void do_substitute_element_pointer (Score_element*,Score_element*);
102 virtual void do_pre_processing();
103 virtual Interval do_width() const;
104 virtual Molecule* do_brew_molecule_p() const;
106 void set_spacing_hints () ;