X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetExternal.h;h=d281a0651941be49caf2248adcf383f4d9882c2f;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=31af0458a18b0e7f40d9b5504126b2bbcea7b82f;hpb=897436efbb9bd641b61467d185a2dfae9839e575;p=lyx.git diff --git a/src/insets/InsetExternal.h b/src/insets/InsetExternal.h index 31af0458a1..d281a06519 100644 --- a/src/insets/InsetExternal.h +++ b/src/insets/InsetExternal.h @@ -14,6 +14,7 @@ #include "Inset.h" #include "ExternalTransforms.h" +#include "EmbeddedFiles.h" #include "support/FileName.h" #include "support/Translator.h" @@ -79,7 +80,7 @@ public: std::string const & templatename() const { return templatename_; } /// The external file. - support::DocFileName filename; + EmbeddedFile filename; /// How the inset is to be displayed by LyX. external::DisplayType display; /// The scale of the displayed graphic (if shown). @@ -111,12 +112,12 @@ public: /// virtual ~InsetExternal(); /// - virtual Inset::Code lyxCode() const { return EXTERNAL_CODE; } + virtual InsetCode lyxCode() const { return EXTERNAL_CODE; } /// virtual EDITABLE editable() const { return IS_EDITABLE; } /// - bool metrics(MetricsInfo &, Dimension &) const; + void metrics(MetricsInfo &, Dimension &) const; /// void draw(PainterInfo & pi, int x, int y) const; /// @@ -144,16 +145,20 @@ public: /// void addPreview(graphics::PreviewLoader &) const; /// - void edit(Cursor & cur, bool left); + void edit(Cursor & cur, bool front, EntryDirection entry_from); /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; + /// external file can be embedded + void registerEmbeddedFiles(Buffer const &, EmbeddedFileList &) const; + /// + void updateEmbeddedFile(Buffer const &, EmbeddedFile const &); protected: InsetExternal(InsetExternal const &); /// virtual void doDispatch(Cursor & cur, FuncRequest & cmd); private: - virtual std::auto_ptr doClone() const; + virtual Inset * clone() const; /** This method is connected to the graphics loader, so we are * informed when the image has been loaded.