///
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).
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;
//@}
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:
* 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
//@{
mutable docstring listings_label_;
InsetLabel * label_;
mutable Buffer * child_buffer_;
+ mutable bool file_exist_;
+ mutable bool recursion_error_;
};