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 latex(odocstream &, OutputParams const &) const;
45 int plaintext(odocstream &, OutputParams const &) const;
47 int docbook(odocstream &, OutputParams const &) const;
49 docstring xhtml(XHTMLStream &, OutputParams const &) const;
51 static ParamInfo const & findInfo(std::string const &);
53 static std::string defaultCommand() { return "label"; }
55 static bool isCompatibleCommand(std::string const & s)
56 { return s == "label"; }
58 void updateLabels(ParIterator const & it, UpdateType);
60 void addToToc(DocIterator const &);
62 void updateCommand(docstring const & new_label, bool updaterefs = true);
64 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
66 docstring const & activeCounter() const { return active_counter_; }
68 docstring const & counterValue() const { return counter_value_; }
70 docstring const & prettyCounter() const { return pretty_counter_; }
73 void doDispatch(Cursor & cur, FuncRequest & cmd);
76 Inset * clone() const { return new InsetLabel(*this); }
78 docstring screen_label_;
80 docstring active_counter_;
82 docstring counter_value_;
84 docstring pretty_counter_;