2 stem.hh -- declare Stem
4 (c) 1996--1999 Han-Wen Nienhuys
13 #include "molecule.hh"
14 #include "stem-info.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 class Stem : public Item
46 /// log of the duration. Eg. 4 -> 16th note -> 2 flags
49 int beam_count (Direction) const;
50 void set_beaming (int, Direction d);
52 don't print flag when in beam.
53 our beam, for aligning abbrev flags
55 Beam* beam_l () const;
56 Note_head * first_head () const;
57 Drul_array<Note_head*> extremal_heads () 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;
69 Direction get_direction () const;
71 void set_stemend (Real);
72 Direction get_default_dir() const;
74 int get_center_distance(Direction) const;
77 bool invisible_b() const;
79 /// heads that the stem encompasses (positions)
80 Interval head_positions() const;
83 friend class Stem_tremolo; // ugh.
84 Real get_default_stem_end_position () const;
85 void position_noteheads();
88 Real stem_end_position () const;
89 // todo: cleanup, naming
90 Real note_delta_f () const;
92 Molecule flag () const;
94 virtual void do_pre_processing();
95 static Interval dim_callback (Dimension_cache const*);
96 virtual Molecule* do_brew_molecule_p() const;
98 void set_spacing_hints () ;