+ /// \returns the number of rows (\n's) of generated code.
+ virtual int latex(Buffer const &, odocstream &,
+ OutputParams const &) const;
+ ///
+ virtual int plaintext(Buffer const &, odocstream &,
+ OutputParams const &) const;
+ ///
+ virtual int docbook(Buffer const &, odocstream &,
+ OutputParams const &) const;
+
+ /// Update needed features for this inset.
+ virtual void validate(LaTeXFeatures & features) const;
+
+ ///
+ InsetExternalParams const & params() const;
+ ///
+ void setParams(InsetExternalParams const &, Buffer const &);
+ ///
+ void addPreview(graphics::PreviewLoader &) const;
+ ///
+ void edit(LCursor & cur, bool left);
+ ///
+ bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
+
+protected:
+ InsetExternal(InsetExternal const &);
+ ///
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+private:
+ virtual std::auto_ptr<InsetBase> doClone() const;
+
+ /** This method is connected to the graphics loader, so we are
+ * informed when the image has been loaded.
+ */
+ void statusChanged() const;
+
+ /** Slot receiving a signal that the external file has changed
+ * and the preview should be regenerated.
+ */
+ void fileChanged() const;
+
+ /// The current params
+ InsetExternalParams params_;
+ /// The thing that actually draws the image on LyX's screen.
+ boost::scoped_ptr<RenderBase> renderer_;