docstring const str = branch_name + ' ' + from_ascii(x11hexname);
lyx::dispatch(FuncRequest(LFUN_SET_COLOR, str));
dr.setError(false);
- dr.update(Update::Force);
+ dr.screenUpdate(Update::Force);
}
}
if (!msg.empty())
} else {
branch->setSelected(func.action() == LFUN_BRANCH_ACTIVATE);
dr.setError(false);
- dr.update(Update::Force);
+ dr.screenUpdate(Update::Force);
dr.forceBufferUpdate();
}
break;
}
if (success) {
- dr.update(Update::Force);
+ dr.screenUpdate(Update::Force);
dr.forceBufferUpdate();
}
break;
// We are most certainly here because of a change in the document
// It is then better to make sure that all dialogs are in sync with
// current document settings.
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
}
buffer_.params().clearLayoutModules();
buffer_.params().makeDocumentClass();
updateDocumentClass(oldClass);
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
}
buffer_.params().addLayoutModule(argument);
buffer_.params().makeDocumentClass();
updateDocumentClass(oldClass);
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
}
buffer_.params().setBaseClass(argument);
buffer_.params().makeDocumentClass();
updateDocumentClass(oldDocClass);
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
}
buffer_.params().setBaseClass(bc);
buffer_.params().makeDocumentClass();
updateDocumentClass(oldClass);
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
}
if (!cur.textUndo())
dr.setMessage(_("No further undo information"));
else
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
if (!cur.textRedo())
dr.setMessage(_("No further redo information"));
else
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
// Set the cursor
dit.pos() = pos;
setCursor(dit);
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
} else {
// Switch to other buffer view and resend cmd
lyx::dispatch(FuncRequest(
case LFUN_CHANGE_NEXT:
findNextChange(this);
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
break;
case LFUN_CHANGE_PREVIOUS:
findPreviousChange(this);
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
break;
case LFUN_CHANGES_MERGE:
if (findNextChange(this) || findPreviousChange(this)) {
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
showDialog("changes");
}
// accept everything in a single step to support atomic undo
buffer_.text().acceptOrRejectChanges(cur, Text::ACCEPT);
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
// Note: reject does not work recursively; the user may have to repeat the operation
buffer_.text().acceptOrRejectChanges(cur, Text::REJECT);
// FIXME: Move this LFUN to Buffer so that we don't have to do this:
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
bool update = in_texted && cur.bv().checkDepm(cur, old);
cur.finishUndo();
if (update) {
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
}
break;
y = getPos(cur).y_;
cur.finishUndo();
- dr.update(Update::SinglePar | Update::FitCursor);
+ dr.screenUpdate(Update::SinglePar | Update::FitCursor);
break;
}
y = getPos(cur).y_;
cur.finishUndo();
- dr.update(Update::SinglePar | Update::FitCursor);
+ dr.screenUpdate(Update::SinglePar | Update::FitCursor);
break;
}
cur.endUndoGroup();
cur = savecur;
cur.fixIfBroken();
- dr.update(Update::Force);
+ dr.screenUpdate(Update::Force);
dr.forceBufferUpdate();
if (iterations >= max_iter) {
// single par update would be good enough, but it has no way
// to tell us that at the moment.
inset->dispatch(cur, fr);
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
break;
}
theSelection().haveSelection(cursor().selection());
// If the command has been dispatched,
- if (cur.result().dispatched() || cur.result().update())
- processUpdateFlags(cur.result().update());
+ if (cur.result().dispatched() || cur.result().screenUpdate())
+ processUpdateFlags(cur.result().screenUpdate());
}
// set update flags
if (changed) {
- if (singlePar && !(cur.result().update() & Update::Force))
- cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
+ if (singlePar && !(cur.result().screenUpdate() & Update::Force))
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
else
- cur.screenUpdateFlags(cur.result().update() | Update::Force);
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::Force);
}
}
if (lyxaction.funcHasFlag(cmd.action(), LyXAction::AtPoint)
&& nextInset()) {
disp_.dispatched(true);
- disp_.update(Update::FitCursor | Update::Force);
+ disp_.screenUpdate(Update::FitCursor | Update::Force);
FuncRequest tmpcmd = cmd;
LYXERR(Debug::DEBUG, "Cursor::dispatch: (AtPoint) cmd: "
<< cmd0 << endl << *this);
// The common case is 'LFUN handled, need update', so make the
// LFUN handler's life easier by assuming this as default value.
// The handler can reset the update and val flags if necessary.
- disp_.update(Update::FitCursor | Update::Force);
+ disp_.screenUpdate(Update::FitCursor | Update::Force);
disp_.dispatched(true);
inset().dispatch(*this, cmd);
if (disp_.dispatched())
safe.pos() = safe.lastpos();
}
operator=(safe);
- disp_.update(Update::None);
+ disp_.screenUpdate(Update::None);
disp_.dispatched(false);
} else {
// restore the previous one because nested Cursor::dispatch calls
void Cursor::screenUpdateFlags(Update::flags f)
{
- disp_.update(f);
+ disp_.screenUpdate(f);
}
void Cursor::noScreenUpdate()
{
- disp_.update(Update::None);
+ disp_.screenUpdate(Update::None);
}
///
void setMessage(docstring m) { message_ = m; }
///
- Update::flags update() const { return update_; }
+ Update::flags screenUpdate() const { return update_; }
///
- void update(Update::flags f) { update_ = f; }
+ void screenUpdate(Update::flags f) { update_ = f; }
/// Does the buffer need updating?
bool needBufferUpdate() const { return need_buf_update_; }
/// Force the buffer to be updated
LASSERT(cur.bv().cursor() == cur, /**/);
cur.insert(s);
cur.bv().cursor() = cur;
- if (!(cur.result().update() & Update::Force))
- cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
+ if (!(cur.result().screenUpdate() & Update::Force))
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
return true;
}
// for now only Text::erase() and Text::backspace() do that.
// The plan is to verify all the LFUNs and then to remove this
// singleParUpdate boolean altogether.
- if (cur.result().update() & Update::Force) {
+ if (cur.result().screenUpdate() & Update::Force) {
singleParUpdate = false;
needsUpdate = true;
}
DispatchResult dr;
// redraw the screen at the end (first of the two drawing steps).
//This is done unless explicitly requested otherwise
- dr.update(Update::FitCursor);
+ dr.screenUpdate(Update::FitCursor);
dispatch(cmd, dr);
if (!current_view_)
// also initializes the position cache for all insets in
// (at least partially) visible top-level paragraphs.
// We will redraw the screen only if needed.
- bv->processUpdateFlags(dr.update());
+ bv->processUpdateFlags(dr.screenUpdate());
// Do we have a selection?
theSelection().haveSelection(bv->cursor().selection());
dr.setMessage(flag.message());
dr.setError(true);
dr.dispatched(false);
- dr.update(Update::None);
+ dr.screenUpdate(Update::None);
dr.clearBufferUpdate();
return;
};
case LFUN_BOOKMARK_GOTO:
// go to bookmark, open unopened file and switch to buffer if necessary
gotoBookmark(convert<unsigned int>(to_utf8(cmd.argument())), true, true);
- dr.update(Update::Force | Update::FitCursor);
+ dr.screenUpdate(Update::Force | Update::FitCursor);
break;
case LFUN_BOOKMARK_CLEAR:
inline_timer_.start(int(lyxrc.completion_inline_delay * 1000));
else {
// no inline completion, hence a metrics update is needed
- if (!(cur.result().update() & Update::Force))
- cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
+ if (!(cur.result().screenUpdate() & Update::Force))
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
}
// update prefix if any completion is possible
updateVisibility(cur, start, keep);
- if (cur.result().update())
- gui_->bufferView().processUpdateFlags(cur.result().update());
+ if (cur.result().screenUpdate())
+ gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
}
showPopup(cur);
// redraw if needed
- if (cur.result().update())
- gui_->bufferView().processUpdateFlags(cur.result().update());
+ if (cur.result().screenUpdate())
+ gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
}
showInline(cur);
// redraw if needed
- if (cur.result().update())
- gui_->bufferView().processUpdateFlags(cur.result().update());
+ if (cur.result().screenUpdate())
+ gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
}
hidePopup(cur);
// redraw if needed
- if (cur.result().update())
- gui_->bufferView().processUpdateFlags(cur.result().update());
+ if (cur.result().screenUpdate())
+ gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
}
hideInline(cur);
// redraw if needed
- if (cur.result().update())
- gui_->bufferView().processUpdateFlags(cur.result().update());
+ if (cur.result().screenUpdate())
+ gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
}
popup_timer_.start(0);
// redraw if needed
- if (cur.result().update())
- gui_->bufferView().processUpdateFlags(cur.result().update());
+ if (cur.result().screenUpdate())
+ gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
}
hidePopup(cur);
hideInline(cur);
- if (cur.result().update())
- gui_->bufferView().processUpdateFlags(cur.result().update());
+ if (cur.result().screenUpdate())
+ gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
}
if (inlineVisible())
updateInline(cur, completion);
- if (cur.result().update())
- gui_->bufferView().processUpdateFlags(cur.result().update());
+ if (cur.result().screenUpdate())
+ gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
}
} // namespace frontend
{
BufferView * bv = currentBufferView();
// By default we won't need any update.
- dr.update(Update::None);
+ dr.screenUpdate(Update::None);
// assume cmd will be dispatched
dr.dispatched(true);
// position if needed
// cur.result().update(): don't overwrite previously set flags.
cur.screenUpdateFlags(Update::Decoration | Update::FitCursor
- | cur.result().update());
+ | cur.result().screenUpdate());
} else if (cmd.button() == mouse_button::button2) {
if (cap::selection()) {
// See comment in Text::dispatch why we do this
// must be a subscript...
old.recordUndoInset();
removeScript(false);
- cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
return true;
} else if (cell(1).empty()) {
// must be a superscript...
old.recordUndoInset();
removeScript(true);
- cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
return true;
}
}
insetCur.cell().insert(insetCur.pos(), ar);
// redraw
- cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
return true;
}
inset_cursor.cell().erase(inset_cursor.pos());
inset_cursor.cell().insert(inset_cursor.pos(),
createInsetMath(unfolded_name, cur.buffer()));
- cur.screenUpdateFlags(cur.result().update() | Update::SinglePar);
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
return true;
}
}