X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetArgument.h;h=5c63702262595a3295bd2b67104efd847386bbce;hb=62af7ee772f16f154225d2d0b65d77f4376b6001;hp=0a5d00037966216410bbee395df294cf38798860;hpb=fb9a866a6666be093b7b12a3ad8e7f83bfc3b3f3;p=lyx.git diff --git a/src/insets/InsetArgument.h b/src/insets/InsetArgument.h index 0a5d000379..5c63702262 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 { return this; } + /// Outputting the parameter of a LaTeX command void latexArgument(otexstream & os, OutputParams const & runparams_in, docstring const & ldelim, docstring const & rdelim, @@ -53,7 +56,7 @@ public: /// int docbook(odocstream &, OutputParams const &) const { return 0; } /// - docstring xhtml(XHTMLStream &, OutputParams const &) const + docstring xhtml(XHTMLStream &, OutputParams const &) const { return docstring(); } /// void write(std::ostream & os) const; @@ -66,9 +69,13 @@ public: /// bool isPassThru() const { return pass_thru_; } /// + bool isFreeSpacing() const { return free_spacing_; } + /// + bool isTocCaption() const { return is_toc_caption_; } + /// bool resetFontEdit() const { return false; } //@} - /// \name Public functions inherited from InsetCollapsable class + /// \name Public functions inherited from InsetCollapsible class //@{ /// InsetLayout::InsetDecoration decoration() const; @@ -81,11 +88,16 @@ public: /// void setButtonLabel(); //@} + /// + void addToToc(DocIterator const & dit, bool output_active, + UpdateType utype, TocBackend & backend) const; //override private: /// docstring toolTip(BufferView const & bv, int, int) const; /// + void fixParagraphLanguage(Language const *); + /// std::string name_; /// docstring labelstring_; @@ -104,7 +116,15 @@ 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 @@ -115,6 +135,8 @@ protected: void doDispatch(Cursor & cur, FuncRequest & cmd); /// Inset * clone() const { return new InsetArgument(*this); } + /// Is the content of this inset part of the immediate (visible) text sequence? + bool isPartOfTextSequence() const { return false; } //@} };