X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetArgument.h;h=d77f3ca65e27c1e0ddf8fcc47961a7abf02cd351;hb=7d38a4d126e8e2dab08c6a47947b913921c3f083;hp=0ccdc41bc0b5ddc9f9be620f6dc68f3d30cd4132;hpb=5e2071376972a3c16d0874f18cf31e329e4f773c;p=lyx.git diff --git a/src/insets/InsetArgument.h b/src/insets/InsetArgument.h index 0ccdc41bc0..d77f3ca65e 100644 --- a/src/insets/InsetArgument.h +++ b/src/insets/InsetArgument.h @@ -13,7 +13,7 @@ #define INSETARGUMENT_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -23,12 +23,15 @@ namespace lyx { * InsetArgument. Used to insert a short version of sectioning header etc. * automatically, or other optional LaTeX arguments */ -class InsetArgument : public InsetCollapsable +class InsetArgument : public InsetCollapsible { public: /// InsetArgument(Buffer *, std::string const &); + /// + InsetArgument const * asInsetArgument() const override { return this; } + /// Outputting the parameter of a LaTeX command void latexArgument(otexstream & os, OutputParams const & runparams_in, docstring const & ldelim, docstring const & rdelim, @@ -39,55 +42,61 @@ public: /// \name Public functions inherited from Inset class //@{ /// - bool hasSettings() const { return false; } + bool hasSettings() const override { return false; } /// - InsetCode lyxCode() const { return ARG_CODE; } + InsetCode lyxCode() const override { return ARG_CODE; } /// - docstring layoutName() const { return from_ascii("Argument"); } + docstring layoutName() const override { return from_ascii("Argument"); } /// Update the label string of this inset - void updateBuffer(ParIterator const &, UpdateType); + void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override; /// - void latex(otexstream &, OutputParams const &) const { } + void latex(otexstream &, OutputParams const &) const override { } /// - int plaintext(odocstringstream &, OutputParams const &, size_t) const { return 0; } + int plaintext(odocstringstream &, OutputParams const &, size_t) const override { return 0; } /// - int docbook(odocstream &, OutputParams const &) const { return 0; } + void docbook(XMLStream &, OutputParams const &) const override { return; } /// - docstring xhtml(XHTMLStream &, OutputParams const &) const + docstring xhtml(XMLStream &, OutputParams const &) const override { return docstring(); } /// - void write(std::ostream & os) const; + void write(std::ostream & os) const override; + /// + void read(Lexer & lex) override; /// - void read(Lexer & lex); + bool neverIndent() const override { return true; } /// - bool neverIndent() const { return true; } + std::string contextMenuName() const override; /// - std::string contextMenuName() const; + bool isPassThru() const override { return pass_thru_; } /// - bool isPassThru() const { return pass_thru_; } + bool isFreeSpacing() const override { return free_spacing_; } /// - bool resetFontEdit() const { return false; } + bool isTocCaption() const { return is_toc_caption_; } + /// + bool resetFontEdit() const override { return false; } //@} - /// \name Public functions inherited from InsetCollapsable class + /// \name Public functions inherited from InsetCollapsible class //@{ /// - InsetLayout::InsetDecoration decoration() const; + InsetLayout::InsetDecoration decoration() const override; /// - FontInfo getFont() const; + FontInfo getFont() const override; /// - FontInfo getLabelfont() const; + FontInfo getLabelfont() const override; /// - ColorCode labelColor() const; + ColorCode labelColor() const override; /// - void setButtonLabel(); + void setButtonLabel() override; //@} /// void addToToc(DocIterator const & dit, bool output_active, - UpdateType utype) const; //override + UpdateType utype, TocBackend & backend) const override; private: /// - docstring toolTip(BufferView const & bv, int, int) const; + docstring toolTip(BufferView const & bv, int, int) const override; + /// + void fixParagraphLanguage(Language const *); /// std::string name_; /// @@ -107,21 +116,27 @@ private: /// Effective pass-thru setting (inherited or local) bool pass_thru_; /// + bool free_spacing_; + /// docstring pass_thru_chars_; + /// Does this argument provide content for the TOC? + bool is_toc_caption_; /// The type of Toc this is the caption of, empty otherwise. std::string caption_of_toc_; + /// Specific line break macro + std::string newline_cmd_; protected: /// \name Protected functions inherited from Inset class //@{ /// - bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override; /// - void doDispatch(Cursor & cur, FuncRequest & cmd); + void doDispatch(Cursor & cur, FuncRequest & cmd) override; /// - Inset * clone() const { return new InsetArgument(*this); } + Inset * clone() const override { return new InsetArgument(*this); } /// Is the content of this inset part of the immediate (visible) text sequence? - bool isPartOfTextSequence() const { return false; } + bool isPartOfTextSequence() const override { return false; } //@} };