]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetindex.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetindex.h
index bf1d327c8f62b8fa1337625e99e4ec3d1bc1804e..638825412cce397fb9d05c75d51952896eddf3c6 100644 (file)
@@ -1,87 +1,68 @@
 // -*- C++ -*-
-/* This file is part of*
- * ====================================================== 
+/**
+ * \file insetindex.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
- *      
- *         Copyright 1995 Matthias Ettrich
- *          Copyright 1996-1999 the LyX Team.
- * 
- * ====================================================== */
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS.
+ */
 
 #ifndef INSET_INDEX_H
 #define INSET_INDEX_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "insetcommand.h"
 
-class Buffer;
-struct LaTeXFeatures;
 
-// Created by Lgb 970227
+namespace lyx {
 
+class LaTeXFeatures;
 
-/** Used to insert index labels  
+/** Used to insert index labels
   */
-class InsetIndex: public InsetCommand {
+class InsetIndex : public InsetCommand {
 public:
        ///
-       InsetIndex(): InsetCommand("index") {;}
+       InsetIndex(InsetCommandParams const &);
        ///
-       InsetIndex(string const & key);
+       docstring const getScreenLabel(Buffer const &) const;
        ///
-       ~InsetIndex();
+       EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       InsetIndex * Clone() const { return new InsetIndex(contents);}
+       InsetBase::Code lyxCode() const;
        ///
-       void Edit(int, int);
-       ///
-       unsigned char Editable() const
-       {
-               return 1;
+       int docbook(Buffer const &, odocstream &,
+                   OutputParams const &) const;
+private:
+       virtual std::auto_ptr<InsetBase> doClone() const {
+               return std::auto_ptr<InsetBase>(new InsetIndex(params()));
        }
-       ///
-       string getScreenLabel() const;
 };
 
 
-class InsetPrintIndex: public InsetCommand {
+class InsetPrintIndex : public InsetCommand {
 public:
        ///
-       InsetPrintIndex();
-       ///
-       InsetPrintIndex(Buffer *);
-       ///
-       ~InsetPrintIndex();
+       InsetPrintIndex(InsetCommandParams const &);
        /// Updates needed features for this inset.
-       void Validate(LaTeXFeatures & features) const;
+       void validate(LaTeXFeatures & features) const;
        ///
-       void Edit(int, int) {}
+       EDITABLE editable() const { return NOT_EDITABLE; }
        ///
-       unsigned char Editable() const{
-               return 1;
-       }
+       InsetBase::Code lyxCode() const;
        ///
        bool display() const { return true; }
        ///
-       Inset::Code LyxCode() const;
-       ///
-       string getScreenLabel() const;
+       docstring const getScreenLabel(Buffer const &) const;
 private:
-       ///
-       Buffer * owner;
+       virtual std::auto_ptr<InsetBase> doClone() const {
+               return std::auto_ptr<InsetBase>(new InsetPrintIndex(params()));
+       }
 };
 
-// this was shifted here rather than a separate
-// file because its little and only need by
-// insetindex.C and lyx_gui_misc.C ARRae 981020
-struct FD_index_form {
-       FL_FORM * index_form;
-       FL_OBJECT * key;
-};
 
-extern FD_index_form * index_form;
+} // namespace lyx
+
 #endif