X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetindex.h;h=2f4baef458506144adf493181586614d726a7fcc;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=bdad6b47c12342cb4ece4d3598196503eed48834;hpb=188833d864794c9c1ec42a8361b93aaa718874ea;p=lyx.git diff --git a/src/insets/insetindex.h b/src/insets/insetindex.h index bdad6b47c1..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,70 +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); /// - 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() { return new InsetIndex(contents);} + EDITABLE editable() const { return IS_EDITABLE; } /// - void Edit(int, int); + void edit(BufferView *, int, int, unsigned int); /// - unsigned char Editable() const - { - return 1; - } + 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 { +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(int, int) {} + void edit(BufferView *, int, int, unsigned int) {} /// - unsigned char Editable() const{ - return 1; - } + 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