]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
fix aspell encoding (confirmed on linux, cygwin and native windows,
[lyx.git] / src / lyxtext.h
index db041303289d0e98bb0c1933de48240f60e1c309..38b6e71c68324175304cd179b9ad6aecc9e8ccd1 100644 (file)
@@ -116,8 +116,8 @@ public:
        /// insert an inset at cursor position
        void insertInset(LCursor & cur, InsetBase * inset);
 
-       /// compute text metrics
-       void metrics(MetricsInfo & mi, Dimension & dim);
+       /// compute text metrics.
+       bool metrics(MetricsInfo & mi, Dimension & dim);
        /// draw text (only used for insets)
        void draw(PainterInfo & pi, int x, int y) const;
        /// draw textselection
@@ -141,7 +141,14 @@ public:
          */
        Row const & getRowNearY(BufferView const & bv, int y,
                pit_type pit) const;
-       pit_type getPitNearY(BufferView const & bv, int y) const;
+
+       /// returns the paragraph number closest to screen y-coordinate.
+       /// This method uses the BufferView CoordCache to locate the
+       /// paragraph. The y-coodinate is allowed to be off-screen and
+       /// the CoordCache will be automatically updated if needed. This is
+       /// the reason why we need a non const BufferView and why this
+       /// method is non-const.
+       pit_type getPitNearY(BufferView & bv, int y);
 
        /** returns the column near the specified x-coordinate of the row
         x is set to the real beginning of this column
@@ -276,7 +283,7 @@ public:
        int height() const;
 
        /// Returns an inset if inset was hit, or 0 if not.
-       InsetBase * checkInsetHit(BufferView const &, int x, int y) const;
+       InsetBase * checkInsetHit(BufferView &, int x, int y);
 
        ///
        int singleWidth(Buffer const &, Paragraph const & par,