]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetListings.h
More requires --> required, for C++2a.
[lyx.git] / src / insets / InsetListings.h
index 0782d68ec7c2f6f5b42d6f7d547b32accf88ec28..4be28f850dd942c108d5e83b021f3e9e7f1927a1 100644 (file)
@@ -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 collapsible 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 layoutName() const { return from_ascii("Listings"); }
-       // Update the counters of this inset and of its contents
-       void updateBuffer(ParIterator const &, UpdateType);
+       docstring layoutName() const;
        ///
        void write(std::ostream & os) const;
        ///
@@ -77,9 +76,11 @@ 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; }
+       ///
+       Encoding const * forcedEncoding(Encoding const *, Encoding const *) const;
 
        ///
        InsetListingsParams params_;