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(Buffer * buf, InsetCommandParams const &);
25 /// verify label and update references.
27 * Overloaded from Inset::initView.
32 bool isLabeled() const { return true; }
35 docstring screenLabel() const;
37 bool hasSettings() const { return true; }
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 docstring xhtml(odocstream &, OutputParams const &) const;
49 static ParamInfo const & findInfo(std::string const &);
51 static std::string defaultCommand() { return "label"; };
53 static bool isCompatibleCommand(std::string const & s)
54 { return s == "label"; }
56 void updateLabels(ParIterator const & it);
58 void addToToc(DocIterator const &);
60 void updateCommand(docstring const & new_label, bool updaterefs = true);
62 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
65 void doDispatch(Cursor & cur, FuncRequest & cmd);
68 Inset * clone() const { return new InsetLabel(*this); }
70 docstring screen_label_;