]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphics.h
insetcharstyle drawing cosmetics
[lyx.git] / src / insets / insetgraphics.h
index c9e1887cebfc70b2ddd69d921a08a0ddac5938b7..2e8535c65f79986ce1ac2c5de463f0f33c28d422 100644 (file)
@@ -19,7 +19,6 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/signals/trackable.hpp>
 
-
 class Dialogs;
 class RenderGraphic;
 class LaTeXFeatures;
@@ -34,12 +33,8 @@ public:
        ///
        ~InsetGraphics();
        ///
-       virtual dispatch_result localDispatch(FuncRequest const & cmd);
-       ///
        void metrics(MetricsInfo &, Dimension &) const;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
-       ///
        EDITABLE editable() const;
        ///
        void write(Buffer const &, std::ostream &) const;
@@ -51,13 +46,16 @@ public:
         fragile commands by adding a #\protect# before.
         */
        int latex(Buffer const &, std::ostream &,
-                 LatexRunParams const &) const;
+                 OutputParams const &) const;
        ///
-       int ascii(Buffer const &, std::ostream &, int linelen) const;
+       int plaintext(Buffer const &, std::ostream &,
+                 OutputParams const &) const;
        ///
-       int linuxdoc(Buffer const &, std::ostream &) const;
+       int linuxdoc(Buffer const &, std::ostream &,
+                    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.
@@ -77,16 +75,19 @@ public:
 
        /// Get the inset parameters, used by the GUIndependent dialog.
        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;
+protected:
+       ///
+       void priv_dispatch(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;
-
        /// Read the inset native format
        void readInsetGraphics(LyXLex & lex, std::string const & bufpath);
 
@@ -94,8 +95,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_;