Make Cursor::disp_ private as it should be.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34144 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-04-15 17:34:34 +00:00
parent ebb830ba9b
commit 8156884090
6 changed files with 29 additions and 29 deletions

View File

@ -2838,10 +2838,10 @@ void BufferView::setInlineCompletion(Cursor & cur, DocIterator const & pos,
// set update flags // set update flags
if (changed) { if (changed) {
if (singlePar && !(cur.disp_.update() & Update::Force)) if (singlePar && !(cur.result().update() & Update::Force))
cur.updateFlags(cur.disp_.update() | Update::SinglePar); cur.updateFlags(cur.result().update() | Update::SinglePar);
else else
cur.updateFlags(cur.disp_.update() | Update::Force); cur.updateFlags(cur.result().update() | Update::Force);
} }
} }

View File

@ -291,14 +291,14 @@ public:
/// the anchor position /// the anchor position
DocIterator anchor_; DocIterator anchor_;
///
mutable DispatchResult disp_;
/// ///
DocIterator const & beforeDispatchCursor() const { return beforeDispatchCursor_; } DocIterator const & beforeDispatchCursor() const { return beforeDispatchCursor_; }
/// ///
void saveBeforeDispatchPosXY(); void saveBeforeDispatchPosXY();
private: private:
///
mutable DispatchResult disp_;
/** /**
* The target x position of the cursor. This is used for when * The target x position of the cursor. This is used for when
* we have text like : * we have text like :

View File

@ -2020,8 +2020,8 @@ bool Text::insertCompletion(Cursor & cur, docstring const & s, bool /*finished*/
LASSERT(cur.bv().cursor() == cur, /**/); LASSERT(cur.bv().cursor() == cur, /**/);
cur.insert(s); cur.insert(s);
cur.bv().cursor() = cur; cur.bv().cursor() = cur;
if (!(cur.disp_.update() & Update::Force)) if (!(cur.result().update() & Update::Force))
cur.updateFlags(cur.disp_.update() | Update::SinglePar); cur.updateFlags(cur.result().update() | Update::SinglePar);
return true; return true;
} }

View File

@ -316,8 +316,8 @@ void GuiCompleter::updateVisibility(Cursor & cur, bool start, bool keep, bool cu
inline_timer_.start(int(lyxrc.completion_inline_delay * 1000)); inline_timer_.start(int(lyxrc.completion_inline_delay * 1000));
else { else {
// no inline completion, hence a metrics update is needed // no inline completion, hence a metrics update is needed
if (!(cur.disp_.update() & Update::Force)) if (!(cur.result().update() & Update::Force))
cur.updateFlags(cur.disp_.update() | Update::SinglePar); cur.updateFlags(cur.result().update() | Update::SinglePar);
} }
// update prefix if any completion is possible // update prefix if any completion is possible
@ -338,8 +338,8 @@ void GuiCompleter::updateVisibility(bool start, bool keep)
updateVisibility(cur, start, keep); updateVisibility(cur, start, keep);
if (cur.disp_.update()) if (cur.result().update())
gui_->bufferView().processUpdateFlags(cur.disp_.update()); gui_->bufferView().processUpdateFlags(cur.result().update());
} }
@ -603,8 +603,8 @@ void GuiCompleter::showPopup()
showPopup(cur); showPopup(cur);
// redraw if needed // redraw if needed
if (cur.disp_.update()) if (cur.result().update())
gui_->bufferView().processUpdateFlags(cur.disp_.update()); gui_->bufferView().processUpdateFlags(cur.result().update());
} }
@ -616,8 +616,8 @@ void GuiCompleter::showInline()
showInline(cur); showInline(cur);
// redraw if needed // redraw if needed
if (cur.disp_.update()) if (cur.result().update())
gui_->bufferView().processUpdateFlags(cur.disp_.update()); gui_->bufferView().processUpdateFlags(cur.result().update());
} }
@ -629,8 +629,8 @@ void GuiCompleter::hidePopup()
hidePopup(cur); hidePopup(cur);
// redraw if needed // redraw if needed
if (cur.disp_.update()) if (cur.result().update())
gui_->bufferView().processUpdateFlags(cur.disp_.update()); gui_->bufferView().processUpdateFlags(cur.result().update());
} }
@ -642,8 +642,8 @@ void GuiCompleter::hideInline()
hideInline(cur); hideInline(cur);
// redraw if needed // redraw if needed
if (cur.disp_.update()) if (cur.result().update())
gui_->bufferView().processUpdateFlags(cur.disp_.update()); gui_->bufferView().processUpdateFlags(cur.result().update());
} }
@ -721,8 +721,8 @@ void GuiCompleter::tab()
popup_timer_.start(0); popup_timer_.start(0);
// redraw if needed // redraw if needed
if (cur.disp_.update()) if (cur.result().update())
gui_->bufferView().processUpdateFlags(cur.disp_.update()); gui_->bufferView().processUpdateFlags(cur.result().update());
} }
@ -887,8 +887,8 @@ void GuiCompleter::popupActivated(const QString & completion)
hidePopup(cur); hidePopup(cur);
hideInline(cur); hideInline(cur);
if (cur.disp_.update()) if (cur.result().update())
gui_->bufferView().processUpdateFlags(cur.disp_.update()); gui_->bufferView().processUpdateFlags(cur.result().update());
} }
@ -903,8 +903,8 @@ void GuiCompleter::popupHighlighted(const QString & completion)
if (inlineVisible()) if (inlineVisible())
updateInline(cur, completion); updateInline(cur, completion);
if (cur.disp_.update()) if (cur.result().update())
gui_->bufferView().processUpdateFlags(cur.disp_.update()); gui_->bufferView().processUpdateFlags(cur.result().update());
} }
} // namespace frontend } // namespace frontend

View File

@ -704,13 +704,13 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur)
// must be a subscript... // must be a subscript...
old.recordUndoInset(); old.recordUndoInset();
removeScript(false); removeScript(false);
cur.updateFlags(cur.disp_.update() | Update::SinglePar); cur.updateFlags(cur.result().update() | Update::SinglePar);
return true; return true;
} else if (cell(1).empty()) { } else if (cell(1).empty()) {
// must be a superscript... // must be a superscript...
old.recordUndoInset(); old.recordUndoInset();
removeScript(true); removeScript(true);
cur.updateFlags(cur.disp_.update() | Update::SinglePar); cur.updateFlags(cur.result().update() | Update::SinglePar);
return true; return true;
} }
} }
@ -740,7 +740,7 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur)
insetCur.cell().insert(insetCur.pos(), ar); insetCur.cell().insert(insetCur.pos(), ar);
// redraw // redraw
cur.updateFlags(cur.disp_.update() | Update::SinglePar); cur.updateFlags(cur.result().update() | Update::SinglePar);
return true; return true;
} }

View File

@ -641,7 +641,7 @@ bool MathMacro::notifyCursorLeaves(Cursor const & old, Cursor & cur)
inset_cursor.cell().erase(inset_cursor.pos()); inset_cursor.cell().erase(inset_cursor.pos());
inset_cursor.cell().insert(inset_cursor.pos(), inset_cursor.cell().insert(inset_cursor.pos(),
createInsetMath(unfolded_name, cur.buffer())); createInsetMath(unfolded_name, cur.buffer()));
cur.updateFlags(cur.disp_.update() | Update::SinglePar); cur.updateFlags(cur.result().update() | Update::SinglePar);
return true; return true;
} }
} }