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 /// log of the duration. Eg. 4 -> 16th note -> 2 flags
51 int beam_count (Direction) const;
52 void set_beaming (int, Direction d);
54 don't print flag when in beam.
55 our beam, for aligning abbrev flags
57 Beam* beam_l () const;
58 Note_head * first_head () const;
59 Score_element * support_head () const;
62 /// ensure that this Stem also encompasses the Notehead #n#
63 void add_head (Rhythmic_head*n);
66 Stem_info calc_stem_info () const;
68 Real chord_start_f () const;
71 void set_stemend (Real);
72 Direction get_default_dir() const;
73 int get_center_distance(Direction) const;
74 Real get_default_stemlen() const;
76 void position_noteheads();
78 Real stem_end_position () const;
80 // todo: cleanup, naming
81 Real note_delta_f () const;
83 bool invisible_b() const;
85 /// heads that the stem encompasses (positions)
86 Interval_t<int> head_positions() const;
89 Molecule flag () const;
91 virtual void do_pre_processing();
92 static Interval dim_callback (Dimension_cache const*);
93 virtual Molecule* do_brew_molecule_p() const;
95 void set_spacing_hints () ;