]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphics.C
Some more changes for updating text-insets.
[lyx.git] / src / insets / insetgraphics.C
index 41965868016ac5dabd5c6bd0ff47117153b18c66..586934dd14934134ad9d177873eb245ad953af3a 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 
 #include "insets/insetgraphics.h"
+#include "BufferView.h"
 #include "Painter.h"
 #include "form_graphics.h"
 #include "lyx_gui_misc.h"
@@ -133,12 +134,14 @@ int InsetGraphics::width(Painter &, LyXFont const &) const
 }
 
 
-void InsetGraphics::draw(Painter & pain, LyXFont const & font,
-                        int baseline, float & x) const
+void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
+                        int baseline, float & x, bool) const
 {
+       Painter & pain = bv->painter();
+
        // This will draw the graphics. As for now we only draw a
        // placeholder rectangele.
-       pain.rectangle(x, baseline - ascent(pain, font),
+       pain.rectangle(int(x), baseline - ascent(pain, font),
                       width(pain, font),
                       ascent(pain, font) + descent(pain, font));
 }
@@ -171,7 +174,7 @@ Inset::EDITABLE InsetGraphics::Editable() const
 }
 
 
-void InsetGraphics::Write(ostream & os) const
+void InsetGraphics::Write(Buffer const *, ostream & os) const
 {
        // The question on the file format is still open.
        // Suggestions?
@@ -181,7 +184,7 @@ void InsetGraphics::Write(ostream & os) const
 }
 
 
-void InsetGraphics::Read(LyXLex & /*lex*/) 
+void InsetGraphics::Read(Buffer const *, LyXLex & /*lex*/) 
 {
        // For now we only use a static file...
        graphicsfile = "testfile.xpm";
@@ -191,8 +194,8 @@ void InsetGraphics::Read(LyXLex & /*lex*/)
 }
 
 
-int InsetGraphics::Latex(ostream & os,
-                        signed char /*fragile*/, bool/*fs*/) const
+int InsetGraphics::Latex(Buffer const *, ostream & os,
+                        bool /*fragile*/, bool/*fs*/) const
 {
        // MISSING: We have to decide how to do the order of the options
        // that is depentant of order, like witdth, height, andlge. Should
@@ -334,13 +337,19 @@ int InsetGraphics::Latex(ostream & os,
 }
 
 
-int InsetGraphics::Linuxdoc(ostream &) const
+int InsetGraphics::Ascii(Buffer const *, ostream &) const
+{
+       return 0;
+}
+
+
+int InsetGraphics::Linuxdoc(Buffer const *, ostream &) const
 {
        return 0;
 }
 
 
-int InsetGraphics::DocBook(ostream &) const
+int InsetGraphics::DocBook(Buffer const *, ostream &) const
 {
        return 0;
 }