-// -*- C++ -*-
/* This file is part of
* ======================================================
*
* LyX, The Document Processor
*
- * Copyright 1998-2000 The LyX Team
+ * Copyright 1998-2001 The LyX Team
*
*======================================================*/
#include <cmath>
-#include FORMS_H_LOCATION
#include "Painter.h"
#include "LString.h"
#include "debug.h"
#include "lyxfont.h"
+#include "frontends/GUIRunTime.h"
#include "support/LAssert.h"
#include "support/lstrings.h"
#include "WorkArea.h"
Painter::Painter(WorkArea & wa)
: PainterBase(wa)
{
- display = fl_get_display();
+ display = GUIRunTime::x11Display();
}
if (!Lgb_bug_find_hack)
lyxerr << "point not called from "
"workarea::workhandler\n";
- lyxerr.debug() << "Painter drawable: "
+ lyxerr[Debug::INFO] << "Painter drawable: "
<< owner.getPixmap() << endl;
}
if (!Lgb_bug_find_hack)
lyxerr << "line not called from "
"workarea::workhandler\n";
- lyxerr.debug() << "Painter drawable: "
+ lyxerr[Debug::INFO] << "Painter drawable: "
<< owner.getPixmap() << endl;
}
if (!Lgb_bug_find_hack)
lyxerr << "lines not called from "
"workarea::workhandler\n";
- lyxerr.debug() << "Painter drawable: "
+ lyxerr[Debug::INFO] << "Painter drawable: "
<< owner.getPixmap() << endl;
}
PainterBase & Painter::text(int x, int y, string const & s, LyXFont const & f)
{
- return text(x, y, s.c_str(), s.length(), f);
+ return text(x, y, s.data(), s.length(), f);
}
}
}
}
- if (f.underbar() == LyXFont::ON && f.latex() != LyXFont::ON)
+
+ if (f.underbar() == LyXFont::ON) {
underline(f, x, y, lyxfont::width(s, ls, f));
+ }
+
return *this;
}
} else {
LyXFont smallfont(f);
smallfont.decSize().decSize().setShape(LyXFont::UP_SHAPE);
- static XChar2b c = {0, 0};
+ static XChar2b c;
int tmpx = x;
for (int i = 0; i < ls; ++i) {
if (s[i].byte1 == 0 && islower(s[i].byte2)) {
}
}
}
- if (f.underbar() == LyXFont::ON && f.latex() != LyXFont::ON)
+
+ if (f.underbar() == LyXFont::ON) {
underline(f, x, y, lyxfont::width(s, ls, f));
+ }
+
return *this;
}