X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Frowpainter.h;h=63bad10004b80e693493e2221bbe1a1805e5f38d;hb=da1c04ea9a13dcfe75ad7e727811e9d3004609aa;hp=4c5b5175aaf9618d1e0cf47a5d33add793b7cce1;hpb=0be0fcfd5907d448cd51addf83ed7032719a0692;p=lyx.git diff --git a/src/rowpainter.h b/src/rowpainter.h index 4c5b5175aa..63bad10004 100644 --- a/src/rowpainter.h +++ b/src/rowpainter.h @@ -6,6 +6,7 @@ * * \author various * \author John Levon + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -13,17 +14,32 @@ #ifndef ROWPAINTER_H #define ROWPAINTER_H -class LyXText; +#include "support/types.h" + +namespace lyx { + +class Text; class BufferView; -class VSpace; +class PainterInfo; +class ViewMetricsInfo; -/// return the pixel height of a space marker before/after a par -int getLengthMarkerHeight(BufferView const & bv, VSpace const & vsp); +namespace frontend { class Painter; } -/// paint the rows of the main text, return last drawn y value -int paintText(BufferView & bv, LyXText & text); +/// paint visible paragraph of main text +void paintText(BufferView & bv, frontend::Painter & painter); /// paint the rows of a text inset -void paintTextInset(BufferView & bv, LyXText & text, int x, int y); +void paintTextInset(Text const & text, PainterInfo & pi, int x, int y); + +/// some space for drawing the 'nested' markers (in pixel) +inline int nestMargin() { return 15; } + +/// margin for changebar +inline int changebarMargin() { return 12; } + +/// right margin +inline int rightMargin() { return 10; } + +} // namespace lyx #endif // ROWPAINTER_H