X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetLabel.h;h=33ba32ebc27e6b0b4c61834b66e48082dbac6428;hb=d6f1915684328c6e3fe61c6eef8846b5cabec334;hp=53d52ad442ea9eeb0a6b1d9a12a07e8523ee321e;hpb=ed858d73e57ce7aa89e38c1bc4d799362edb0227;p=lyx.git diff --git a/src/insets/InsetLabel.h b/src/insets/InsetLabel.h index 53d52ad442..33ba32ebc2 100644 --- a/src/insets/InsetLabel.h +++ b/src/insets/InsetLabel.h @@ -21,24 +21,49 @@ class InsetLabel : public InsetCommand { public: /// InsetLabel(InsetCommandParams const &); + + /// verify label and update references. + /** + * Overloaded from Inset::initView. + **/ + void initView(); + + /// + bool isLabeled() const { return true; } + /// - docstring const getScreenLabel(Buffer const &) const; + docstring screenLabel() const; /// EDITABLE editable() const { return IS_EDITABLE; } /// - Inset::Code lyxCode() const { return Inset::LABEL_CODE; } - /// Appends \c list with this label - void getLabelList(Buffer const &, std::vector & list) const; + InsetCode lyxCode() const { return LABEL_CODE; } + /// + int latex(odocstream &, OutputParams const &) const; + /// + int plaintext(odocstream &, OutputParams const &) const; + /// + int docbook(odocstream &, OutputParams const &) const; /// - int latex(Buffer const &, odocstream &, OutputParams const &) const; + static ParamInfo const & findInfo(std::string const &); /// - int plaintext(Buffer const &, odocstream &, OutputParams const &) const; + static std::string defaultCommand() { return "label"; }; /// - int docbook(Buffer const &, odocstream &, OutputParams const &) const; + static bool isCompatibleCommand(std::string const & s) + { return s == "label"; } + /// + void updateLabels(ParIterator const & it); + /// + void addToToc(DocIterator const &); + /// + void updateCommand(docstring const & new_label, bool updaterefs = true); protected: - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + /// + void doDispatch(Cursor & cur, FuncRequest & cmd); private: - virtual Inset * clone() const; + /// + Inset * clone() const { return new InsetLabel(*this); } + /// + docstring screen_label_; };