X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetIndex.h;h=44ada403d37eca2e4bb637d60ce6679d0acb156f;hb=06254d11dfdf670fab3548dc2a2674e7a261262c;hp=1fe5da82fb302ad1ac635620074bbc38d5dc08ad;hpb=32871c1284f15265f652ff01c438e539a7c8181f;p=lyx.git diff --git a/src/insets/InsetIndex.h b/src/insets/InsetIndex.h index 1fe5da82fb..44ada403d3 100644 --- a/src/insets/InsetIndex.h +++ b/src/insets/InsetIndex.h @@ -13,6 +13,7 @@ #define INSET_INDEX_H +#include "InsetCollapsable.h" #include "InsetCommand.h" @@ -22,23 +23,28 @@ class LaTeXFeatures; /** Used to insert index labels */ -class InsetIndex : public InsetCommand { +class InsetIndex : public InsetCollapsable { public: /// - InsetIndex(InsetCommandParams const &); + InsetIndex(BufferParams const &); /// - docstring const getScreenLabel(Buffer const &) const; + InsetIndex(InsetIndex const &); /// EDITABLE editable() const { return IS_EDITABLE; } /// - Inset::Code lyxCode() const; + InsetCode lyxCode() const { return INDEX_CODE; } + /// + docstring name() const { return from_ascii("Index"); } + /// + void write(Buffer const & buf, std::ostream & os) const; /// int docbook(Buffer const &, odocstream &, OutputParams const &) const; + /// should paragraph indendation be omitted in any case? + bool neverIndent(Buffer const &) const { return true; } private: - virtual std::auto_ptr doClone() const { - return std::auto_ptr(new InsetIndex(params())); - } + /// + virtual Inset * clone() const; }; @@ -51,14 +57,21 @@ public: /// EDITABLE editable() const { return NOT_EDITABLE; } /// - Inset::Code lyxCode() const; + InsetCode lyxCode() const; /// - bool display() const { return true; } + DisplayType display() const { return AlignCenter; } /// docstring const getScreenLabel(Buffer const &) const; + /// + static CommandInfo const * findInfo(std::string const & cmdName = ""); + /// + static std::string defaultCommand() { return "printindex"; }; + /// + static bool isCompatibleCommand(std::string const & s) + { return s == "printindex"; } private: - virtual std::auto_ptr doClone() const { - return std::auto_ptr(new InsetPrintIndex(params())); + virtual Inset * clone() const { + return new InsetPrintIndex(params()); } };