2 stem.hh -- declare Stem
4 (c) 1996--1999 Han-Wen Nienhuys
12 #include "molecule.hh"
13 #include "staff-symbol-referencer.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.
32 beam_dir: direction of the beam (int)
34 dir_force: is direction explicitely specified? (bool)
36 /// how many abbrev beam don't reach stem?
42 // todo: remove baseclass Staff_symbol_referencer, since stem
43 // can be across a staff.
44 class Stem : public Item, public Staff_symbol_referencer {
46 /**extent of the stem (positions).
47 fractional, since Beam has to adapt them.
49 Drul_array<Real> yextent_drul_;
51 /// direction stem (that's me)
55 void set_direction (Direction d);
56 Direction get_direction () const { return dir_; }
58 Link_array<Note_head> head_l_arr_;
59 Link_array<Rest> rest_l_arr_;
61 /// log of the duration. Eg. 4 -> 16th note -> 2 flags
65 don't print flag when in beam.
66 our beam, for aligning abbrev flags
70 Drul_array<int> beams_i_drul_;
73 /// ensure that this Stem also encompasses the Notehead #n#
74 void add_head (Rhythmic_head*n);
77 Real chord_start_f () const;
81 void do_print() const;
82 void set_stemend (Real);
83 Direction get_default_dir() const;
85 int get_center_distance(Direction) const;
87 void set_default_stemlen();
88 void set_default_extents();
91 Real stem_length_f() const;
92 Real stem_end_f() const;
93 Real stem_begin_f() const;
94 Real note_delta_f () const;
96 bool invisible_b() const;
98 /// heads that the stem encompasses (positions)
99 Interval_t<int> head_positions() const;
102 Molecule flag () const;
103 virtual void do_substitute_element_pointer (Score_element*,Score_element*);
104 virtual void do_pre_processing();
105 virtual Interval do_width() const;
106 virtual Molecule* do_brew_molecule_p() const;
108 void set_spacing_hints () ;