]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetListings.h
Clarify that the Dialog::lyxview_ pointer is in fact a reference
[lyx.git] / src / insets / InsetListings.h
index 88d380a8b2c30e159d96d4674eb0029d9a8fef24..84acbb93db75e8c968651bb558523855347fca13 100644 (file)
 #ifndef INSET_LISTINGS_H
 #define INSET_LISTINGS_H
 
-#include "LaTeXFeatures.h"
 #include "InsetListingsParams.h"
 
 
 namespace lyx {
 
+class LaTeXFeatures;
+
 /////////////////////////////////////////////////////////////////////////
 //
 // InsetListings
 //
 /////////////////////////////////////////////////////////////////////////
 
-/// 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:
        ///
@@ -39,22 +40,20 @@ public:
 private:
        ///
        bool isLabeled() const { return true; }
-       ///
-       bool noFontChange() const { return true; }
+       /// false is needed since listings do their own font handling.
+       bool inheritFont() const { return false; }
        ///
        InsetCode lyxCode() const { return LISTINGS_CODE; }
        /// 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;
        ///
        void read(Lexer & lex);
        ///
-       int latex(odocstream &, OutputParams const &) const;
+       void latex(otexstream &, OutputParams const &) const;
        ///
        docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
@@ -66,7 +65,7 @@ private:
        ///
        InsetListingsParams & params() { return params_; }
        ///
-       docstring contextMenu(BufferView const & bv, int x, int y) const;
+       std::string contextMenuName() const;
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///