old = last_selection_;
// set new model
- setModel(new GuiCompletionModel(this, cur.inset().completionList(cur)));
+ Inset::CompletionList const * list
+ = cur.inset().createCompletionList(cur);
+ setModel(new GuiCompletionModel(this, list));
// show popup
if (popupUpdate)
/// Returns completion suggestions at cursor position. Return an
/// null pointer if no completion is a available or possible.
/// The caller is responsible to free the returned object!
- virtual CompletionList const * completionList(Cursor const &) const
+ virtual CompletionList const * createCompletionList(Cursor const &) const
{ return 0; }
/// Returns the completion prefix to filter the suggestions for completion.
/// This is only called if completionList returned a non-null list.
}
-Inset::CompletionList const * InsetText::completionList(Cursor const & cur) const
+Inset::CompletionList const
+* InsetText::createCompletionList(Cursor const & cur) const
{
if (!completionSupported(cur))
return 0;
///
bool automaticPopupCompletion() const;
///
- CompletionList const * completionList(Cursor const & cur) const;
+ CompletionList const * createCompletionList(Cursor const & cur) const;
///
docstring completionPrefix(Cursor const & cur) const;
///
}
-Inset::CompletionList const * InsetMathNest::completionList(Cursor const & cur) const
+Inset::CompletionList const *
+InsetMathNest::createCompletionList(Cursor const & cur) const
{
if (!cur.inMacroMode())
return 0;
///
bool automaticPopupCompletion() const;
///
- CompletionList const * completionList(Cursor const & cur) const;
+ CompletionList const * createCompletionList(Cursor const & cur) const;
///
docstring completionPrefix(Cursor const & cur) const;
///
}
-Inset::CompletionList const * MathMacro::completionList(Cursor const & cur) const
+Inset::CompletionList const *
+MathMacro::createCompletionList(Cursor const & cur) const
{
if (displayMode() != DISPLAY_UNFOLDED)
- return InsetMathNest::completionList(cur);
+ return InsetMathNest::createCompletionList(cur);
return new MathCompletionList(cur.bv().cursor());
}
///
bool automaticPopupCompletion() const;
///
- CompletionList const * completionList(Cursor const & cur) const;
+ CompletionList const * createCompletionList(Cursor const & cur) const;
///
docstring completionPrefix(Cursor const & cur) const;
///