X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Finclude%2Fstem.hh;h=d843a9846c85ffe51a19402ffed076d8a13d3bd1;hb=736088f09a0b77acc84f6e1a54cddb8bad3d94c1;hp=a40484123c159980c75c226d50c0862bbe5e9814;hpb=163503e56aa0c03d41d37fd083bdb96a6a473a11;p=lilypond.git diff --git a/lily/include/stem.hh b/lily/include/stem.hh index a40484123c..d843a9846c 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -1,7 +1,7 @@ /* stem.hh -- declare Stem - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef STEM_HH @@ -11,7 +11,6 @@ #include "array.hh" #include "moment.hh" #include "molecule.hh" -#include "directional-element.hh" #include "stem-info.hh" /**the rule attached to the ball. @@ -41,64 +40,58 @@ */ -class Stem : public Item, - public Directional_element +class Stem : public Item { - - /**extent of the stem (positions). - fractional, since Beam has to adapt them. - */ - Interval yextent_; - public: /// log of the duration. Eg. 4 -> 16th note -> 2 flags int flag_i () const; - Drul_array beams_i_drul_; - - + int beam_count (Direction) const; + void set_beaming (int, Direction d); /** don't print flag when in beam. our beam, for aligning abbrev flags */ Beam* beam_l () const; Note_head * first_head () const; + Drul_array extremal_heads () const; + + Score_element * support_head () const; Stem (); - + /// ensure that this Stem also encompasses the Notehead #n# void add_head (Rhythmic_head*n); - Real hpos_f () const; Stem_info calc_stem_info () const; Real chord_start_f () const; - + Direction get_direction () const; int type_i () const; void set_stemend (Real); Direction get_default_dir() const; int get_center_distance(Direction) const; - - void set_default_stemlen(); - void set_default_extents(); - void set_noteheads(); - - Real stem_length_f() const; - Real stem_end_f() const; - Real stem_begin_f() const; - Real note_delta_f () const; + int heads_i () const; bool invisible_b() const; /// heads that the stem encompasses (positions) - Interval_t head_positions() const; + Interval head_positions() const; + +protected: + friend class Stem_tremolo; // ugh. + Real get_default_stem_end_position () const; + void position_noteheads(); + + Real stem_end_position () const; + static Real off_callback (Score_element const*, Axis); protected: Molecule flag () const; - virtual void do_pre_processing(); - static Interval dim_callback (Dimension_cache const*); - virtual Molecule* do_brew_molecule_p() const; + virtual void before_line_breaking(); + static Interval dim_callback (Score_element const*,Axis); + virtual Molecule do_brew_molecule() const; void set_spacing_hints () ; };