4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
15 #include "InsetCommand.h"
20 class InsetLabel : public InsetCommand {
23 InsetLabel(InsetCommandParams const &);
25 /// verify label and update references.
27 * Overloaded from Inset::initView.
32 bool isLabeled() const { return true; }
35 docstring screenLabel() const;
37 EDITABLE editable() const { return IS_EDITABLE; }
39 InsetCode lyxCode() const { return LABEL_CODE; }
41 int latex(odocstream &, OutputParams const &) const;
43 int plaintext(odocstream &, OutputParams const &) const;
45 int docbook(odocstream &, OutputParams const &) const;
47 static ParamInfo const & findInfo(std::string const &);
49 static std::string defaultCommand() { return "label"; };
51 static bool isCompatibleCommand(std::string const & s)
52 { return s == "label"; }
54 void updateLabels(ParIterator const & it);
56 void addToToc(ParConstIterator const &) const;
58 void updateCommand(docstring const & new_label, bool updaterefs = true);
61 void doDispatch(Cursor & cur, FuncRequest & cmd);
64 Inset * clone() const { return new InsetLabel(*this); }
66 docstring screen_label_;