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.
|
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author Lars Gullik Bjønnes
|
2006-11-04 17:55:36 +00:00
|
|
|
* \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:
|
|
|
|
///
|
2009-11-08 16:10:34 +00:00
|
|
|
InsetNomencl(Buffer * buf, InsetCommandParams const &);
|
2010-10-27 21:35:13 +00:00
|
|
|
|
|
|
|
/// \name Public functions inherited from Inset class
|
|
|
|
//@{
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
docstring toolTip(BufferView const & bv, int x, int y) const override;
|
2008-08-23 15:02:44 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
bool hasSettings() const override { return true; }
|
2006-11-04 17:55:36 +00:00
|
|
|
/// Updates needed features for this inset.
|
2020-10-01 07:42:11 +00:00
|
|
|
void validate(LaTeXFeatures & features) const override;
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2015-09-27 06:05:00 +00:00
|
|
|
void addToToc(DocIterator const & di, bool output_active,
|
2020-10-01 07:42:11 +00:00
|
|
|
UpdateType utype, TocBackend & backend) const override;
|
2013-03-27 22:40:08 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
InsetCode lyxCode() const override { return NOMENCL_CODE; }
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2016-10-29 10:32:51 +00:00
|
|
|
int plaintext(odocstringstream & ods, OutputParams const & op,
|
2020-10-01 07:42:11 +00:00
|
|
|
size_t max_length = INT_MAX) const override;
|
2016-10-29 10:32:51 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void docbook(XMLStream &, OutputParams const &) const override;
|
2009-06-12 16:11:33 +00:00
|
|
|
/// Does nothing at the moment.
|
2020-10-01 07:42:11 +00:00
|
|
|
docstring xhtml(XMLStream &, OutputParams const &) const override;
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/// \name Static public methods obligated for InsetCommand derived classes
|
|
|
|
//@{
|
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
|
|
|
///
|
2013-05-12 11:00:02 +00:00
|
|
|
static std::string defaultCommand() { return "nomenclature"; }
|
2007-10-25 04:13:56 +00:00
|
|
|
///
|
2017-07-03 17:45:58 +00:00
|
|
|
static bool isCompatibleCommand(std::string const & s)
|
2007-10-25 04:13:56 +00:00
|
|
|
{ return s == "nomenclature"; }
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
|
|
|
|
2006-11-04 17:55:36 +00:00
|
|
|
private:
|
2010-10-27 21:35:13 +00:00
|
|
|
/// \name Private functions inherited from Inset class
|
|
|
|
//@{
|
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
Inset * clone() const override { return new InsetNomencl(*this); }
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/// \name Private functions inherited from InsetCommand class
|
|
|
|
//@{
|
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
docstring screenLabel() const override;
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
|
|
|
|
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:
|
|
|
|
///
|
2009-11-08 16:10:34 +00:00
|
|
|
InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
|
2010-10-27 21:35:13 +00:00
|
|
|
|
|
|
|
/// \name Public functions inherited from Inset class
|
|
|
|
//@{
|
2006-11-04 17:55:36 +00:00
|
|
|
/// Updates needed features for this inset.
|
2020-10-01 07:42:11 +00:00
|
|
|
void validate(LaTeXFeatures & features) const override;
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void docbook(XMLStream &, OutputParams const &) const override;
|
2017-07-03 17:45:58 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
docstring xhtml(XMLStream &, OutputParams const &) const override;
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
InsetCode lyxCode() const override;
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
bool hasSettings() const override { return true; }
|
2009-05-22 16:26:15 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
RowFlags rowFlags() const override { return Display; }
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void latex(otexstream &, OutputParams const &) const override;
|
2010-10-27 21:35:13 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
std::string contextMenuName() const override;
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/// \name Static public methods obligated for InsetCommand derived classes
|
|
|
|
//@{
|
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
|
|
|
///
|
2013-05-12 11:00:02 +00:00
|
|
|
static std::string defaultCommand() { return "printnomenclature"; }
|
2007-10-25 04:13:56 +00:00
|
|
|
///
|
2017-07-03 17:45:58 +00:00
|
|
|
static bool isCompatibleCommand(std::string const & s)
|
2007-10-25 04:13:56 +00:00
|
|
|
{ return s == "printnomenclature"; }
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// \name Private functions inherited from Inset class
|
|
|
|
//@{
|
2009-05-21 19:33:09 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
Inset * clone() const override { return new InsetPrintNomencl(*this); }
|
2009-05-22 16:26:15 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override;
|
2009-05-22 16:26:15 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
|
2013-03-27 23:30:30 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
docstring layoutName() const override { return from_ascii("PrintNomencl"); }
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/// \name Private functions inherited from InsetCommand class
|
|
|
|
//@{
|
2009-05-22 16:26:15 +00:00
|
|
|
///
|
2020-10-01 07:42:11 +00:00
|
|
|
docstring screenLabel() const override;
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
2006-11-04 17:55:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif
|