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 &);
29 docstring const & activeCounter() const { return active_counter_; }
31 docstring const & counterValue() const { return counter_value_; }
33 docstring const & prettyCounter() const { return pretty_counter_; }
35 void updateCommand(docstring const & new_label, bool updaterefs = true);
37 /// \name Public functions inherited from Inset class
39 /// verify label and update references.
42 bool isLabeled() const { return true; }
44 bool hasSettings() const { return true; }
46 InsetCode lyxCode() const { return LABEL_CODE; }
48 int plaintext(odocstream &, OutputParams const &) const;
50 int docbook(odocstream &, OutputParams const &) const;
52 docstring xhtml(XHTMLStream &, OutputParams const &) const;
54 void updateBuffer(ParIterator const & it, UpdateType);
56 void addToToc(DocIterator const &);
59 /// \name Static public methods obligated for InsetCommand derived classes
62 static ParamInfo const & findInfo(std::string const &);
64 static std::string defaultCommand() { return "label"; }
66 static bool isCompatibleCommand(std::string const & s)
67 { return s == "label"; }
71 /// \name Private functions inherited from InsetCommand class
74 docstring screenLabel() const;
78 /// \name Private functions inherited from Inset class
81 Inset * clone() const { return new InsetLabel(*this); }
83 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
85 void doDispatch(Cursor & cur, FuncRequest & cmd);
89 docstring screen_label_;
91 docstring active_counter_;
93 docstring counter_value_;
95 docstring pretty_counter_;