#include "buffer.h"
#include "LaTeXFeatures.h"
#include "support/lstrings.h"
+#include "Painter.h"
// Quotes. Used for the various quotes. German, English, French,
// Danish, Polish, all either double or single.
for (i = 0; i < 6; ++i) {
if (str[0] == language_char[i]) {
- language = (InsetQuotes::quote_language)i;
+ language = InsetQuotes::quote_language(i);
break;
}
}
for (i = 0; i < 2; ++i) {
if (str[1] == side_char[i]) {
- side = (InsetQuotes::quote_side)i;
+ side = InsetQuotes::quote_side(i);
break;
}
}
for (i = 0; i < 2; ++i) {
if (str[2] == times_char[i]) {
- times = (InsetQuotes::quote_times)i;
+ times = InsetQuotes::quote_times(i);
break;
}
}
}
-int InsetQuotes::Ascent(LyXFont const & font) const
+int InsetQuotes::ascent(Painter &, LyXFont const & font) const
{
return font.maxAscent();
}
-int InsetQuotes::Descent(LyXFont const & font) const
+int InsetQuotes::descent(Painter &, LyXFont const & font) const
{
return font.maxDescent();
}
-int InsetQuotes::Width(LyXFont const & font) const
+int InsetQuotes::width(Painter &, LyXFont const & font) const
{
string text = DispString();
int w = 0;
}
-void InsetQuotes::Draw(LyXFont font, LyXScreen & scr,
- int baseline, float & x)
+void InsetQuotes::draw(Painter & pain, LyXFont const & font,
+ int baseline, float & x) const
{
string text = DispString();
- scr.drawString(font, text, baseline, int(x));
- x += Width(font);
+ pain.text(int(x), baseline, text, font);
+ x += width(pain, font);
}
-void InsetQuotes::Write(ostream & os)
+void InsetQuotes::Write(ostream & os) const
{
string text;
text += language_char[language];
}
-int InsetQuotes::Latex(ostream & os, signed char /*fragile*/)
+int InsetQuotes::Latex(ostream & os, signed char /*fragile*/) const
{
string quote;
int res = Latex(quote, 0);
}
-int InsetQuotes::Latex(string & file, signed char /*fragile*/)
+int InsetQuotes::Latex(string & file, signed char /*fragile*/) const
{
string doclang =
current_view->buffer()->GetLanguage();
}
-int InsetQuotes::Linuxdoc(string & file)
+int InsetQuotes::Linuxdoc(string & file) const
{
file += "\"";
}
-int InsetQuotes::DocBook(string & file)
+int InsetQuotes::DocBook(string & file) const
{
if(times == InsetQuotes::DoubleQ) {
if (side == InsetQuotes::LeftQ)