summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fb97c06)
* BufferView and Bufferview::pimpl: repaintAll() methods deleted.
* rowpainter.C:
- refreshInside : new variable in the anonymous namespace.
- use of refreshInside instead of the repaintAll() methods
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14324
a592a061-630c-0410-9148-
cb99ea01b6c8
-bool const BufferView::repaintAll() const
-{
- return pimpl_->repaintAll();
-}
-
-
-void const BufferView::repaintAll(bool r) const
-{
- pimpl_->repaintAll(r);
-}
-
-
LCursor & BufferView::cursor()
{
return pimpl_->cursor_;
LCursor & BufferView::cursor()
{
return pimpl_->cursor_;
*/
void putSelectionAt(DocIterator const & cur,
int length, bool backwards);
*/
void putSelectionAt(DocIterator const & cur,
int length, bool backwards);
- ///
- bool const repaintAll() const;
- ///
- void const repaintAll(bool r) const;
FuncStatus getStatus(FuncRequest const & cmd);
/// a function should be executed
bool dispatch(FuncRequest const & ev);
FuncStatus getStatus(FuncRequest const & cmd);
/// a function should be executed
bool dispatch(FuncRequest const & ev);
- /// Flag: do a full redraw of inside text of inset
- bool repaintAll() { return refresh_inside_; }
- ///
- void repaintAll(bool r) {refresh_inside_ = r; }
/// the frontend
lyx::frontend::Gui & gui() const;
/// the frontend
lyx::frontend::Gui & gui() const;
int offset_ref_;
///
ViewMetricsInfo metrics(bool singlepar = false);
int offset_ref_;
///
ViewMetricsInfo metrics(bool singlepar = false);
- /// Working variable indicating a full screen refresh
- mutable bool refresh_inside_;
};
#endif // BUFFERVIEW_PIMPL_H
};
#endif // BUFFERVIEW_PIMPL_H
+/// Flag: do a full redraw of inside text of inset
+/// Working variable indicating a full screen refresh
+bool refreshInside;
+
/**
* A class used for painting an individual row of text.
*/
/**
* A class used for painting an individual row of text.
*/
theCoords.insets().add(inset, int(x_), yo_);
InsetText const * const in = inset->asTextInset();
// non-wide insets are painted completely. Recursive
theCoords.insets().add(inset, int(x_), yo_);
InsetText const * const in = inset->asTextInset();
// non-wide insets are painted completely. Recursive
- bool tmp = bv_.repaintAll();
+ bool tmp = refreshInside;
if (!in || !in->Wide()) {
if (!in || !in->Wide()) {
lyxerr[Debug::PAINTING] << endl << "Paint inset fully" << endl;
}
lyxerr[Debug::PAINTING] << endl << "Paint inset fully" << endl;
}
inset->drawSelection(pi, int(x_), yo_);
inset->draw(pi, int(x_), yo_);
inset->drawSelection(pi, int(x_), yo_);
inset->draw(pi, int(x_), yo_);
lyx::size_type rowno(0);
for (RowList::const_iterator rit = rb; rit != re; ++rit, ++rowno) {
y += rit->ascent();
lyx::size_type rowno(0);
for (RowList::const_iterator rit = rb; rit != re; ++rit, ++rowno) {
y += rit->ascent();
- // Allow setting of bv->repaintAll() for nested insets in
+ // Allow setting of refreshInside for nested insets in
- bool tmp = pi.base.bv->repaintAll();
+ bool tmp = refreshInside;
// Row signature; has row changed since last paint?
lyx::size_type const row_sig = calculateRowSignature(*rit, par, x, y);
// Row signature; has row changed since last paint?
lyx::size_type const row_sig = calculateRowSignature(*rit, par, x, y);
// If outer row has changed, force nested
// insets to repaint completely
if (row_has_changed)
// If outer row has changed, force nested
// insets to repaint completely
if (row_has_changed)
- pi.base.bv->repaintAll(true);
}
// Instrumentation for testing row cache (see also
}
// Instrumentation for testing row cache (see also
}
y += rit->descent();
// Restore, see above
}
y += rit->descent();
// Restore, see above
- pi.base.bv->repaintAll(tmp);
}
lyxerr[Debug::PAINTING] << "." << endl;
}
}
lyxerr[Debug::PAINTING] << "." << endl;
}
PainterInfo pi(const_cast<BufferView *>(&bv), pain);
// Should the whole screen, including insets, be refreshed?
PainterInfo pi(const_cast<BufferView *>(&bv), pain);
// Should the whole screen, including insets, be refreshed?
- bool repaintAll(select || !vi.singlepar);
+ bool repaintAll = select || !vi.singlepar;
if (repaintAll) {
// Clear background (if not delegated to rows)
if (repaintAll) {
// Clear background (if not delegated to rows)
int yy = vi.y1;
// draw contents
for (pit_type pit = vi.p1; pit <= vi.p2; ++pit) {
int yy = vi.y1;
// draw contents
for (pit_type pit = vi.p1; pit <= vi.p2; ++pit) {
- bv.repaintAll(repaintAll);
+ refreshInside = repaintAll;
Paragraph const & par = text->getPar(pit);
yy += par.ascent();
paintPar(pi, *bv.text(), pit, 0, yy, repaintAll);
Paragraph const & par = text->getPar(pit);
yy += par.ascent();
paintPar(pi, *bv.text(), pit, 0, yy, repaintAll);
y -= text.getPar(0).ascent();
// This flag can not be set from within same inset:
y -= text.getPar(0).ascent();
// This flag can not be set from within same inset:
- bool repaintAll = pi.base.bv->repaintAll();
+ bool repaintAll = refreshInside;
for (int pit = 0; pit < int(text.paragraphs().size()); ++pit) {
y += text.getPar(pit).ascent();
paintPar(pi, text, pit, x, y, repaintAll);
for (int pit = 0; pit < int(text.paragraphs().size()); ++pit) {
y += text.getPar(pit).ascent();
paintPar(pi, text, pit, x, y, repaintAll);