#include "Counters.h"
#include "EmbeddedFiles.h"
-#include "support/FileName.h"
-
#include <boost/scoped_ptr.hpp>
namespace lyx {
class LaTeXFeatures;
class RenderMonitoredPreview;
-
/// for including tex/lyx files
class InsetInclude : public InsetCommand {
public:
* Return an empty vector if the child doc is not loaded.
* \param buffer the Buffer containing this inset.
*/
- std::vector<support::FileName> const &
+ EmbeddedFileList const &
getBibfilesCache(Buffer const & buffer) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
void addPreview(graphics::PreviewLoader &) const;
///
- void addToToc(TocList &, Buffer const &, ParConstIterator const &) const;
+ void addToToc(Buffer const &, ParConstIterator const &) const;
///
void updateLabels(Buffer const & buffer, ParIterator const &);
/// child document can be embedded
- void registerEmbeddedFiles(Buffer const &, EmbeddedFiles &) const;
+ void registerEmbeddedFiles(Buffer const &, EmbeddedFileList &) const;
+ ///
+ void updateEmbeddedFile(Buffer const & buf, EmbeddedFile const & file);
+ ///
+ static CommandInfo const * findInfo(std::string const &);
+ ///
+ static std::string defaultCommand() { return "include"; };
+ ///
+ static bool isCompatibleCommand(std::string const & s);
protected:
InsetInclude(InsetInclude const &);
///
mutable docstring listings_label_;
};
-
+/// return the child buffer if the file is a LyX doc and is loaded
+Buffer * getChildBuffer(Buffer const & buffer, InsetCommandParams const & params);
+
/// return loaded Buffer or zero if the file loading did not proceed.
Buffer * loadIfNeeded(Buffer const & parent, InsetCommandParams const & params);
+///
+void resetParentBuffer(Buffer const * parent, InsetCommandParams const & params,
+ bool close_it);
+
} // namespace lyx
#endif // INSETINCLUDE_H