X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fdimension-cache.hh;h=8897dc6fd418b59f18559ccc53e5b188f4c8aa7c;hb=86ae245eef3d991483f27f135ded2c9bc29043f3;hp=9962cc2a7a19ee5ca946044ffe285a39c91870d7;hpb=afa5829cd270e1b0c616b7ba5c5e6cdc0e920e5f;p=lilypond.git diff --git a/lily/include/dimension-cache.hh b/lily/include/dimension-cache.hh index 9962cc2a7a..8897dc6fd4 100644 --- a/lily/include/dimension-cache.hh +++ b/lily/include/dimension-cache.hh @@ -3,53 +3,52 @@ source file of the GNU LilyPond music typesetter - (c) 1998 Han-Wen Nienhuys + (c) 1998--2002 Han-Wen Nienhuys */ #ifndef DIMENSION_CACHE_HH #define DIMENSION_CACHE_HH + #include "interval.hh" #include "real.hh" #include "lily-proto.hh" #include "parray.hh" +#include "dimension-cache-callback.hh" +#include "lily-guile.hh" - -class Dimension_cache +/** + Adminstration of offset dimension info. +*/ +struct Dimension_cache { - bool valid_b_; - /** Is this element dimensionless?. - This is private to guarantee correctness of the cache + /* + Multi typed: + + - cons: interval + - procedure: callback + - else: empty */ - bool empty_b_; - Interval dim_; - Real offset_; - Graphical_element *elt_l_; - friend class Graphical_element; + SCM dimension_; - void init (); -public: - Dimension_cache * parent_l_; - Link_array dependencies_l_arr_; - - Real absolute_coordinate () const; - void invalidate (); - void invalidate_dependencies (); + /** + The offset wrt. to the center of #parent_l_# + */ + + Real offset_; + SCM offset_callbacks_; - Dimension_cache(Dimension_cache const&); + char offsets_left_; + + /** + What to call to find extent. Nil means empty. + */ + Grob * parent_l_; + + Dimension_cache (Dimension_cache const&); Dimension_cache (); - void set_group_l (Graphical_axis_group*); - Real relative_coordinate (Dimension_cache *d) const; - Dimension_cache*common_group (Dimension_cache const* s) const; - Dimension_cache*common_group (Link_array caches) const; - void set_empty (bool); - void translate (Real); - void set_offset (Real); - bool valid_b () const { return valid_b_; } - bool empty_b() const { return empty_b_; } - void set_dim (Interval); - Interval get_dim () const; + void init (); };