2 stem.hh -- declare Stem
4 (c) 1996--1999 Han-Wen Nienhuys
13 #include "molecule.hh"
14 #include "directional-element.hh"
15 #include "stem-info.hh"
17 /**the rule attached to the ball.
23 \item up/down position.
26 should move beam_{left, right} into Beam
30 Stem size depends on flag.
34 beam_dir: direction of the beam (int)
36 dir_force: is direction explicitely specified? (bool)
38 /// how many abbrev beam don't reach stem?
44 class Stem : public Item,
45 public Directional_element
48 /**extent of the stem (positions).
49 fractional, since Beam has to adapt them.
54 /// log of the duration. Eg. 4 -> 16th note -> 2 flags
57 Drul_array<int> beams_i_drul_;
61 don't print flag when in beam.
62 our beam, for aligning abbrev flags
64 Beam* beam_l () const;
65 Note_head * first_head () const;
68 /// ensure that this Stem also encompasses the Notehead #n#
69 void add_head (Rhythmic_head*n);
72 Stem_info calc_stem_info () const;
74 Real chord_start_f () const;
77 void set_stemend (Real);
78 Direction get_default_dir() const;
80 int get_center_distance(Direction) const;
82 void set_default_stemlen();
83 void set_default_extents();
86 Real stem_length_f() const;
87 Real stem_end_f() const;
88 Real stem_begin_f() const;
89 Real note_delta_f () const;
91 bool invisible_b() const;
93 /// heads that the stem encompasses (positions)
94 Interval_t<int> head_positions() const;
97 Molecule flag () const;
99 virtual void do_pre_processing();
100 static Interval dim_callback (Dimension_cache const*);
101 virtual Molecule* do_brew_molecule_p() const;
103 void set_spacing_hints () ;