]> git.lyx.org Git - lyx.git/blobdiff - src/CoordCache.h
Pick up some stitches dropped by Abdel ;-)
[lyx.git] / src / CoordCache.h
index f3ecc18418b153c7ff767da5d87e106c427ea9a1..296de324e94b61b74a877f054913f69be11ec90a 100644 (file)
@@ -20,9 +20,9 @@
 
 namespace lyx {
 
-class InsetBase;
-class LyXText;
-class MathArray;
+class Inset;
+class Text;
+class MathData;
 class Paragraph;
 
 void lyxbreaker(void const * data, const char * hint, int size);
@@ -45,7 +45,7 @@ public:
                data_.clear();
        }
 
-       bool const empty() const
+       bool empty() const
        {
                return data_.empty();
        }
@@ -113,24 +113,18 @@ public:
 class CoordCache {
 public:
        void clear();
-       Point get(LyXText const *, pit_type) const;
 
        /// A map from paragraph index number to screen point
        typedef std::map<pit_type, Point> InnerParPosCache;
-       /// A map from a LyXText to the map of paragraphs to screen points
-       typedef std::map<LyXText const *, InnerParPosCache> ParPosCache;
        /// A map from a CursorSlice to screen points
-       typedef std::map<LyXText const *, InnerParPosCache> SliceCache;
+       typedef std::map<Text const *, InnerParPosCache> SliceCache;
 
-       /// A map from MathArray to position on the screen
-       CoordCacheBase<MathArray> & arrays() { return arrays_; }
-       CoordCacheBase<MathArray> const & getArrays() const { return arrays_; }
+       /// A map from MathData to position on the screen
+       CoordCacheBase<MathData> & arrays() { return arrays_; }
+       CoordCacheBase<MathData> const & getArrays() const { return arrays_; }
        /// A map from insets to positions on the screen
-       CoordCacheBase<InsetBase> & insets() { return insets_; }
-       CoordCacheBase<InsetBase> const & getInsets() const { return insets_; }
-       /// A map from (LyXText, paragraph) pair to screen positions
-       ParPosCache & parPos() { return pars_; }
-       ParPosCache const & getParPos() const { return pars_; }
+       CoordCacheBase<Inset> & insets() { return insets_; }
+       CoordCacheBase<Inset> const & getInsets() const { return insets_; }
        ///
        SliceCache & slice(bool boundary)
        {
@@ -144,12 +138,10 @@ public:
        /// Dump the contents of the cache to lyxerr in debugging form
        void dump() const;
 private:
-       /// MathArrays
-       CoordCacheBase<MathArray> arrays_;
+       /// MathDatas
+       CoordCacheBase<MathData> arrays_;
        // All insets
-       CoordCacheBase<InsetBase> insets_;
-       /// Paragraph grouped by owning text
-       ParPosCache pars_;
+       CoordCacheBase<Inset> insets_;
        /// Used with boundary == 0
        SliceCache slices0_;
        /// Used with boundary == 1