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
|
|
|
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2010-10-27 21:35:13 +00:00
|
|
|
int docbookGlossary(odocstream &) const;
|
|
|
|
|
|
|
|
/// \name Public functions inherited from Inset class
|
|
|
|
//@{
|
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;
|
|
|
|
///
|
2009-04-22 20:55:13 +00:00
|
|
|
bool hasSettings() const { return true; }
|
2006-11-04 17:55:36 +00:00
|
|
|
/// Updates needed features for this inset.
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
|
|
|
///
|
2015-09-27 06:05:00 +00:00
|
|
|
void addToToc(DocIterator const & di, bool output_active,
|
2017-01-13 10:06:48 +00:00
|
|
|
UpdateType utype, TocBackend & backend) const;
|
2013-03-27 22:40:08 +00:00
|
|
|
///
|
2007-10-16 16:48:21 +00:00
|
|
|
InsetCode lyxCode() const { 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,
|
|
|
|
size_t max_length = INT_MAX) const;
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
2009-06-12 16:11:33 +00:00
|
|
|
/// Does nothing at the moment.
|
2009-11-21 23:29:29 +00:00
|
|
|
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
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
|
|
|
|
//@{
|
|
|
|
///
|
2008-02-29 20:17:28 +00:00
|
|
|
Inset * clone() const { return new InsetNomencl(*this); }
|
2010-10-27 21:35:13 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/// \name Private functions inherited from InsetCommand class
|
|
|
|
//@{
|
|
|
|
///
|
|
|
|
docstring screenLabel() const;
|
|
|
|
//@}
|
|
|
|
|
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.
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
|
|
|
///
|
2008-02-27 20:43:16 +00:00
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
2017-07-03 17:45:58 +00:00
|
|
|
///
|
2009-11-21 23:29:29 +00:00
|
|
|
docstring xhtml(XHTMLStream &, 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
|
|
|
///
|
2009-05-22 16:26:15 +00:00
|
|
|
bool hasSettings() const { return true; }
|
|
|
|
///
|
2007-05-18 14:32:29 +00:00
|
|
|
DisplayType display() const { return AlignCenter; }
|
2006-11-04 17:55:36 +00:00
|
|
|
///
|
2011-02-10 20:02:48 +00:00
|
|
|
void latex(otexstream &, OutputParams const &) const;
|
2010-10-27 21:35:13 +00:00
|
|
|
///
|
2011-10-29 14:48:55 +00:00
|
|
|
std::string contextMenuName() const;
|
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
|
|
|
///
|
2010-10-27 21:35:13 +00:00
|
|
|
Inset * clone() const { return new InsetPrintNomencl(*this); }
|
2009-05-22 16:26:15 +00:00
|
|
|
///
|
2010-10-27 21:35:13 +00:00
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
|
2009-05-22 16:26:15 +00:00
|
|
|
///
|
|
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
2013-03-27 23:30:30 +00:00
|
|
|
///
|
|
|
|
docstring layoutName() const { 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
|
|
|
///
|
2010-10-27 21:35:13 +00:00
|
|
|
docstring screenLabel() const;
|
|
|
|
//@}
|
2006-11-04 17:55:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif
|