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; }
37 /// Appends \c list with this label
38 void getLabelList(std::vector<docstring> & list) const;
40 int latex(odocstream &, OutputParams const &) const;
42 int plaintext(odocstream &, OutputParams const &) const;
44 int docbook(odocstream &, OutputParams const &) const;
46 static ParamInfo const & findInfo(std::string const &);
48 static std::string defaultCommand() { return "label"; };
50 static bool isCompatibleCommand(std::string const & s)
51 { return s == "label"; }
53 void updateLabels(ParIterator const & it);
55 void addToToc(ParConstIterator const &) const;
57 void updateCommand(docstring const & new_label, bool updaterefs = true);
60 void doDispatch(Cursor & cur, FuncRequest & cmd);
63 Inset * clone() const { return new InsetLabel(*this); }
65 docstring screen_label_;