X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetindex.h;h=638825412cce397fb9d05c75d51952896eddf3c6;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=50a2e4cf20cd0dbf3a9f0237df64c461b83a04b7;hpb=8ed9dbabde30b31a6a14e032fa42f682a196ef7a;p=lyx.git diff --git a/src/insets/insetindex.h b/src/insets/insetindex.h index 50a2e4cf20..638825412c 100644 --- a/src/insets/insetindex.h +++ b/src/insets/insetindex.h @@ -1,104 +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 - * - * 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; -struct FD_index_form; -// Created by Lgb 970227 +namespace lyx { +class LaTeXFeatures; -/** Used to insert index labels +/** Used to insert index labels */ class InsetIndex : public InsetCommand { public: /// - InsetIndex() : InsetCommand("index") {} - /// - explicit - InsetIndex(string const & key); + InsetIndex(InsetCommandParams const &); /// - ~InsetIndex(); + docstring const getScreenLabel(Buffer const &) const; /// - Inset * Clone() const { return new InsetIndex(getContents());} + EDITABLE editable() const { return IS_EDITABLE; } /// - void Edit(BufferView *, int, int, unsigned int); + InsetBase::Code lyxCode() const; /// - EDITABLE Editable() const - { - return IS_EDITABLE; + int docbook(Buffer const &, odocstream &, + OutputParams const &) const; +private: + virtual std::auto_ptr doClone() const { + return std::auto_ptr(new InsetIndex(params())); } - /// - string getScreenLabel() const; - /// - void callback( FD_index_form *, long ); - /// - struct Holder { - InsetIndex * inset; - BufferView * view; - }; - private: - /// - Holder holder; }; class InsetPrintIndex : public InsetCommand { public: -#if 0 - /// - InsetPrintIndex(); -#endif - /// - InsetPrintIndex(Buffer *); -#if 0 /// - ~InsetPrintIndex(); -#endif + InsetPrintIndex(InsetCommandParams const &); /// 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) + InsetBase::Code lyxCode() const; /// bool display() const { return true; } /// - Inset::Code LyxCode() const; - /// - string getScreenLabel() const; + docstring const getScreenLabel(Buffer const &) const; private: - /// - Buffer * owner; + virtual std::auto_ptr doClone() const { + return std::auto_ptr(new InsetPrintIndex(params())); + } }; -// 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; -}; -extern FD_index_form * index_form; +} // namespace lyx + #endif