]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
fix reading the author field.
[lyx.git] / src / lyxtext.h
index 7a489ac934bdb36a29690cf38f1f524c702a2055..1eb3158c8a076e337a81e7ffb9f7600d45e5df5c 100644 (file)
@@ -59,11 +59,11 @@ public:
        /// update y coordinate cache of all paragraphs
        void updateParPositions();
        ///
-       LyXFont getFont(par_type pit, pos_type pos) const;
+       LyXFont getFont(Paragraph const & par, pos_type pos) const;
        ///
        LyXFont getLayoutFont(par_type pit) const;
        ///
-       LyXFont getLabelFont(par_type pit) const;
+       LyXFont getLabelFont(Paragraph const & par) const;
        ///
        void setCharFont(par_type pit, pos_type pos, LyXFont const & font);
        ///
@@ -100,6 +100,10 @@ public:
        /// rebreaks the cursor par
        void redoParagraph(LCursor & cur);
 
+       /// returns pos in given par at given x coord
+       pos_type x2pos(par_type pit, int row, int x) const;
+       int pos2x(par_type pit, pos_type pos) const;
+
        ///
        void toggleFree(LCursor & cur, LyXFont const &, bool toggleall = false);
 
@@ -184,7 +188,7 @@ public:
        ///
        void setCursorFromCoordinates(LCursor & cur, int x, int y);
        ///
-       InsetBase * editXY(LCursor & cur, int x, int y);
+       InsetBase * editXY(LCursor & cur, int x, int y) const;
        ///
        void cursorUp(LCursor & cur);
        ///
@@ -268,12 +272,12 @@ public:
        /// updates all counters
        void updateCounters();
        /// Returns an inset if inset was hit, or 0 if not.
-       InsetBase * checkInsetHit(int x, int y);
+       InsetBase * checkInsetHit(int x, int y) const;
 
        ///
-       int singleWidth(par_type pit, pos_type pos) const;
+       int singleWidth(Paragraph const & par, pos_type pos) const;
        ///
-       int singleWidth(par_type pit,
+       int singleWidth(Paragraph const & par,
                pos_type pos, char c, LyXFont const & Font) const;
 
        /// return the color of the canvas
@@ -399,7 +403,7 @@ private:
        /// sets row.width to the minimum space a row needs on the screen in pixel
        void setRowWidth(par_type pit, Row & row) const;
        /// the minimum space a manual label needs on the screen in pixels
-       int labelFill(par_type pit, Row const & row) const;
+       int labelFill(Paragraph const & par, Row const & row) const;
        /// FIXME
        int labelEnd(par_type pit) const;