}
-#ifdef USE_PAINTER
int InsetQuotes::ascent(Painter &, LyXFont const & font) const
{
return font.maxAscent();
}
-#else
-int InsetQuotes::Ascent(LyXFont const & font) const
-{
- return font.maxAscent();
-}
-#endif
-#ifdef USE_PAINTER
int InsetQuotes::descent(Painter &, LyXFont const & font) const
{
return font.maxDescent();
}
-#else
-int InsetQuotes::Descent(LyXFont const & font) const
-{
- return font.maxDescent();
-}
-#endif
-#ifdef USE_PAINTER
int InsetQuotes::width(Painter &, LyXFont const & font) const
{
string text = DispString();
return w;
}
-#else
-int InsetQuotes::Width(LyXFont const & font) const
-{
- string text = DispString();
- int w = 0;
-
- for (string::size_type i = 0; i < text.length(); ++i) {
- if (text[i] == ' ')
- w += font.width('i');
- else if (i == 0 || text[i] != text[i-1])
- w += font.width(text[i]);
- else
- w += font.width(',');
- }
-
- return w;
-}
-#endif
LyXFont InsetQuotes::ConvertFont(LyXFont font)
}
-#ifdef USE_PAINTER
void InsetQuotes::draw(Painter & pain, LyXFont const & font,
int baseline, float & x) const
{
pain.text(int(x), baseline, text, font);
x += width(pain, font);
}
-#else
-void InsetQuotes::Draw(LyXFont font, LyXScreen & scr,
- int baseline, float & x)
-{
- string text = DispString();
-
- scr.drawString(font, text, baseline, int(x));
- x += Width(font);
-}
-#endif
-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)