Add list of Marginal Notes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22976 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-13 13:33:56 +00:00
parent 6c14a1c406
commit eb8468994f
4 changed files with 21 additions and 4 deletions

View File

@ -772,6 +772,8 @@ void expandToc(Menu & tomenu, Buffer const * buf)
label = _("List of Indexes");
else if (cit->first == "listing")
label = _("List of Listings");
else if (cit->first == "marginalnote")
label = _("List of Marginal notes");
else if (cit->first == "note")
label = _("List of Notes");
else if (cit->first == "footnote")

View File

@ -227,13 +227,14 @@ docstring GuiToc::guiName(string const & type) const
{
if (type == "tableofcontents")
return _("Table of Contents");
if (type == "footnote")
return _("List of Foot notes");
if (type == "listing")
return _("List of Listings");
if (type == "index")
return _("List of Indexes");
if (type == "marginalnote")
return _("List of Marginal notes");
if (type == "note")
return _("List of Notes");

View File

@ -14,8 +14,10 @@
#include "InsetMarginal.h"
#include "Buffer.h"
#include "support/gettext.h"
#include "OutputParams.h"
#include "TocBackend.h"
#include "support/gettext.h"
#include <ostream>
@ -77,4 +79,14 @@ int InsetMarginal::docbook(Buffer const & buf, odocstream & os,
}
void InsetMarginal::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
{
ParConstIterator pit = par_const_iterator_begin(*this);
Toc & toc = toclist["marginalnote"];
docstring str;
str = getNewLabel(str);
toc.push_back(TocItem(pit, 0, str));
}
} // namespace lyx

View File

@ -41,6 +41,8 @@ public:
OutputParams const & runparams) const;
///
virtual docstring const editMessage() const;
///
void addToToc(TocList &, Buffer const &, ParConstIterator const &) const;
protected:
InsetMarginal(InsetMarginal const &);
private: