// -*- 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 (C) 1995 Matthias Ettrich
- * 1996-1998 LyX Team
- *
- *======================================================*/
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
+ */
-#ifndef _INSET_INDEX_H
-#define _INSET_INDEX_H
+#ifndef INSET_INDEX_H
+#define INSET_INDEX_H
-#ifdef __GNUG__
-#pragma interface
-#endif
#include "insetcommand.h"
-class Buffer;
struct LaTeXFeatures;
-// Created by Lgb 970227
-
-
-/** Used to insert index labels
+/** Used to insert index labels
*/
-class InsetIndex: public InsetCommand {
+class InsetIndex : public InsetCommand {
public:
///
- InsetIndex(): InsetCommand("index") {;}
- ///
- InsetIndex(string const & key);
+ InsetIndex(InsetCommandParams const &);
///
~InsetIndex();
///
- Inset *Clone() { return new InsetIndex(contents);}
+ virtual std::auto_ptr<InsetBase> clone() const {
+ return std::auto_ptr<InsetBase>(new InsetIndex(params()));
+ }
///
- void Edit(int, int);
+ dispatch_result localDispatch(FuncRequest const & cmd);
///
- unsigned char Editable() const
- {
- return 1;
- }
+ string const getScreenLabel(Buffer const *) const;
+ ///
+ EDITABLE editable() const { return IS_EDITABLE; }
+ ///
+ InsetOld::Code lyxCode() const;
///
- string getScreenLabel() const;
+ int docbook(Buffer const *, std::ostream &, bool mixcont) const;
};
-class InsetPrintIndex: public InsetCommand {
+class InsetPrintIndex : public InsetCommand {
public:
///
- InsetPrintIndex();
- ///
- InsetPrintIndex(Buffer*);
+ InsetPrintIndex(InsetCommandParams const &);
///
~InsetPrintIndex();
- /// Updates needed features for this inset.
- void Validate(LaTeXFeatures &features) const;
///
- void Edit(int, int){;}
- ///
- unsigned char Editable() const{
- return 1;
+ virtual std::auto_ptr<InsetBase> clone() const {
+ return std::auto_ptr<InsetBase>(new InsetPrintIndex(params()));
}
///
- bool Display() const { return true; }
+ //dispatch_result localDispatch(FuncRequest const & cmd);
+ /// Updates needed features for this inset.
+ void validate(LaTeXFeatures & features) const;
+ ///
+ EDITABLE editable() const { return NOT_EDITABLE; }
///
- Inset::Code LyxCode() const;
+ bool display() const { return true; }
///
- string getScreenLabel() const;
-private:
+ InsetOld::Code lyxCode() const;
///
- Buffer *owner;
-};
-
-// 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;
- void *vdata;
- long ldata;
+ string const getScreenLabel(Buffer const *) const;
+ ///
+ virtual bool needFullRow() const { return true; }
};
-extern FD_index_form *index_form;
#endif