2006-11-04 17:55:36 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
|
* \file InsetNomencl.h
|
2006-11-04 17:55:36 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
* \author O. U. Baran
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef INSET_NOMENCL_H
|
|
|
|
|
#define INSET_NOMENCL_H
|
|
|
|
|
|
|
|
|
|
|
2007-04-25 01:24:38 +00:00
|
|
|
|
#include "InsetCommand.h"
|
2006-11-04 17:55:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
|
class LaTeXFeatures;
|
|
|
|
|
|
2007-04-29 22:21:00 +00:00
|
|
|
|
/** Used to insert nomenclature entries
|
2006-11-04 17:55:36 +00:00
|
|
|
|
*/
|
|
|
|
|
class InsetNomencl : public InsetCommand {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
InsetNomencl(InsetCommandParams const &);
|
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
docstring screenLabel() const;
|
2006-11-04 17:55:36 +00:00
|
|
|
|
///
|
2008-08-23 15:02:44 +00:00
|
|
|
|
docstring toolTip(BufferView const & bv, int x, int y) const;
|
|
|
|
|
///
|
2006-11-04 17:55:36 +00:00
|
|
|
|
EDITABLE editable() const { return IS_EDITABLE; }
|
|
|
|
|
/// Updates needed features for this inset.
|
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
|
|
|
|
///
|
2007-10-16 16:48:21 +00:00
|
|
|
|
InsetCode lyxCode() const { return NOMENCL_CODE; }
|
2006-11-04 17:55:36 +00:00
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
2006-11-10 15:45:42 +00:00
|
|
|
|
///
|
|
|
|
|
int docbookGlossary(odocstream &) const;
|
2007-10-25 04:13:56 +00:00
|
|
|
|
///
|
2008-02-23 22:01:02 +00:00
|
|
|
|
static ParamInfo const & findInfo(std::string const &);
|
2007-10-25 04:13:56 +00:00
|
|
|
|
///
|
|
|
|
|
static std::string defaultCommand() { return "nomenclature"; };
|
|
|
|
|
///
|
|
|
|
|
static bool isCompatibleCommand(std::string const & s)
|
|
|
|
|
{ return s == "nomenclature"; }
|
2006-11-04 17:55:36 +00:00
|
|
|
|
private:
|
2008-02-29 20:17:28 +00:00
|
|
|
|
Inset * clone() const { return new InsetNomencl(*this); }
|
2007-04-29 22:21:00 +00:00
|
|
|
|
/// unique id for this nomenclature entry for docbook export
|
|
|
|
|
docstring nomenclature_entry_id;
|
2006-11-04 17:55:36 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class InsetPrintNomencl : public InsetCommand {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
InsetPrintNomencl(InsetCommandParams const &);
|
|
|
|
|
/// Updates needed features for this inset.
|
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
|
|
|
|
// FIXME: This should be editable to set the label width (stored
|
|
|
|
|
// in params_["labelwidth"]).
|
|
|
|
|
// Currently the width can be read from file and written, but not
|
|
|
|
|
// changed.
|
|
|
|
|
///
|
|
|
|
|
EDITABLE editable() const { return NOT_EDITABLE; }
|
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
2006-11-04 17:55:36 +00:00
|
|
|
|
///
|
2007-10-13 09:04:52 +00:00
|
|
|
|
InsetCode lyxCode() const;
|
2006-11-04 17:55:36 +00:00
|
|
|
|
///
|
2007-05-18 14:32:29 +00:00
|
|
|
|
DisplayType display() const { return AlignCenter; }
|
2006-11-04 17:55:36 +00:00
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
|
docstring screenLabel() const;
|
2007-10-25 04:13:56 +00:00
|
|
|
|
///
|
2008-02-23 22:01:02 +00:00
|
|
|
|
static ParamInfo const & findInfo(std::string const &);
|
2007-10-25 04:13:56 +00:00
|
|
|
|
///
|
|
|
|
|
static std::string defaultCommand() { return "printnomenclature"; };
|
|
|
|
|
///
|
|
|
|
|
static bool isCompatibleCommand(std::string const & s)
|
|
|
|
|
{ return s == "printnomenclature"; }
|
2006-11-04 17:55:36 +00:00
|
|
|
|
private:
|
2008-02-29 20:17:28 +00:00
|
|
|
|
Inset * clone() const { return new InsetPrintNomencl(*this); }
|
2006-11-04 17:55:36 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
|
|
#endif
|