X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fspanner.hh;h=4327653e00f8693afc8c4c1d2fedf2f7b121ccf5;hb=a0b072ed070ca6abb36a11e015073b117103e35d;hp=0559dce40dd6a5841a625f290f065911c522357d;hpb=1ff8f1c7e0baac008490e9e62995df70e0ed5128;p=lilypond.git diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 0559dce40d..4327653e00 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -1,14 +1,14 @@ /* spanner.hh -- part of GNU LilyPond - (c) 1996,97 Han-Wen Nienhuys + (c) 1996--2002 Han-Wen Nienhuys */ #ifndef SPANNER_HH #define SPANNER_HH #include "lily-proto.hh" -#include "score-elem.hh" +#include "grob.hh" #include "drul-array.hh" #include "rod.hh" @@ -18,13 +18,10 @@ Examples - \begin{itemize} - \item (de)crescendo - \item slur - \item beam - \item bracket - \end{itemize} - + * (de)crescendo + * slur + * beam + * bracket Spanner should know about the items which it should consider: e.g. slurs should be steep enough to "enclose" all those items. This @@ -32,36 +29,43 @@ length of stems of notes they encompass. */ -class Spanner : public virtual Score_elem { +class Spanner : public Grob { + Drul_array spanned_drul_; + public: + DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM )); - Drul_array spanned_drul_; - void set_bounds(Direction d, Item*); - - DECLARE_MY_RUNTIME_TYPEINFO; - virtual Spanner* spanner() { return this; } - Spanner(); - bool broken_b() const; - virtual Array get_rods () const; - Spanner* find_broken_piece (Line_of_score*) const; -protected: - void set_my_columns(); - SCORE_ELEM_CLONE(Spanner); + Link_array broken_into_l_arr_; - /** - this is virtual; for instance, Line_of_score overrides it. - */ - virtual void break_into_pieces (); + // todo: move to somewhere else. + Real get_broken_left_end_align () const; + + // TODO: make virtual and do this for Items as well. + Interval_t spanned_rank_iv (); + void set_bound (Direction d, Grob*); + Item *get_bound (Direction d) const; + + Spanner (SCM); + Spanner (Spanner const &); + bool broken_b () const; + void do_break (); + Real spanner_length () const; - Link_array broken_into_l_arr_; + static int compare (Spanner * const &,Spanner * const &); + virtual Grob* find_broken_piece (System*) const; + virtual SCM do_derived_mark (); + static bool has_interface (Grob*); +protected: + void set_my_columns (); - virtual void do_unlink(); - virtual void do_junk_links(); - virtual void do_brew_molecule (); - virtual void do_space_processing (); - virtual void do_break_processing(); - virtual Interval do_width() const; - virtual void do_print() const; - virtual Line_of_score*line_l() const; + VIRTUAL_COPY_CONS (Grob); + virtual void do_break_processing (); + virtual System*line_l () const; }; + + +void add_bound_item (Spanner*, Grob*); +void extend_spanner_over_elements (Grob* span); + + #endif