}
-docstring BufferView::contextMenu(int x, int y) const
+string BufferView::contextMenu(int x, int y) const
{
//If there is a selection, return the containing inset menu
if (d->cursor_.selection())
/// \return Tool tip for the given position.
docstring toolTip(int x, int y) const;
/// \return the context menu for the given position.
- docstring contextMenu(int x, int y) const;
+ std::string contextMenu(int x, int y) const;
/// Save the current position as bookmark.
/// if idx == 0, save to temp_bookmark
void GuiWorkArea::contextMenuEvent(QContextMenuEvent * e)
{
- docstring name;
+ string name;
if (e->reason() == QContextMenuEvent::Mouse)
// the menu name is set on mouse press
name = d->context_menu_name_;
/// pressed. This is used to get the correct context menu
/// when the menu is actually shown (after releasing on Windows)
/// and after the DEPM has done its job.
- docstring context_menu_name_;
+ std::string context_menu_name_;
}; // GuiWorkArea
} // namespace frontend
}
-docstring Inset::contextMenu(BufferView const &, int, int) const
+string Inset::contextMenu(BufferView const &, int, int) const
{
return contextMenuName();
}
-docstring Inset::contextMenuName() const
+string Inset::contextMenuName() const
{
- return docstring();
+ return string();
}
/// \return Context menu identifier. This function determines
/// whose Inset's menu should be shown for the given position.
- virtual docstring contextMenu(BufferView const & bv, int x, int y) const;
+ virtual std::string contextMenu(BufferView const & bv, int x, int y) const;
/// \return Context menu identifier for this inset.
/// This default implementation returns an empty string.
- virtual docstring contextMenuName() const;
+ virtual std::string contextMenuName() const;
virtual docstring layoutName() const;
}
-docstring InsetBibtex::contextMenuName() const
+string InsetBibtex::contextMenuName() const
{
- return from_ascii("context-bibtex");
+ return "context-bibtex";
}
///
docstring xhtml(XHTMLStream &, OutputParams const &) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
//@}
/// \name Static public methods obligated for InsetCommand derived classes
}
-docstring InsetBox::contextMenuName() const
+string InsetBox::contextMenuName() const
{
- return from_ascii("context-box");
+ return "context-box";
}
/// used by the constructors
void init();
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
InsetBoxParams params_;
}
-docstring InsetBranch::contextMenuName() const
+string InsetBranch::contextMenuName() const
{
- return from_ascii("context-branch");
+ return "context-branch";
}
///
void validate(LaTeXFeatures &) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
void addToToc(DocIterator const &) const;
///
}
-docstring InsetCitation::contextMenuName() const
+string InsetCitation::contextMenuName() const
{
- return from_ascii("context-citation");
+ return "context-citation";
}
///
void addToToc(DocIterator const &) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
//@}
/// \name Static public methods obligated for InsetCommand derived classes
}
-docstring InsetCollapsable::contextMenu(BufferView const & bv, int x,
+string InsetCollapsable::contextMenu(BufferView const & bv, int x,
int y) const
{
- docstring context_menu = contextMenuName();
- docstring const it_context_menu = InsetText::contextMenuName();
+ string context_menu = contextMenuName();
+ string const it_context_menu = InsetText::contextMenuName();
if (decoration() == InsetLayout::CONGLOMERATE)
return context_menu + ";" + it_context_menu;
- docstring const ic_context_menu = InsetCollapsable::contextMenuName();
+ string const ic_context_menu = InsetCollapsable::contextMenuName();
if (ic_context_menu != context_menu)
context_menu += ";" + ic_context_menu;
}
-docstring InsetCollapsable::contextMenuName() const
+string InsetCollapsable::contextMenuName() const
{
if (decoration() == InsetLayout::CONGLOMERATE)
- return from_ascii("context-conglomerate");
+ return "context-conglomerate";
else
- return from_ascii("context-collapsable");
+ return "context-collapsable";
}
} // namespace lyx
///
virtual bool usePlainLayout() const { return true; }
///
- docstring contextMenu(BufferView const & bv, int x, int y) const;
+ std::string contextMenu(BufferView const & bv, int x, int y) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
docstring floatName(std::string const & type) const;
protected:
}
-docstring InsetCommand::contextMenuName() const
+string InsetCommand::contextMenuName() const
{
- return from_ascii("context-") + from_ascii(insetName(p_.code()));
+ return "context-" + insetName(p_.code());
}
/// \name Methods relaying to the InsetCommandParams p_
//@{
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
bool showInsetDialog(BufferView * bv) const;
///
///
static std::string params2string(CollapseStatus);
- docstring contextMenuName() const
- { return from_ascii("context-ert"); }
+ std::string contextMenuName() const
+ { return "context-ert"; }
private:
///
InsetCode lyxCode() const { return ERT_CODE; }
}
-docstring InsetExternal::contextMenuName() const
+string InsetExternal::contextMenuName() const
{
- return from_ascii("context-external");
+ return "context-external";
}
/// \returns the number of rows (\n's) of generated code.
void latex(otexstream &, OutputParams const &) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
bool setMouseHover(BufferView const * bv, bool mouse_hover);
///
}
-docstring InsetGraphics::contextMenuName() const
+string InsetGraphics::contextMenuName() const
{
- return from_ascii("context-graphics");
+ return "context-graphics";
}
///
void addToToc(DocIterator const &) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
/// Force inset into LTR environment if surroundings are RTL
bool forceLTR() const { return true; }
///
}
-docstring InsetHyperlink::contextMenuName() const
+string InsetHyperlink::contextMenuName() const
{
- return from_ascii("context-hyperlink");
+ return "context-hyperlink";
}
///
docstring toolTip(BufferView const & bv, int x, int y) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
void validate(LaTeXFeatures &) const;
///
}
-docstring InsetInclude::contextMenuName() const
+string InsetInclude::contextMenuName() const
{
- return from_ascii("context-include");
+ return "context-include";
}
///
void updateBuffer(ParIterator const &, UpdateType);
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
//@}
/// \name Static public methods obligated for InsetCommand derived classes
}
-docstring InsetIndex::contextMenuName() const
+string InsetIndex::contextMenuName() const
{
- return from_ascii("context-index");
+ return "context-index";
}
}
-docstring InsetPrintIndex::contextMenuName() const
+string InsetPrintIndex::contextMenuName() const
{
return buffer().masterBuffer()->params().use_indices ?
- from_ascii("context-indexprint") : docstring();
+ "context-indexprint" : string();
}
/// Updates needed features for this inset.
void validate(LaTeXFeatures & features) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
Inset * clone() const { return new InsetIndex(*this); }
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
/// Updates needed features for this inset.
void validate(LaTeXFeatures & features) const;
///
}
-docstring InsetInfo::contextMenu(BufferView const &, int, int) const
+string InsetInfo::contextMenu(BufferView const &, int, int) const
{
//FIXME: We override the implementation of InsetCollapsable,
//because this inset is not a collapsable inset.
}
-docstring InsetInfo::contextMenuName() const
+string InsetInfo::contextMenuName() const
{
- return from_ascii("context-info");
+ return "context-info";
}
///
docstring toolTip(BufferView const & bv, int x, int y) const;
///
- docstring contextMenu(BufferView const &, int, int) const;
+ std::string contextMenu(BufferView const &, int, int) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
/// should paragraph indendation be ommitted in any case?
bool neverIndent() const { return true; }
}
-docstring InsetListings::contextMenuName() const
+string InsetListings::contextMenuName() const
{
- return from_ascii("context-listings");
+ return "context-listings";
}
///
InsetListingsParams & params() { return params_; }
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
///
}
-docstring InsetNewline::contextMenuName() const
+string InsetNewline::contextMenuName() const
{
- return from_ascii("context-newline");
+ return "context-newline";
}
///
ColorCode ColorName() const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
Inset * clone() const { return new InsetNewline(*this); }
///
}
-docstring InsetNewpage::contextMenuName() const
+string InsetNewpage::contextMenuName() const
{
- return from_ascii("context-newpage");
+ return "context-newpage";
}
///
ColorCode ColorName() const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
Inset * clone() const { return new InsetNewpage(*this); }
///
}
-docstring InsetPrintNomencl::contextMenuName() const
+string InsetPrintNomencl::contextMenuName() const
{
- return from_ascii("context-nomenclprint");
+ return "context-nomenclprint";
}
///
void latex(otexstream &, OutputParams const &) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
//@}
/// \name Static public methods obligated for InsetCommand derived classes
}
-docstring InsetNote::contextMenuName() const
+string InsetNote::contextMenuName() const
{
- return from_ascii("context-note");
+ return "context-note";
}
bool InsetNote::allowSpellCheck() const
/// used by the constructors
void init();
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
friend class InsetNoteParams;
return docstring();
}
-docstring InsetPhantom::contextMenuName() const
+string InsetPhantom::contextMenuName() const
{
- return from_ascii("context-phantom");
+ return "context-phantom";
}
/// used by the constructors
void init();
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
friend class InsetPhantomParams;
bool descendable(BufferView const & /*bv*/) const { return true; }
- docstring contextMenuName() const
- { return from_ascii("context-preview"); }
+ std::string contextMenuName() const
+ { return "context-preview"; }
void metrics(MetricsInfo & mi, Dimension & dim) const;
}
-docstring InsetScript::contextMenuName() const
+string InsetScript::contextMenuName() const
{
- return from_ascii("context-script");
+ return "context-script";
}
///
Inset * clone() const { return new InsetScript(*this); }
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
//@}
/// \name Public functions inherited from InsetText class
}
-docstring InsetSpace::contextMenuName() const
+string InsetSpace::contextMenuName() const
{
- return from_ascii("context-space");
+ return "context-space";
}
// a line separator)?
bool isSpace() const { return true; }
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
bool clickable(int /* x */, int /* y */) const { return true; }
protected:
}
-docstring InsetTabular::contextMenu(BufferView const &, int, int) const
+string InsetTabular::contextMenu(BufferView const &, int, int) const
{
// FIXME: depending on the selection state,
// we could offer a different menu.
}
-docstring InsetTabular::contextMenuName() const
+string InsetTabular::contextMenuName() const
{
- return from_ascii("context-tabular");
+ return "context-tabular";
}
///
InsetCode lyxCode() const { return TABULAR_CODE; }
///
- docstring contextMenu(BufferView const &, int, int) const;
+ std::string contextMenu(BufferView const &, int, int) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
/// get offset of this cursor slice relative to our upper left corner
void cursorPos(BufferView const & bv, CursorSlice const & sl,
bool boundary, int & x, int & y) const;
}
-docstring InsetText::contextMenu(BufferView const &, int, int) const
+string InsetText::contextMenu(BufferView const &, int, int) const
{
- docstring context_menu = contextMenuName();
+ string context_menu = contextMenuName();
if (context_menu != InsetText::contextMenuName())
context_menu += ";" + InsetText::contextMenuName();
return context_menu;
}
-docstring InsetText::contextMenuName() const
+string InsetText::contextMenuName() const
{
- return from_ascii("context-edit");
+ return "context-edit";
}
size_t numlines = 5, size_t len = 80) const;
///
- docstring contextMenu(BufferView const &, int, int) const;
+ std::string contextMenu(BufferView const &, int, int) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
protected:
}
-docstring InsetVSpace::contextMenuName() const
+string InsetVSpace::contextMenuName() const
{
- return from_ascii("context-vspace");
+ return "context-vspace";
}
///
bool hasSettings() const { return true; }
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
static void string2params(std::string const &, VSpace &);
///
}
-docstring InsetMathHull::contextMenuName() const
+string InsetMathHull::contextMenuName() const
{
- return from_ascii("context-math");
+ return "context-math";
}
void recordLocation(DocIterator const & di);
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
InsetCode lyxCode() const { return MATH_HULL_CODE; }
}
-docstring InsetMathSpace::contextMenuName() const
+string InsetMathSpace::contextMenuName() const
{
- return from_ascii("context-mathspace");
+ return "context-mathspace";
}
///
bool hasSettings() const { return true; }
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///
}
-docstring MathMacroTemplate::contextMenuName() const
+string MathMacroTemplate::contextMenuName() const
{
- return from_ascii("context-math-macro-definition");
+ return "context-math-macro-definition";
}
} // namespace lyx
///
void infoize(odocstream & os) const;
///
- docstring contextMenuName() const;
+ std::string contextMenuName() const;
protected:
///
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);