label = _("List of Notes");
else if (cit->first == "footnote")
label = _("List of Foot notes");
+ else if (cit->first == "label")
+ label = _("Labels and References");
// this should not happen now, but if something else like
// listings is added later, this can avoid an empty menu name.
else
return _("List of Marginal notes");
if (type == "note")
return _("List of Notes");
+ if (type == "label")
+ return _("Labels and References");
FloatList const & floats = buffer().params().textClass().floats();
if (floats.typeExist(type))
#include "BufferView.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
-#include "Text.h"
+#include "ParIterator.h"
#include "sgml.h"
+#include "Text.h"
+#include "TocBackend.h"
#include "support/lstrings.h"
#include "support/lyxalgo.h"
}
+void InsetLabel::addToToc(Buffer const & buf,
+ ParConstIterator const & cpit) const
+{
+ ParConstIterator pit = cpit;
+ pit.push_back(*this);
+
+ //FIXME: It would be really, really, really nice if we could
+ // construct a tree here with all the cross-reference to this
+ // label.
+
+ Toc & toc = buf.tocBackend().toc("label");
+ toc.push_back(TocItem(pit, 0, getScreenLabel(buf)));
+}
+
+
void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
///
static bool isCompatibleCommand(std::string const & s)
{ return s == "label"; }
+ ///
+ void addToToc(Buffer const &, ParConstIterator const &) const;
protected:
///
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);