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
26 InsetLabel(Buffer * buf, InsetCommandParams const &);
28 /// verify label and update references.
30 * Overloaded from Inset::initView.
35 bool isLabeled() const { return true; }
38 docstring screenLabel() const;
40 bool hasSettings() const { return true; }
42 InsetCode lyxCode() const { return LABEL_CODE; }
44 int plaintext(odocstream &, OutputParams const &) const;
46 int docbook(odocstream &, OutputParams const &) const;
48 docstring xhtml(XHTMLStream &, OutputParams const &) const;
50 static ParamInfo const & findInfo(std::string const &);
52 static std::string defaultCommand() { return "label"; }
54 static bool isCompatibleCommand(std::string const & s)
55 { return s == "label"; }
57 void updateBuffer(ParIterator const & it, UpdateType);
59 void addToToc(DocIterator const &);
61 void updateCommand(docstring const & new_label, bool updaterefs = true);
63 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
65 docstring const & activeCounter() const { return active_counter_; }
67 docstring const & counterValue() const { return counter_value_; }
69 docstring const & prettyCounter() const { return pretty_counter_; }
72 void doDispatch(Cursor & cur, FuncRequest & cmd);
75 Inset * clone() const { return new InsetLabel(*this); }
77 docstring screen_label_;
79 docstring active_counter_;
81 docstring counter_value_;
83 docstring pretty_counter_;