X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fdimension-cache.hh;h=9b59d1b1fbc29e47f8b70aa7cf8d67ab2243645a;hb=75eebcb49e52d296b1da3e1074e0825d2c780db4;hp=806ec2704eddf9f3e3d659e075a272621821e807;hpb=8aad615ea7bb31f49a0c2afc21eea5ff5de20437;p=lilypond.git diff --git a/lily/include/dimension-cache.hh b/lily/include/dimension-cache.hh index 806ec2704e..9b59d1b1fb 100644 --- a/lily/include/dimension-cache.hh +++ b/lily/include/dimension-cache.hh @@ -1,66 +1,36 @@ -/* +/* dimension-cache.hh -- declare Dimension_cache - + source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Han-Wen Nienhuys - - */ + + (c) 1998--2006 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" - -/** - Adminstration of offset dimension info. - */ +/* + XY offset/refpoint/extent structure. +*/ class Dimension_cache { - bool valid_b_; - /** Is this element dimensionless?. - This is private to guarantee correctness of the cache - */ - bool empty_b_; - Interval dim_; - /** - The offset wrt. to the center of #parent_l_# - */ - Real offset_; - Graphical_element *elt_l_; - friend class Graphical_element; - + Interval *extent_; + Real *offset_; + Grob *parent_; void init (); -public: - /** The #offset_# is defined with regard to this graphical_element/ - dimension_cache. */ + void clear (); - Dimension_cache * parent_l_; - Link_array dependencies_l_arr_; - Graphical_element *element_l () { return elt_l_; } - Real absolute_coordinate () const; - void invalidate (); - void invalidate_dependencies (); + friend class Grob; - Dimension_cache(Dimension_cache const&); + Dimension_cache (Dimension_cache const &); + ~Dimension_cache (); Dimension_cache (); - - 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; }; - #endif /* DIMENSION_CACHE_HH */