#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"
using std::endl;
-// Insets default methods
// Initialization of the counter for the inset id's,
unsigned int Inset::inset_id = 0;
}
-void Inset::edit(BufferView *, int, int, mouse_button::state)
-{}
-
-
void Inset::validate(LaTeXFeatures &) const
{}
}
-void Inset::edit(BufferView *, bool)
-{}
-
-
#if 0
LyXFont const Inset::convertFont(LyXFont const & font) const
{
{}
-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;
}
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();
+}
+