mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 22:41:09 +00:00
5d6963b0ca
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15444 a592a061-630c-0410-9148-cb99ea01b6c8
92 lines
1.6 KiB
C
92 lines
1.6 KiB
C
/**
|
|
* \file insetindex.C
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Lars Gullik Bjønnes
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
#include <config.h>
|
|
|
|
#include "insetindex.h"
|
|
|
|
#include "dispatchresult.h"
|
|
#include "funcrequest.h"
|
|
#include "gettext.h"
|
|
#include "LaTeXFeatures.h"
|
|
#include "metricsinfo.h"
|
|
#include "sgml.h"
|
|
|
|
#include "support/std_ostream.h"
|
|
|
|
|
|
namespace lyx {
|
|
|
|
using std::string;
|
|
using std::ostream;
|
|
|
|
|
|
InsetIndex::InsetIndex(InsetCommandParams const & p)
|
|
: InsetCommand(p, "index")
|
|
{}
|
|
|
|
|
|
// InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
|
|
// : InsetCommand(p, false)
|
|
// {}
|
|
|
|
|
|
docstring const InsetIndex::getScreenLabel(Buffer const &) const
|
|
{
|
|
return _("Idx");
|
|
}
|
|
|
|
|
|
int InsetIndex::docbook(Buffer const &, odocstream & os,
|
|
OutputParams const &) const
|
|
{
|
|
os << "<indexterm><primary>"
|
|
<< sgml::escapeString(getParam("name"))
|
|
<< "</primary></indexterm>";
|
|
return 0;
|
|
}
|
|
|
|
|
|
InsetBase::Code InsetIndex::lyxCode() const
|
|
{
|
|
return InsetBase::INDEX_CODE;
|
|
}
|
|
|
|
|
|
|
|
InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
|
|
: InsetCommand(p, string())
|
|
{}
|
|
|
|
|
|
// InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
|
|
// : InsetCommand(p, false)
|
|
// {}
|
|
|
|
|
|
docstring const InsetPrintIndex::getScreenLabel(Buffer const &) const
|
|
{
|
|
return _("Index");
|
|
}
|
|
|
|
|
|
void InsetPrintIndex::validate(LaTeXFeatures & features) const
|
|
{
|
|
features.require("makeidx");
|
|
}
|
|
|
|
|
|
InsetBase::Code InsetPrintIndex::lyxCode() const
|
|
{
|
|
return InsetBase::INDEX_PRINT_CODE;
|
|
}
|
|
|
|
|
|
} // namespace lyx
|