]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inset.C
Rename LatexRunParams::fragile as moving_arg.
[lyx.git] / src / insets / inset.C
index ff8d77a51fc33b065ae64eaa6e1a98eb0344cc9a..51f655cf47a02b39e07583a65d34699a30c8374a 100644 (file)
 
 #include <config.h>
 
-
 #include "inset.h"
-
 #include "BufferView.h"
 #include "funcrequest.h"
 #include "gettext.h"
 #include "lyxfont.h"
 #include "lyxtext.h"
+#include "dimension.h"
 
 #include "frontends/Painter.h"
 #include "frontends/mouse_state.h"
@@ -29,7 +28,6 @@
 
 using std::endl;
 
-// Insets default methods
 
 // Initialization of the counter for the inset id's,
 unsigned int Inset::inset_id = 0;
@@ -66,10 +64,6 @@ Inset::EDITABLE Inset::editable() const
 }
 
 
-void Inset::edit(BufferView *, int, int, mouse_button::state)
-{}
-
-
 void Inset::validate(LaTeXFeatures &) const
 {}
 
@@ -80,10 +74,6 @@ bool Inset::autoDelete() const
 }
 
 
-void Inset::edit(BufferView *, bool)
-{}
-
-
 #if 0
 LyXFont const Inset::convertFont(LyXFont const & font) const
 {
@@ -143,10 +133,10 @@ void Inset::setFont(BufferView *, LyXFont const &, bool, bool)
 {}
 
 
-bool Inset::forceDefaultParagraphs(Inset const * in) const
+bool Inset::forceDefaultParagraphs(Inset const * inset) const
 {
        if (owner())
-               return owner()->forceDefaultParagraphs(in);
+               return owner()->forceDefaultParagraphs(inset);
        return false;
 }
 
@@ -157,3 +147,27 @@ int Inset::latexTextWidth(BufferView * bv) const
        return bv->workWidth();
 }
 
+
+int Inset::ascent(BufferView * bv, LyXFont const & font) const
+{
+       Dimension dim;
+       dimension(bv, font, dim);
+       return dim.ascent();
+}
+
+
+int Inset::descent(BufferView * bv, LyXFont const & font) const
+{
+       Dimension dim;
+       dimension(bv, font, dim);
+       return dim.descent();
+}
+
+
+int Inset::width(BufferView * bv, LyXFont const & font) const
+{
+       Dimension dim;
+       dimension(bv, font, dim);
+       return dim.width();
+}
+