]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
convert author names and status messages to docstring
[lyx.git] / src / lyxtext.h
index f88de27317d80a6c7e28bc5821dd8ace37aaef36..a908458b03beaffcb3fe20781532b9d330e723a0 100644 (file)
@@ -134,14 +134,21 @@ public:
        /// read-write access to individual paragraph
        Paragraph & getPar(pit_type pit) { return pars_[pit]; }
        // Returns the current font and depth as a message.
-       std::string currentState(LCursor & cur);
+       docstring currentState(LCursor & cur);
 
        /** returns row near the specified
          * y-coordinate in given paragraph (relative to the screen).
          */
        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,