X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsettoc.h;h=73bf1b67d32972a0109c97fc63a5c3f7988e4314;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=a7c30389d9e6ae39be6980cf2f821dc44cac056c;hpb=87ca6fbbeb83fa95310789e6d692e43cbfcdb6f5;p=lyx.git diff --git a/src/insets/insettoc.h b/src/insets/insettoc.h index a7c30389d9..73bf1b67d3 100644 --- a/src/insets/insettoc.h +++ b/src/insets/insettoc.h @@ -12,45 +12,36 @@ #ifndef INSET_TOC_H #define INSET_TOC_H - #include "insetcommand.h" -class MetricsInfo; +namespace lyx { -/** Used to insert table of contents - */ + +/// Used to insert table of contents and similar lists class InsetTOC : public InsetCommand { public: /// - InsetTOC(InsetCommandParams const &); - /// - ~InsetTOC(); - /// - virtual std::auto_ptr clone() const { - return std::auto_ptr(new InsetTOC(params())); - } + explicit InsetTOC(InsetCommandParams const &); /// - void metrics(MetricsInfo &, Dimension &) const; - /// - void draw(PainterInfo & pi, int x, int y) const; - /// - std::string const getScreenLabel(Buffer const &) const; + docstring const getScreenLabel(Buffer const &) const; /// EDITABLE editable() const { return IS_EDITABLE; } /// - InsetOld::Code lyxCode() const; - /// - int ascii(Buffer const &, std::ostream &, int linelen) const; + InsetBase::Code lyxCode() const; /// - int linuxdoc(Buffer const &, std::ostream &) const; + bool display() const { return true; } /// - int docbook(Buffer const &, std::ostream &, bool mixcont) const; -protected: + int plaintext(Buffer const &, odocstream &, + OutputParams const &) const; /// - virtual - dispatch_result - priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &); + int docbook(Buffer const &, odocstream &, + OutputParams const &) const; +private: + virtual std::auto_ptr doClone() const; }; + +} // namespace lyx + #endif