X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetListings.h;h=3e5fbd54e21b3e7b3503129414575f20378ffa51;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=af0676e4f4c93f0fa6a14bbd7db82b6d42f9e207;hpb=5cb3e1920018457e9257d18819a37ebcbcd45650;p=lyx.git diff --git a/src/insets/InsetListings.h b/src/insets/InsetListings.h index af0676e4f4..3e5fbd54e2 100644 --- a/src/insets/InsetListings.h +++ b/src/insets/InsetListings.h @@ -24,18 +24,20 @@ namespace lyx { */ -class InsetListings : public InsetERT { +class InsetListings : public InsetCollapsable { public: /// InsetListings(BufferParams const &, InsetListingsParams const & par = InsetListingsParams()); /// ~InsetListings(); /// - Inset::Code lyxCode() const { return Inset::LISTINGS_CODE; } + InsetCode lyxCode() const { return LISTINGS_CODE; } /// lstinline is inlined, normal listing is displayed virtual DisplayType display() const; /// docstring name() const { return from_ascii("Listings"); } + // Update the counters of this inset and of its contents + virtual void updateLabels(Buffer const &, ParIterator const &); /// void write(Buffer const & buf, std::ostream & os) const; /// @@ -43,18 +45,14 @@ public: /// virtual docstring const editMessage() const; /// + bool isMacroScope(Buffer const &) const { return true; } + /// int latex(Buffer const &, odocstream &, OutputParams const &) const; /// void validate(LaTeXFeatures &) const; /// - bool metrics(MetricsInfo &, Dimension &) const; - /// - void draw(PainterInfo & pi, int x, int y) const; - /// bool showInsetDialog(BufferView *) const; /// - void getDrawFont(Font &) const; - /// InsetListingsParams const & params() const { return params_; } /// InsetListingsParams & params() { return params_; } @@ -65,9 +63,7 @@ protected: /// bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; private: - virtual std::auto_ptr doClone() const; - /// - void init(); + virtual Inset * clone() const; /// void setButtonLabel(); ///