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 docstring screenLabel() const;
34 EDITABLE editable() const { return IS_EDITABLE; }
36 InsetCode lyxCode() const { return LABEL_CODE; }
38 int latex(odocstream &, OutputParams const &) const;
40 int plaintext(odocstream &, OutputParams const &) const;
42 int docbook(odocstream &, OutputParams const &) const;
44 static ParamInfo const & findInfo(std::string const &);
46 static std::string defaultCommand() { return "label"; };
48 static bool isCompatibleCommand(std::string const & s)
49 { return s == "label"; }
51 void updateLabels(ParIterator const & it);
53 void addToToc(ParConstIterator const &) const;
55 void updateCommand(docstring const & new_label, bool updaterefs = true);
58 void doDispatch(Cursor & cur, FuncRequest & cmd);
61 Inset * clone() const { return new InsetLabel(*this); }
63 docstring screen_label_;