#include "LColor.h"
#include "metricsinfo.h"
-#include "frontends/font_metrics.h"
+#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
+
+namespace lyx {
+
using std::string;
using std::auto_ptr;
}
-void RenderButton::update(string const & text, bool editable)
+void RenderButton::update(docstring const & text, bool editable)
{
text_ = text;
editable_ = editable;
{
LyXFont font(LyXFont::ALL_SANE);
font.decSize();
-
+ frontend::FontMetrics const & fm =
+ theFontMetrics(font);
+
if (editable_)
- font_metrics::buttonText(text_, font, dim.wid, dim.asc, dim.des);
+ fm.buttonText(text_, dim.wid, dim.asc, dim.des);
else
- font_metrics::rectText(text_, font, dim.wid, dim.asc, dim.des);
+ fm.rectText(text_, dim.wid, dim.asc, dim.des);
dim.wid += 4;
}
LColor::commandbg, LColor::commandframe);
}
}
+
+
+} // namespace lyx