X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetCaption.h;h=804a40a6d72b27f581a5df643ebd6df3845a8899;hb=06254d11dfdf670fab3548dc2a2674e7a261262c;hp=e13cf46319eebdedd66b05cb2964d20fe50de4ea;hpb=fb963c2587c974f0102e450d1dbde653be5253aa;p=lyx.git diff --git a/src/insets/InsetCaption.h b/src/insets/InsetCaption.h index e13cf46319..804a40a6d7 100644 --- a/src/insets/InsetCaption.h +++ b/src/insets/InsetCaption.h @@ -13,11 +13,11 @@ #define INSETCAPTION_H #include "InsetText.h" -#include "TextClass.h" - namespace lyx { +class TextClass; + /** A caption inset */ class InsetCaption : public InsetText { @@ -36,7 +36,7 @@ public: /// virtual bool neverIndent(Buffer const &) const { return true; } /// - virtual Inset::Code lyxCode() const; + virtual InsetCode lyxCode() const; /// virtual docstring const editMessage() const; /// @@ -45,21 +45,19 @@ public: /// bool descendable() const { return true; } /// - virtual bool metrics(MetricsInfo & mi, Dimension & dim) const; + virtual void metrics(MetricsInfo & mi, Dimension & dim) const; /// virtual void draw(PainterInfo & pi, int x, int y) const; /// - void drawSelection(PainterInfo & pi, int x, int y) const; - /// virtual void edit(Cursor & cur, bool left); /// virtual Inset * editXY(Cursor & cur, int x, int y); /// - bool insetAllowed(Inset::Code code) const; + bool insetAllowed(InsetCode code) const; /// virtual bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; - /// - virtual bool wide() const { return false; } + // Update the counters of this inset and of its contents + virtual void updateLabels(Buffer const &, ParIterator const &); /// int latex(Buffer const & buf, odocstream & os, OutputParams const &) const; @@ -76,8 +74,6 @@ public: int getOptArg(Buffer const & buf, odocstream & os, OutputParams const &) const; /// - void setCount(int c) { counter_ = c; } - /// std::string const & type() const { return type_; } /// void setType(std::string const & type) { type_ = type; } @@ -90,9 +86,7 @@ public: private: /// - void computeFullLabel(Buffer const & buf) const; - /// - virtual std::auto_ptr doClone() const; + virtual Inset * clone() const; /// mutable docstring full_label_; /// @@ -102,8 +96,6 @@ private: /// docstring custom_label_; /// - int counter_; - /// TextClass const & textclass_; }; @@ -116,7 +108,7 @@ Inset::DisplayType InsetCaption::display() const inline -Inset::Code InsetCaption::lyxCode() const +InsetCode InsetCaption::lyxCode() const { return CAPTION_CODE; }