X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetListings.h;h=902fa0437e64009770293859e2540322c3b53fd9;hb=239b9919ffe28338d789e6dc9122228f77ab77a7;hp=18125dc3bb6f0a765eb4cc2a27b4667f809a73e0;hpb=f176a18434d40eead5f5a64234db9445053cbf76;p=lyx.git diff --git a/src/insets/InsetListings.h b/src/insets/InsetListings.h index 18125dc3bb..902fa0437e 100644 --- a/src/insets/InsetListings.h +++ b/src/insets/InsetListings.h @@ -18,6 +18,7 @@ namespace lyx { class LaTeXFeatures; +struct TexString; ///////////////////////////////////////////////////////////////////////// // @@ -25,8 +26,8 @@ class LaTeXFeatures; // ///////////////////////////////////////////////////////////////////////// -/// A collapsable text inset for program listings. -class InsetListings : public InsetCollapsable +/// A captionable and collapsable text inset for program listings. +class InsetListings : public InsetCaptionable { public: /// @@ -47,9 +48,7 @@ private: /// lstinline is inlined, normal listing is displayed DisplayType display() const; /// - docstring name() const { return from_ascii("Listings"); } - // Update the counters of this inset and of its contents - void updateBuffer(ParIterator const &, UpdateType); + docstring layoutName() const { return from_ascii("Listings"); } /// void write(std::ostream & os) const; /// @@ -67,7 +66,7 @@ private: /// InsetListingsParams & params() { return params_; } /// - docstring contextMenuName() const; + std::string contextMenuName() const; /// void doDispatch(Cursor & cur, FuncRequest & cmd); /// @@ -77,9 +76,9 @@ private: /// docstring const buttonLabel(BufferView const & bv) const; /// - docstring getCaption(OutputParams const &) const; + TexString getCaption(OutputParams const &) const; /// - bool insetAllowed(InsetCode c) const { return c == CAPTION_CODE; } + bool insetAllowed(InsetCode c) const { return c == CAPTION_CODE || c == QUOTE_CODE; } /// InsetListingsParams params_;