#include "lyxcursor.h"
#include "lyxparagraph.h"
#include "layout.h"
-#include "insets/insettext.h"
class Buffer;
class BufferParams;
class Row;
class BufferView;
+class InsetText;
/**
///
NEED_MORE_REFRESH,
///
- NEED_VERY_LITTLE_REFRESH
- };
-
- enum Letter_Form {
- FORM_ISOLATED,
- FORM_INITIAL,
- FORM_MEDIAL,
- FORM_FINAL
+ NEED_VERY_LITTLE_REFRESH,
+ ///
+ CHANGED_IN_DRAW
};
/// Constructor
mutable int number_of_rows;
///
mutable long height;
- mutable long width;
+ mutable unsigned int width;
/// the current font settings
mutable LyXFont current_font;
/// the current font
mutable LyXFont real_current_font;
-
+ /// first visible pixel-row is set from LyXScreen!!!
+ unsigned long first;
///
- // void owner(BufferView *);
-
+ BufferView * bv_owner;
+ ///
+ InsetText * inset_owner;
+
///
LyXFont GetFont(Buffer const *, LyXParagraph * par,
LyXParagraph::size_type pos) const;
Returns true if something was broken. */
bool FullRebreak(BufferView *);
+#ifndef NEW_INSETS
///
LyXParagraph::footnote_flag GetFootnoteFlag(int row);
+#endif
///
Row * need_break_row;
///
///
void SetCursorFromCoordinates(BufferView *, int x, long y) const;
- void SetCursorFromCoordinates(BufferView *, LyXCursor &, int x, long y) const;
+ void SetCursorFromCoordinates(BufferView *, LyXCursor &,
+ int x, long y) const;
///
void CursorUp(BufferView *) const;
///
solution but faster.
*/
void GetVisibleRow(BufferView *, int y_offset, int x_offset,
- Row * row_ptr, long y);
+ Row * row_ptr, long y, bool cleared=false);
+#ifndef NEW_INSETS
/* footnotes: */
///
void ToggleFootnote(BufferView *);
LyXParagraph::footnote_kind kind);
///
void MeltFootnoteEnvironment(BufferView *);
+#endif
///
void CutSelection(BufferView *, bool = true);
///
/* for the greater insets */
- /// returns 0 if inset wasn't found
- int UpdateInset(BufferView *, Inset * inset);
+ /// returns false if inset wasn't found
+ bool UpdateInset(BufferView *, Inset *);
///
void CheckParagraph(BufferView *, LyXParagraph * par,
LyXParagraph::size_type pos);
///
int workWidth(BufferView *) const;
///
- // Buffer * buffer() const;
- ///
void ComputeBidiTables(Buffer const *, Row * row) const;
/// Maps positions in the visual string to positions in logical string.
///
void init();
///
- BufferView * bv_owner;
- ///
- InsetText * inset_owner;
- ///
mutable Row * firstrow;
///
mutable Row * lastrow;
///
void draw(BufferView *, Row const * row,
LyXParagraph::size_type & pos,
- int offset, float & x);
+ int offset, float & x, bool cleared);
/// get the next breakpoint in a given paragraph
LyXParagraph::size_type NextBreakPoint(BufferView *, Row const * row,
///
mutable bool bidi_same_direction;
- ///
- unsigned char TransformChar(unsigned char c, Letter_Form form) const;
-
///
unsigned char TransformChar(unsigned char c, LyXParagraph * par,
LyXParagraph::size_type pos) const;