X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetindex.h;h=cb90a519cae83241b5465b00d7facbad1cba4bfe;hb=744c4025902c509fca665ec26a0d9280a7645efd;hp=25e2c89d6ac826eb8acfcc6b7c08d6bec020612a;hpb=474b65cd25930b5745dc7aca27f346cd5766ddd9;p=lyx.git diff --git a/src/insets/insetindex.h b/src/insets/insetindex.h index 25e2c89d6a..cb90a519ca 100644 --- a/src/insets/insetindex.h +++ b/src/insets/insetindex.h @@ -1,89 +1,74 @@ // -*- 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-2000 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 - - -/** Used to insert index labels +/** Used to insert index labels */ -class InsetIndex: public InsetCommand { +class InsetIndex : public InsetCommand { public: /// - InsetIndex() : InsetCommand("index") {} - /// - explicit - InsetIndex(string const & key); + InsetIndex(InsetCommandParams const &); /// ~InsetIndex(); /// - Inset * Clone() const { return new InsetIndex(getContents());} + virtual std::auto_ptr clone() const { + return std::auto_ptr(new InsetIndex(params())); + } + /// + dispatch_result localDispatch(FuncRequest const & cmd); /// - void Edit(BufferView *, int, int, unsigned int); + string const getScreenLabel(Buffer const *) const; /// - EDITABLE Editable() const - { - return IS_EDITABLE; - } + EDITABLE editable() const { return IS_EDITABLE; } /// - string getScreenLabel() const; + InsetOld::Code lyxCode() const; + /// + int docbook(Buffer const *, std::ostream &, bool mixcont) const; }; class InsetPrintIndex : public InsetCommand { public: /// - InsetPrintIndex(); - /// - InsetPrintIndex(Buffer *); + InsetPrintIndex(InsetCommandParams const &); /// ~InsetPrintIndex(); + /// + virtual std::auto_ptr clone() const { + return std::auto_ptr(new InsetPrintIndex(params())); + } + /// + //dispatch_result localDispatch(FuncRequest const & cmd); /// Updates needed features for this inset. - void Validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const; /// - void Edit(BufferView *, int, int, unsigned int) {} + EDITABLE editable() const { return NOT_EDITABLE; } /// - EDITABLE Editable() const{ - return IS_EDITABLE; - } - /// WHY is clone missing? (Lgb) + InsetOld::Code lyxCode() const; /// - bool display() const { return true; } + string const getScreenLabel(Buffer const *) const; /// - Inset::Code LyxCode() const; + void metrics(MetricsInfo &, Dimension &) const; /// - string getScreenLabel() const; + void draw(PainterInfo & pi, int x, int y) const; private: /// - 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; + mutable unsigned int center_indent_; }; -extern FD_index_form * index_form; #endif