]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphics.h
Introduce wide streams. This fixes the remaining problems of plain text
[lyx.git] / src / insets / insetgraphics.h
index 79e37b2610d882f31322494b4ec7250fa98a2786..effe8489e034627b6cf19b950556975a0b5b43af 100644 (file)
@@ -29,8 +29,6 @@ public:
        ///
        InsetGraphics();
        ///
-       InsetGraphics(InsetGraphics const &);
-       ///
        ~InsetGraphics();
        ///
        void metrics(MetricsInfo &, Dimension &) const;
@@ -46,13 +44,13 @@ public:
         fragile commands by adding a #\protect# before.
         */
        int latex(Buffer const &, std::ostream &,
-                 LatexRunParams const &) const;
-       ///
-       int ascii(Buffer const &, std::ostream &, int linelen) const;
+                 OutputParams const &) const;
        ///
-       int linuxdoc(Buffer const &, std::ostream &) const;
+       int plaintext(Buffer const &, lyx::odocstream &,
+                 OutputParams const &) const;
        ///
-       int docbook(Buffer const &, std::ostream &, bool mixcont) const;
+       int docbook(Buffer const &, std::ostream &,
+                   OutputParams const &) const;
 
        /** Tell LyX what the latex features you need i.e. what latex packages
            you need to be included.
@@ -60,10 +58,7 @@ public:
        void validate(LaTeXFeatures & features) const;
 
        /// returns LyX code associated with the inset. Used for TOC, ...)
-       InsetOld::Code lyxCode() const { return InsetOld::GRAPHICS_CODE; }
-
-       ///
-       virtual std::auto_ptr<InsetBase> clone() const;
+       InsetBase::Code lyxCode() const { return InsetBase::GRAPHICS_CODE; }
 
        /** Set the inset parameters, used by the GUIndependent dialog.
            Return true of new params are different from what was so far.
@@ -74,19 +69,20 @@ public:
        InsetGraphicsParams const & params() const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
+       ///
+       void edit(LCursor & cur, bool left);
+       ///
+       void editGraphics(InsetGraphicsParams const &, Buffer const &) const;
+       ///
+       bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
 protected:
+       InsetGraphics(InsetGraphics const &);
        ///
-       virtual
-       dispatch_result
-       priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
+       virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
 private:
-       ///
        friend class InsetGraphicsMailer;
 
-       /** This method is connected to the graphics loader, so we are
-        *  informed when the image has been loaded.
-        */
-       void statusChanged() const;
+       virtual std::auto_ptr<InsetBase> doClone() const;
 
        /// Read the inset native format
        void readInsetGraphics(LyXLex & lex, std::string const & bufpath);
@@ -95,8 +91,12 @@ private:
        std::string const statusMessage() const;
        /// Create the options for the latex command.
        std::string const createLatexOptions() const;
+       /// Create length values for docbook export.
+       std::string const toDocbookLength(LyXLength const & len) const;
+       /// Create the atributes for docbook export.
+       std::string const createDocBookAttributes() const;
        /// Convert the file if needed, and return the location of the file.
-       std::string const prepareFile(Buffer const & buf, LatexRunParams const &) const;
+       std::string const prepareFile(Buffer const & buf, OutputParams const &) const;
 
        ///
        InsetGraphicsParams params_;