]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.h
Revert "Fix bug #8782."
[lyx.git] / src / BufferView.h
index e6a29dee6b9961ffe81bf99fb7bfe68317ec0030..92e898735065ac2f8146fbb7b14fd8a3f43fac80 100644 (file)
@@ -16,6 +16,7 @@
 #define BUFFER_VIEW_H
 
 #include "DocumentClassPtr.h"
+#include "TexRow.h"
 #include "update_flags.h"
 
 #include "support/strfwd.h"
@@ -40,6 +41,7 @@ class FuncRequest;
 class FuncStatus;
 class Intl;
 class Inset;
+class Length;
 class PainterInfo;
 class ParIterator;
 class ParagraphMetrics;
@@ -104,6 +106,14 @@ public:
        /// left margin
        int leftMargin() const;
 
+       /// return the on-screen size of this length
+       /*
+        *  This is a wrapper around Length::inPixels that uses the
+        *  bufferview width as width and the EM value of the default
+        *  document font.
+        */
+       int inPixels(Length const & len) const;
+
        /// \return true if the BufferView is at the top of the document.
        bool isTopScreen() const;
 
@@ -162,9 +172,9 @@ public:
        void gotoLabel(docstring const & label);
 
        /// set the cursor based on the given TeX source row.
-       void setCursorFromRow(int row);
-       ///
-       void setCursorFromRow(int row, TexRow const & texrow);
+       bool setCursorFromRow(int row);
+       /// set the cursor based on the given start and end TextEntries.
+       bool setCursorFromEntries(TexRow::TextEntry start, TexRow::TextEntry end);
 
        /// set cursor to the given inset. Return true if found.
        bool setCursorFromInset(Inset const *);