]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetListings.h
revert r37459 and add a note to the sources:
[lyx.git] / src / insets / InsetListings.h
index 5396b7d0e1f0140a48808034dffeaa2f659faa48..9dc5a56e2365998a0e0b1f81adc9a96d9955c82e 100644 (file)
 #ifndef INSET_LISTINGS_H
 #define INSET_LISTINGS_H
 
-#include "LaTeXFeatures.h"
-#include "InsetERT.h"
 #include "InsetListingsParams.h"
 
 
 namespace lyx {
 
+class LaTeXFeatures;
+
 /////////////////////////////////////////////////////////////////////////
 //
 // InsetListings
@@ -30,7 +30,7 @@ class InsetListings : public InsetCollapsable
 {
 public:
        ///
-       InsetListings(Buffer const &, InsetListingsParams const & par = InsetListingsParams());
+       InsetListings(Buffer *, InsetListingsParams const & par = InsetListingsParams());
        ///
        ~InsetListings();
        ///
@@ -41,21 +41,23 @@ private:
        ///
        bool isLabeled() const { return true; }
        ///
+       bool noFontChange() const { return true; }
+       ///
        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 updateLabels(ParIterator const &);
+       void updateBuffer(ParIterator const &, UpdateType);
        ///
        void write(std::ostream & os) const;
        ///
        void read(Lexer & lex);
        ///
-       docstring editMessage() const;
+       int latex(otexstream &, OutputParams const &) const;
        ///
-       int latex(odocstream &, OutputParams const &) const;
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
        void validate(LaTeXFeatures &) const;
        ///
@@ -65,7 +67,7 @@ private:
        ///
        InsetListingsParams & params() { return params_; }
        ///
-       docstring contextMenu(BufferView const & bv, int x, int y) const;
+       docstring contextMenuName() const;
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
@@ -76,6 +78,8 @@ private:
        docstring const buttonLabel(BufferView const & bv) const;
        ///
        docstring getCaption(OutputParams const &) const;
+       ///
+       bool insetAllowed(InsetCode c) const { return c == CAPTION_CODE; } 
 
        ///
        InsetListingsParams params_;