X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetTOC.h;h=ead482b2e839870ec93ed3886d12eb528669f517;hb=0a6ff99f28686066675848f3410f77c0947bc357;hp=9ba7cf06f3de98d527014932d087ed8c725ef435;hpb=5d3461b10f68b81c06898d19e5d7a1b55c472f37;p=lyx.git diff --git a/src/insets/InsetTOC.h b/src/insets/InsetTOC.h index 9ba7cf06f3..ead482b2e8 100644 --- a/src/insets/InsetTOC.h +++ b/src/insets/InsetTOC.h @@ -17,10 +17,12 @@ namespace lyx { +class Paragraph; +class Toc; /// Used to insert table of contents and similar lists -/// at present, supports only \tableofcontents. Other -/// such commands, such as \listoffigures, are supported +/// at present, supports only \tableofcontents and \listoflistings. +/// Other such commands, such as \listoffigures, are supported /// by InsetFloatList. class InsetTOC : public InsetCommand { public: @@ -32,9 +34,14 @@ public: /// InsetCode lyxCode() const { return TOC_CODE; } /// + docstring layoutName() const; + /// DisplayType display() const { return AlignCenter; } /// - int plaintext(odocstream &, OutputParams const &) const; + virtual void validate(LaTeXFeatures &) const; + /// + int plaintext(odocstringstream & ods, OutputParams const & op, + size_t max_length = INT_MAX) const; /// int docbook(odocstream &, OutputParams const &) const; /// @@ -52,11 +59,17 @@ public: /// static std::string defaultCommand() { return "tableofcontents"; } /// - static bool isCompatibleCommand(std::string const & cmd) - { return cmd == defaultCommand(); } + static bool isCompatibleCommand(std::string const & cmd); //@} private: + /// + void makeTOCWithDepth(XHTMLStream xs, Toc toc, const OutputParams & op) const; + /// + void makeTOCNoDepth(XHTMLStream xs, Toc toc, const OutputParams & op) const; + /// + void makeTOCEntry(XHTMLStream & xs, Paragraph const & par, OutputParams const & op) const; + /// \name Private functions inherited from Inset class //@{ ///