mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-21 07:12:10 +00:00
Virtual code for the splash screen and a suggestion that this isn't the
best way to proceed after all. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4460 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b4e8957abb
commit
e64503b8c2
@ -27,6 +27,7 @@ using std::min;
|
||||
using std::max;
|
||||
using std::endl;
|
||||
|
||||
|
||||
LyXScreen::LyXScreen()
|
||||
: force_clear_(true), cursor_visible_(false)
|
||||
{
|
||||
@ -296,18 +297,42 @@ void LyXScreen::greyOut()
|
||||
workarea().workHeight(),
|
||||
LColor::bottomarea);
|
||||
|
||||
/* FIXME: pending GUIIzation / cleanup of graphics cache
|
||||
We should be using :
|
||||
|
||||
static GImage splash(LibFileSearch(...));
|
||||
workarea().getPainter().image(splash);
|
||||
|
||||
or similar.
|
||||
*/
|
||||
// FIXME: pending GUIIzation / cleanup of graphics cache.
|
||||
// We should be using something like this.
|
||||
#if 0
|
||||
static bool first = true;
|
||||
if (first) {
|
||||
first = false;
|
||||
|
||||
splash_file_ = (lyxrc.show_banner) ?
|
||||
LibFileSearch("images", "banner", "xpm") : string();
|
||||
if (splash_file_) {
|
||||
grfx::GCache & gc = grfx::GCache::get();
|
||||
gc.add(splash_file_);
|
||||
gc.startLoading(splash_file_);
|
||||
}
|
||||
}
|
||||
|
||||
// Add a splash screen to the centre of the work area
|
||||
string const splash_file = LibFileSearch("images", "banner", "xpm");
|
||||
grfx::GCache & gc = grfx::GCache::get();
|
||||
grfx::ImagePtr const splash = gc.image(splash_file_);
|
||||
if (splash.get()) {
|
||||
int const w = splash->getWidth();
|
||||
int const h = splash->getHeight();
|
||||
|
||||
int const x = 0.5 * (workarea().workWidth() - w);
|
||||
int const y = 0.5 * (workarea().workHeight() - h);
|
||||
|
||||
workarea().getPainter().image(x, y, w, h, splash->getPixmap());
|
||||
}
|
||||
#endif
|
||||
// Alternatively, we should compile this into the code.
|
||||
// I think that that is better here (so that the pixmap is displayed on
|
||||
// start-up).
|
||||
// Would need a new method
|
||||
// virtual Pixmap splashPixmap() = 0;
|
||||
// or some such.
|
||||
// Angus 21 June 2002
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user