X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetindex.h;h=2f4baef458506144adf493181586614d726a7fcc;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=b4905bf0b06950ecd14e9016be271f4d5b08a0db;hpb=d6fa7c567c47f1af95f026174a83bf75dde08f84;p=lyx.git diff --git a/src/insets/insetindex.h b/src/insets/insetindex.h index b4905bf0b0..2f4baef458 100644 --- a/src/insets/insetindex.h +++ b/src/insets/insetindex.h @@ -5,7 +5,7 @@ * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1996-1999 the LyX Team. + * Copyright 1996-2001 the LyX Team. * * ====================================================== */ @@ -18,71 +18,55 @@ #include "insetcommand.h" -class Buffer; struct LaTeXFeatures; -// Created by Lgb 970227 - - /** Used to insert index labels */ -class InsetIndex: public InsetCommand { +class InsetIndex : public InsetCommand { public: /// - InsetIndex() : InsetCommand("index") {} + InsetIndex(InsetCommandParams const &, bool same_id = false); + /// + virtual Inset * clone(Buffer const &, bool same_id = false) const { + return new InsetIndex(params(), same_id); + } /// - InsetIndex(string const & key); + string const getScreenLabel(Buffer const *) const; /// - ~InsetIndex(); + EDITABLE editable() const { return IS_EDITABLE; } /// - Inset * Clone() const { return new InsetIndex(contents);} + void edit(BufferView *, int, int, unsigned int); /// - void Edit(BufferView *, int, int, unsigned int); + void edit(BufferView * bv, bool front = true); /// - unsigned char Editable() const - { - return 1; - } + Inset::Code lyxCode() const; /// - string getScreenLabel() const; + int docbook(Buffer const *, std::ostream &) const; }; class InsetPrintIndex : public InsetCommand { public: /// - InsetPrintIndex(); - /// - InsetPrintIndex(Buffer *); + InsetPrintIndex(InsetCommandParams const &, bool same_id = false); /// - ~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) {} /// - unsigned char Editable() const{ - return 1; - } - /// 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