]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.h
New DocBook support
[lyx.git] / src / insets / InsetInclude.h
index 18329fe6d9117826e8f62c9eaf2e1b8990123d8f..db7beca5d49e6ad268fd7d461c3497892b6ca84d 100644 (file)
@@ -48,8 +48,9 @@ public:
 
        ///
        void setChildBuffer(Buffer * buffer);
-       /// \return the child buffer if the file is a LyX doc and could be loaded
-       Buffer * getChildBuffer() const;
+
+       /// \return loaded Buffer or zero if the file loading did not proceed.
+       Buffer * loadIfNeeded() const;
 
        /** Update the cache with all bibfiles in use of the child buffer
         *  (including bibfiles of grandchild documents).
@@ -75,7 +76,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
-       DisplayType display() const;
+       RowFlags rowFlags() const;
        ///
        InsetCode lyxCode() const { return INCLUDE_CODE; }
        ///
@@ -93,9 +94,9 @@ public:
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const;
        ///
-       int docbook(odocstream &, OutputParams const &) const;
+       void docbook(XMLStream &, OutputParams const &) const;
        ///
-       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const;
        ///
        void validate(LaTeXFeatures &) const;
        ///
@@ -104,7 +105,7 @@ public:
        void addToToc(DocIterator const & di, bool output_active,
                                  UpdateType utype, TocBackend & backend) const;
        ///
-       void updateBuffer(ParIterator const &, UpdateType);
+       void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
        ///
        std::string contextMenuName() const;
        //@}
@@ -117,6 +118,9 @@ public:
        static std::string defaultCommand() { return "include"; }
        ///
        static bool isCompatibleCommand(std::string const & s);
+       ///
+       bool needsCProtection(bool const maintext = false,
+                             bool const fragile = false) const;
        //@}
 
 protected:
@@ -128,12 +132,15 @@ private:
         *  and the preview should be regenerated.
         */
        void fileChanged() const;
-       /// \return loaded Buffer or zero if the file loading did not proceed.
-       Buffer * loadIfNeeded() const;
        /// launch external application
        void editIncluded(std::string const & file);
        ///
        bool isChildIncluded() const;
+       /// check whether the included file exist
+       bool includedFileExist() const;
+       /// \return True if there is a recursive include
+       /// Also issues appropriate warning, etc
+       bool checkForRecursiveInclude(Buffer const * cbuf, bool silent = false) const;
 
        /// \name Private functions inherited from Inset class
        //@{
@@ -153,7 +160,7 @@ private:
        docstring screenLabel() const;
        //@}
 
-       /// holds the entity name that defines the file location (SGML)
+       /// holds the entity name that defines the file location (XML)
        docstring const include_label;
 
        /// The pointer never changes although *preview_'s contents may.
@@ -167,6 +174,8 @@ private:
        mutable docstring listings_label_;
        InsetLabel * label_;
        mutable Buffer * child_buffer_;
+       mutable bool file_exist_;
+       mutable bool recursion_error_;
 };