]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetTOC.h
Use new display() values to remove some inset hardcoding.
[features.git] / src / insets / InsetTOC.h
index e6e932b3f1b06d0baa3aee6549f0bfe3e02a3058..29d5e91e76d4c2fc76ccbb748fd6218c523d8c8c 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.
@@ -34,11 +37,12 @@ public:
        ///
        docstring layoutName() const;
        ///
-       DisplayType display() const { return AlignCenter; }
+       DisplayType display() const { return Display; }
        ///
        virtual void validate(LaTeXFeatures &) const;
        ///
-       int plaintext(odocstream &, OutputParams const &) const;
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const;
        ///
        int docbook(odocstream &, OutputParams const &) const;
        ///
@@ -46,7 +50,7 @@ public:
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
-       bool clickable(int, int) const { return true; }
+       bool clickable(BufferView const &, int, int) const { return true; }
        //@}
 
        /// \name Static public methods obligated for InsetCommand derived classes
@@ -60,6 +64,13 @@ public:
        //@}
 
 private:
+       ///
+       void makeTOCWithDepth(XHTMLStream & xs, Toc const & toc, const OutputParams & op) const;
+       ///
+       void makeTOCNoDepth(XHTMLStream & xs, Toc const & toc, const OutputParams & op) const;
+       ///
+       void makeTOCEntry(XHTMLStream & xs, Paragraph const & par, OutputParams const & op) const;
+
        /// \name Private functions inherited from Inset class
        //@{
        ///