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"
22 class InsetLabel : public InsetCommand {
25 InsetLabel(Buffer * buf, InsetCommandParams const &);
27 /// verify label and update references.
29 * Overloaded from Inset::initView.
34 bool isLabeled() const { return true; }
37 docstring screenLabel() const;
39 bool hasSettings() const { return true; }
41 InsetCode lyxCode() const { return LABEL_CODE; }
43 int plaintext(odocstream &, OutputParams const &) const;
45 int docbook(odocstream &, OutputParams const &) const;
47 docstring xhtml(XHTMLStream &, 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, UpdateType);
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;
64 docstring const & activeCounter() const { return active_counter_; }
66 docstring const & counterValue() const { return counter_value_; }
68 docstring const & prettyCounter() const { return pretty_counter_; }
71 void doDispatch(Cursor & cur, FuncRequest & cmd);
74 Inset * clone() const { return new InsetLabel(*this); }
76 docstring screen_label_;
78 docstring active_counter_;
80 docstring counter_value_;
82 docstring pretty_counter_;