]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetindex.h
remove remaining needFullRow()
[lyx.git] / src / insets / insetindex.h
index 27bd984bb62f1998574e470f52fbf75c0ad9f208..cb90a519cae83241b5465b00d7facbad1cba4bfe 100644 (file)
@@ -6,7 +6,7 @@
  *
  * \author Lars Gullik Bjønnes
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef INSET_INDEX_H
@@ -24,25 +24,19 @@ public:
        ///
        InsetIndex(InsetCommandParams const &);
        ///
-       //InsetIndex(InsetCommandParams const &, bool same_id);
-       ///
        ~InsetIndex();
        ///
-       virtual Inset * clone(Buffer const &) const {
-               return new InsetIndex(params());
+       virtual std::auto_ptr<InsetBase> clone() const {
+               return std::auto_ptr<InsetBase>(new InsetIndex(params()));
        }
        ///
-       //virtual Inset * clone(Buffer const &, bool same_id) const {
-       //      return new InsetIndex(params(), same_id);
-       //}
-       ///
        dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        string const getScreenLabel(Buffer const *) const;
        ///
        EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       Inset::Code lyxCode() const;
+       InsetOld::Code lyxCode() const;
        ///
        int docbook(Buffer const *, std::ostream &, bool mixcont) const;
 };
@@ -53,31 +47,28 @@ public:
        ///
        InsetPrintIndex(InsetCommandParams const &);
        ///
-       //InsetPrintIndex(InsetCommandParams const &, bool same_id);
-       ///
        ~InsetPrintIndex();
        ///
-       Inset * clone(Buffer const &) const {
-               return new InsetPrintIndex(params());
+       virtual std::auto_ptr<InsetBase> clone() const {
+               return std::auto_ptr<InsetBase>(new InsetPrintIndex(params()));
        }
        ///
-       //Inset * clone(Buffer const &, bool same_id) const {
-       //      return new InsetPrintIndex(params(), same_id);
-       //}
-       ///
        //dispatch_result localDispatch(FuncRequest const & cmd);
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const;
        ///
        EDITABLE editable() const { return NOT_EDITABLE; }
        ///
-       bool display() const { return true; }
-       ///
-       Inset::Code lyxCode() const;
+       InsetOld::Code lyxCode() const;
        ///
        string const getScreenLabel(Buffer const *) const;
        ///
-       virtual bool needFullRow() const { return true; }
+       void metrics(MetricsInfo &, Dimension &) const; 
+       ///
+       void draw(PainterInfo & pi, int x, int y) const;
+private:
+       ///
+       mutable unsigned int center_indent_;
 };
 
 #endif