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 docstring screenLabel() const;
27 EDITABLE editable() const { return IS_EDITABLE; }
29 InsetCode lyxCode() const { return LABEL_CODE; }
30 /// Appends \c list with this label
31 void getLabelList(std::vector<docstring> & list) const;
33 int latex(odocstream &, OutputParams const &) const;
35 int plaintext(odocstream &, OutputParams const &) const;
37 int docbook(odocstream &, OutputParams const &) const;
39 static ParamInfo const & findInfo(std::string const &);
41 static std::string defaultCommand() { return "label"; };
43 static bool isCompatibleCommand(std::string const & s)
44 { return s == "label"; }
46 void updateLabels(ParIterator const & it);
48 void addToToc(ParConstIterator const &) const;
51 void doDispatch(Cursor & cur, FuncRequest & cmd);
54 Inset * clone() const { return new InsetLabel(*this); }
56 void update(docstring const & new_label);