// -*- C++ -*-
/* This file is part of*
- * ======================================================
+ * ======================================================
*
* LyX, The Document Processor
- *
+ *
* Copyright 1995 Matthias Ettrich
- * Copyright 1996-2000 the LyX Team.
- *
+ * Copyright 1996-2001 the LyX Team.
+ *
* ====================================================== */
#ifndef INSET_INDEX_H
#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(InsetCommandParams const &, bool same_id = false);
///
- explicit
- InsetIndex(string const & key);
+ virtual Inset * clone(Buffer const &, bool same_id = false) const {
+ return new InsetIndex(params(), same_id);
+ }
///
- ~InsetIndex();
+ string const getScreenLabel(Buffer const *) const;
///
- Inset * Clone() const { return new InsetIndex(contents);}
+ EDITABLE editable() const { return IS_EDITABLE; }
///
- void Edit(BufferView *, int, int, unsigned int);
+ void edit(BufferView *, int, int, unsigned int);
///
- EDITABLE Editable() const
- {
- return IS_EDITABLE;
- }
+ void edit(BufferView * bv, bool front = true);
+ ///
+ Inset::Code lyxCode() const;
///
- string getScreenLabel() const;
+ int docbook(Buffer const *, std::ostream &) const;
};
class InsetPrintIndex : public InsetCommand {
public:
///
- InsetPrintIndex();
+ InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
///
- InsetPrintIndex(Buffer *);
- ///
- ~InsetPrintIndex();
+ virtual Inset * clone(Buffer const &, bool same_id = false) const {
+ return new InsetPrintIndex(params(), same_id);
+ }
/// Updates needed features for this inset.
- void Validate(LaTeXFeatures & features) const;
+ void validate(LaTeXFeatures & features) const;
///
- void Edit(BufferView *, int, int, unsigned int) {}
+ void edit(BufferView *, int, int, unsigned int) {}
///
- EDITABLE Editable() const{
- return IS_EDITABLE;
- }
- /// WHY is clone missing? (Lgb)
+ void edit(BufferView *, bool = true) {}
///
- bool display() const { return true; }
+ EDITABLE editable() const{ return NOT_EDITABLE; }
///
- Inset::Code LyxCode() const;
+ bool display() const { return true; }
///
- string getScreenLabel() const;
-private:
+ Inset::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;
+ string const getScreenLabel(Buffer const *) const;
};
-extern FD_index_form * index_form;
#endif