X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fdimension-cache.hh;h=4576c99ef283f05064bba64868622f540b2218b5;hb=7e72a1e50e94a7f9738d62599de79fe7745f600c;hp=e110041d0bb55b168b4f693d218d460cd614ba7a;hpb=dd36ce6e97590323a7b6a61eb4a3f08d265c5b6e;p=lilypond.git diff --git a/lily/include/dimension-cache.hh b/lily/include/dimension-cache.hh index e110041d0b..4576c99ef2 100644 --- a/lily/include/dimension-cache.hh +++ b/lily/include/dimension-cache.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--2000 Han-Wen Nienhuys + (c) 1998--2004 Han-Wen Nienhuys */ @@ -15,60 +15,40 @@ #include "lily-proto.hh" #include "parray.hh" #include "dimension-cache-callback.hh" +#include "lily-guile.hh" /** - Adminstration of offset dimension info. - */ -class Dimension_cache + Adminstration of offset dimension info. +*/ +struct Dimension_cache { - bool valid_b_; - Interval dim_; - /** - The offset wrt. to the center of #parent_l_# - */ - - Real extra_offset_; - Real basic_offset_; - bool off_valid_b_; + /* + Multi typed: - Score_element *elt_l_; - friend class Score_element; + - cons: interval + - procedure: callback + - else: empty + */ + SCM dimension_; - void init (); - Array off_callbacks_; /** - What to call to find extent. Nil means empty. + The offset wrt. to the center of #parent_# */ -public: - Dim_cache_callback extent_callback_l_; - static Interval point_dimension_callback (Dimension_cache const* ); - Axis axis () const; - Real get_offset () const; - void set_callback (Dim_cache_callback); - Dimension_cache * parent_l_; - - Score_element *element_l () const { return elt_l_; } - - Dimension_cache(Dimension_cache const&); - Dimension_cache (); + Real offset_; + SCM offset_callbacks_; + + char offsets_left_; /** - Find the offset relative to D. If D equals THIS, then it is 0. - Otherwise, it recursively defd as - - OFFSET_ + PARENT_L_->relative_coordinate (D) + What to call to find extent. Nil means empty. */ - Real relative_coordinate (Dimension_cache *d) const; - Dimension_cache*common_refpoint (Dimension_cache const* s) const; - Dimension_cache*common_refpoint (Link_array caches) const; - void set_empty (bool); - void translate (Real); + Grob * parent_; - bool valid_b () const { return valid_b_; } - bool empty_b() const; - Interval get_dim () const; + Dimension_cache (Dimension_cache const&); + Dimension_cache (); + void init (); };