]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTOC.h
Strip et al. for citation search
[lyx.git] / src / insets / InsetTOC.h
index e6e932b3f1b06d0baa3aee6549f0bfe3e02a3058..ca3f463c5ad610d8aa9c63ebde127296a034d561 100644 (file)
 
 #include "InsetCommand.h"
 
+#include "Toc.h"
+
 
 namespace lyx {
 
+class Paragraph;
 
 /// Used to insert table of contents and similar lists
 /// at present, supports only \tableofcontents and \listoflistings.
@@ -30,23 +33,24 @@ public:
        /// \name Public functions inherited from Inset class
        //@{
        ///
-       InsetCode lyxCode() const { return TOC_CODE; }
+       InsetCode lyxCode() const override { return TOC_CODE; }
        ///
-       docstring layoutName() const;
+       docstring layoutName() const override;
        ///
-       DisplayType display() const { return AlignCenter; }
+       int rowFlags() const override { return Display; }
        ///
-       virtual void validate(LaTeXFeatures &) const;
+       void validate(LaTeXFeatures &) const override;
        ///
-       int plaintext(odocstream &, OutputParams const &) const;
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const override;
        ///
-       int docbook(odocstream &, OutputParams const &) const;
+       void docbook(XMLStream &, OutputParams const &) const override;
        ///
-       docstring xhtml(XHTMLStream & xs, OutputParams const &) const;
+       docstring xhtml(XMLStream & xs, OutputParams const &) const override;
        ///
-       void doDispatch(Cursor & cur, FuncRequest & cmd);
+       void doDispatch(Cursor & cur, FuncRequest & cmd) override;
        ///
-       bool clickable(int, int) const { return true; }
+       bool clickable(BufferView const &, int, int) const override { return true; }
        //@}
 
        /// \name Static public methods obligated for InsetCommand derived classes
@@ -60,16 +64,23 @@ public:
        //@}
 
 private:
+       ///
+       void makeTOCWithDepth(XMLStream & xs, Toc const & toc, const OutputParams & op) const;
+       ///
+       void makeTOCNoDepth(XMLStream & xs, Toc const & toc, const OutputParams & op) const;
+       ///
+       void makeTOCEntry(XMLStream & xs, Paragraph const & par, OutputParams const & op) const;
+
        /// \name Private functions inherited from Inset class
        //@{
        ///
-       Inset * clone() const { return new InsetTOC(*this); }
+       Inset * clone() const override { return new InsetTOC(*this); }
        //@}
 
        /// \name Private functions inherited from InsetCommand class
        //@{
        ///
-       docstring screenLabel() const;
+       docstring screenLabel() const override;
        //@}
 };