]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.h
Move isMultiCell() to Cursor, and use it.
[lyx.git] / src / insets / InsetIndex.h
index 8ffab82b9c8ac77a73a56e00790abf05ed01cd19..092311c64c269254bbc3fd009dab54d39f6a1c32 100644 (file)
 
 namespace lyx {
 
-class LaTeXFeatures;
-
 /** Used to insert index labels
   */
 class InsetIndex : public InsetCollapsable {
 public:
        ///
-       InsetIndex(BufferParams const &);
-       ///
-       InsetIndex(InsetIndex const &);
+       InsetIndex(Buffer const &);
+private:
        ///
-       EDITABLE editable() const { return IS_EDITABLE; }
+       EDITABLE editable() const { return HIGHLY_EDITABLE; }
        ///
        InsetCode lyxCode() const { return INDEX_CODE; }
        ///
-       ///
-       void metrics(MetricsInfo &, Dimension &) const;
-       ///
-       void draw(PainterInfo &, int, int) const;
-       ///
        docstring name() const { return from_ascii("Index"); }
        ///
-       void getDrawFont(FontInfo &) const;
+       void write(std::ostream & os) const;
        ///
-       void write(Buffer const & buf, std::ostream & os) const;
+       int docbook(odocstream &, OutputParams const &) const;
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       int latex(odocstream &, OutputParams const &) const;
        /// should paragraph indendation be omitted in any case?
-       bool neverIndent(Buffer const &) const { return true; }
-private:
+       bool neverIndent() const { return true; }
        ///
-       bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+       void addToToc(DocIterator const &);
        ///
-       virtual Inset * clone() const;
+       Inset * clone() const { return new InsetIndex(*this); }
 };
 
 
@@ -61,6 +51,15 @@ class InsetPrintIndex : public InsetCommand {
 public:
        ///
        InsetPrintIndex(InsetCommandParams const &);
+
+       ///
+       static ParamInfo const & findInfo(std::string const &);
+       ///
+       static std::string defaultCommand() { return "printindex"; };
+       ///
+       static bool isCompatibleCommand(std::string const & s) 
+               { return s == "printindex"; }
+private:
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const;
        ///
@@ -70,18 +69,9 @@ public:
        ///
        DisplayType display() const { return AlignCenter; }
        ///
-       docstring const getScreenLabel(Buffer const &) const;
-       ///
-       static CommandInfo const * findInfo(std::string const & cmdName = "");
+       docstring screenLabel() const;
        ///
-       static std::string defaultCommand() { return "printindex"; };
-       ///
-       static bool isCompatibleCommand(std::string const & s) 
-               { return s == "printindex"; }
-private:
-       virtual Inset * clone() const {
-               return new InsetPrintIndex(params());
-       }
+       Inset * clone() const { return new InsetPrintIndex(*this); }
 };