-namespace lyx {
-namespace frontend {
-
-// FIXME: The SplashScreen should be transfered to the
-// LyXView and create a WorkArea only when a new buffer exists. This
-// will allow to call WorkArea::redraw() in the constructor.
-class SplashScreen : boost::noncopyable, boost::signals::trackable {
-public:
- /// This is a singleton class. Get the instance.
- static SplashScreen const & get();
- ///
- lyx::graphics::Image const * image() const { return loader_.image(); }
- ///
- string const & text() const { return text_; }
- ///
- LyXFont const & font() const { return font_; }
- ///
- void connect(lyx::graphics::Loader::slot_type const & slot) const {
- loader_.connect(slot);
- }
- ///
- void startLoading() const {
- if (loader_.status() == lyx::graphics::WaitingToLoad)
- loader_.startLoading();
- }
-
-private:
- /** Make the c-tor private so we can control how many objects
- * are instantiated.
- */
- SplashScreen();
-
- ///
- lyx::graphics::Loader loader_;
- /// The text to be written on top of the pixmap
- string const text_;
- /// in this font...
- LyXFont font_;
-};
-
-
-SplashScreen const & SplashScreen::get()
-{
- static SplashScreen singleton;
- return singleton;
-}
-
-
-SplashScreen::SplashScreen()
- : text_(lyx_version ? lyx_version : "unknown")
-{
- if (!lyxrc.show_banner)
- return;
-
- string const file = libFileSearch("images", "banner", "ppm");
- if (file.empty())
- return;
-
- // The font used to display the version info
- font_.setFamily(LyXFont::SANS_FAMILY);
- font_.setSeries(LyXFont::BOLD_SERIES);
- font_.setSize(LyXFont::SIZE_NORMAL);
- font_.setColor(LColor::yellow);
-
- // Load up the graphics file
- loader_.reset(file);
-}
-