class BufferParams;
class LyXScreen;
class Row;
+class BufferView;
/**
This class holds the mapping between buffer paragraphs and screen rows.
mutable LyXFont real_current_font;
/// Constructor
- LyXText(int paperwidth, Buffer *);
+ LyXText(BufferView *, int paperwidth, Buffer *);
/// Destructor
~LyXText();
-
+
+ ///
+ void owner(BufferView *);
+
///
LyXFont GetFont(LyXParagraph * par,
LyXParagraph::size_type pos) const;
/** returns a printed row in a pixmap. The y value is needed to
decide, wether it is selected text or not. This is a strange
solution but faster.
- */
+ */
+#ifdef USE_PAINTER
+ void GetVisibleRow(int offset,
+ Row * row_ptr, long y);
+#else
void GetVisibleRow(LyXScreen & scr, int offset,
Row * row_ptr, long y);
+#endif
/* footnotes: */
///
///
unsigned short paperWidth() const { return paperwidth; }
private:
+ ///
+ BufferView * owner_;
+
/// width of the paper
unsigned short paperwidth;
///
int SingleWidth(LyXParagraph * par,
LyXParagraph::size_type pos, char c) const;
+#ifdef USE_PAINTER
+ ///
+ void draw(Row const * row,
+ LyXParagraph::size_type & pos,
+ int offset, float & x);
+#else
///
void Draw(Row const * row, LyXParagraph::size_type & pos,
LyXScreen & scr,
int offset, float & x);
+#endif
/// get the next breakpoint in a given paragraph
LyXParagraph::size_type NextBreakPoint(Row const * row,
int width) const;
LyXParagraph::size_type offset) const;
/// Maps positions in the visual string to positions in logical string.
- inline LyXParagraph::size_type log2vis(LyXParagraph::size_type pos) const {
+ inline
+ LyXParagraph::size_type log2vis(LyXParagraph::size_type pos) const {
if (bidi_start == -1)
return pos;
else
}
/// Maps positions in the logical string to positions in visual string.
- inline LyXParagraph::size_type vis2log(LyXParagraph::size_type pos) const {
+ inline
+ LyXParagraph::size_type vis2log(LyXParagraph::size_type pos) const {
if (bidi_start == -1)
return pos;
else