]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.h
* src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
[lyx.git] / src / insets / InsetIndex.h
index cca959a106612e9df34f219f8ed18cade68140ce..3e60130d0df55745258c5ceb77d3f12211a01b62 100644 (file)
@@ -13,6 +13,7 @@
 #define INSET_INDEX_H
 
 
+#include "InsetCollapsable.h"
 #include "InsetCommand.h"
 
 
@@ -22,23 +23,38 @@ 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;
        ///
+       ///
+       void metrics(MetricsInfo &, Dimension &) const;
+       ///
+       void draw(PainterInfo &, int, int) const;
+       ///
+       docstring name() const { return from_ascii("Index"); }
+       ///
+       void getDrawFont(Font &) const;
+       ///
+       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<Inset> doClone() const {
-               return std::auto_ptr<Inset>(new InsetIndex(params()));
-       }
+       ///
+       bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+       ///
+       virtual Inset * clone() const;
 };
 
 
@@ -57,8 +73,8 @@ public:
        ///
        docstring const getScreenLabel(Buffer const &) const;
 private:
-       virtual std::auto_ptr<Inset> doClone() const {
-               return std::auto_ptr<Inset>(new InsetPrintIndex(params()));
+       virtual Inset * clone() const {
+               return new InsetPrintIndex(params());
        }
 };