#define BUFFER_VIEW_H
#include "DocumentClassPtr.h"
+#include "TexRow.h"
#include "update_flags.h"
#include "support/strfwd.h"
class FuncStatus;
class Intl;
class Inset;
+class Length;
class PainterInfo;
class ParIterator;
class ParagraphMetrics;
class Point;
class TexRow;
class Text;
-class TextEntry;
class TextMetrics;
enum CursorStatus {
/// 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;
/// set the cursor based on the given TeX source row.
bool setCursorFromRow(int row);
- ///
- bool setCursorFromRow(int row, TexRow const & texrow);
/// set the cursor based on the given start and end TextEntries.
- bool setCursorFromEntries(TextEntry start, TextEntry end);
+ bool setCursorFromEntries(TexRow::TextEntry start, TexRow::TextEntry end);
/// set cursor to the given inset. Return true if found.
bool setCursorFromInset(Inset const *);
/// access to full cursor.
Cursor const & cursor() const;
/// sets cursor.
- /// This will also open all relevant collapsable insets.
+ /// This will also open all relevant collapsible insets.
void setCursor(DocIterator const &);
/// set the selection up to dit.
void setCursorSelectionTo(DocIterator const & dit);