]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphics.C
static_cast-based key/mouse-state. Kill insetKeyPress.
[lyx.git] / src / insets / insetgraphics.C
index b913292146450f1aff4e1a95995bdb4d926f0016..108535e6075fe210e80df2afa6f4ae8c7d96bda1 100644 (file)
@@ -81,14 +81,14 @@ TODO Before initial production release:
 #include "graphics/GraphicsCache.h"
 #include "graphics/GraphicsImage.h"
 
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxtext.h"
 #include "buffer.h"
 #include "BufferView.h"
 #include "converter.h"
-#include "Painter.h"
+#include "frontends/Painter.h"
 #include "lyxrc.h"
-#include "font.h"    // For the lyxfont class.
+#include "frontends/font_metrics.h"
 #include "debug.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
@@ -263,13 +263,13 @@ int InsetGraphics::width(BufferView *, LyXFont const & font) const
                string const justname = OnlyFilename (params().filename);
                if (!justname.empty()) {
                        msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
-                       font_width = lyxfont::width(justname, msgFont);
+                       font_width = font_metrics::width(justname, msgFont);
                }
 
                string const msg = statusMessage();
                if (!msg.empty()) {
                        msgFont.setSize(LyXFont::SIZE_TINY);
-                       int const msg_width = lyxfont::width(msg, msgFont);
+                       int const msg_width = font_metrics::width(msg, msgFont);
                        font_width = std::max(font_width, msg_width);
                }
 
@@ -328,8 +328,8 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
                string const justname = OnlyFilename (params().filename);
                if (!justname.empty()) {
                        msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
-                       paint.text(old_x + 8,
-                                  baseline - lyxfont::maxAscent(msgFont) - 4,
+                       paint.text(old_x + 8, 
+                                  baseline - font_metrics::maxAscent(msgFont) - 4,
                                   justname, msgFont);
                }
 
@@ -364,7 +364,7 @@ void InsetGraphics::updateInset(string const & filepath) const
 }
 
 
-void InsetGraphics::edit(BufferView *bv, int, int, unsigned int)
+void InsetGraphics::edit(BufferView *bv, int, int, mouse_button::state)
 {
        bv->owner()->getDialogs()->showGraphics(this);
 }
@@ -372,7 +372,7 @@ void InsetGraphics::edit(BufferView *bv, int, int, unsigned int)
 
 void InsetGraphics::edit(BufferView * bv, bool)
 {
-       edit(bv, 0, 0, 0);
+       edit(bv, 0, 0, mouse_button::none);
 }