X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetindex.h;h=638825412cce397fb9d05c75d51952896eddf3c6;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=32b0e2a905028e0e1b658ec2853ce52e473de826;hpb=97ef9131ba95f605a48d09595bd2ace0f993a55b;p=lyx.git diff --git a/src/insets/insetindex.h b/src/insets/insetindex.h index 32b0e2a905..638825412c 100644 --- a/src/insets/insetindex.h +++ b/src/insets/insetindex.h @@ -1,74 +1,68 @@ // -*- 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 + * \author Lars Gullik Bjønnes * - * Copyright 1995 Matthias Ettrich - * Copyright 1996-2001 the LyX Team. - * - * ====================================================== */ + * 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" -struct LaTeXFeatures; + +namespace lyx { + +class LaTeXFeatures; /** Used to insert index labels */ class InsetIndex : public InsetCommand { public: /// - InsetIndex(InsetCommandParams const &, bool same_id = false); - /// - virtual Inset * clone(Buffer const &, bool same_id = false) const { - return new InsetIndex(params(), same_id); - } + InsetIndex(InsetCommandParams const &); /// - string const getScreenLabel(Buffer const *) const; + docstring const getScreenLabel(Buffer const &) const; /// EDITABLE editable() const { return IS_EDITABLE; } /// - void edit(BufferView *, int, int, mouse_button::state); - /// - void edit(BufferView * bv, bool front = true); - /// - Inset::Code lyxCode() const; + InsetBase::Code lyxCode() const; /// - int docbook(Buffer const *, std::ostream &) const; + int docbook(Buffer const &, odocstream &, + OutputParams const &) const; +private: + virtual std::auto_ptr doClone() const { + return std::auto_ptr(new InsetIndex(params())); + } }; class InsetPrintIndex : public InsetCommand { public: /// - InsetPrintIndex(InsetCommandParams const &, bool same_id = false); - /// - virtual Inset * clone(Buffer const &, bool same_id = false) const { - return new InsetPrintIndex(params(), same_id); - } + InsetPrintIndex(InsetCommandParams const &); /// Updates needed features for this inset. void validate(LaTeXFeatures & features) const; /// - void edit(BufferView *, int, int, mouse_button::state) {} - /// - void edit(BufferView *, bool = true) {} - /// EDITABLE editable() const { return NOT_EDITABLE; } /// - bool display() const { return true; } - /// - Inset::Code lyxCode() const; + InsetBase::Code lyxCode() const; /// - string const getScreenLabel(Buffer const *) const; + bool display() const { return true; } /// - virtual bool needFullRow() const { return true; } + docstring const getScreenLabel(Buffer const &) const; +private: + virtual std::auto_ptr doClone() const { + return std::auto_ptr(new InsetPrintIndex(params())); + } }; + +} // namespace lyx + #endif