2 dimension-cache.hh -- declare Dimension_cache
4 source file of the GNU LilyPond music typesetter
6 (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef DIMENSION_CACHE_HH
11 #define DIMENSION_CACHE_HH
12 #include "interval.hh"
14 #include "lily-proto.hh"
22 /** Is this element dimensionless?.
23 This is private to guarantee correctness of the cache
28 Graphical_element *elt_l_;
29 friend class Graphical_element;
33 Dimension_cache * parent_l_;
34 Link_array<Dimension_cache> dependencies_l_arr_;
36 Real absolute_coordinate () const;
38 void invalidate_dependencies ();
40 Dimension_cache(Dimension_cache const&);
42 void set_group_l (Graphical_axis_group*);
43 Real relative_coordinate (Dimension_cache *d) const;
44 Dimension_cache*common_group (Dimension_cache const* s) const;
45 Dimension_cache*common_group (Link_array<Dimension_cache> caches) const;
46 void set_empty (bool);
47 void translate (Real);
48 void set_offset (Real);
49 bool valid_b () const { return valid_b_; }
50 bool empty_b() const { return empty_b_; }
51 void set_dim (Interval);
52 Interval get_dim () const;
56 #endif /* DIMENSION_CACHE_HH */