From eee2da435552fc5b70f72263de68259e064f8ca1 Mon Sep 17 00:00:00 2001 From: sergeynikitin Date: Sun, 27 Dec 2009 12:20:05 +0000 Subject: [PATCH] git-svn-id: svn://ultimatepp.org/upp/trunk@1847 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/SplashSV/SplashSV.upp | 5 ++ bazaar/SplashSV/init | 3 ++ bazaar/SplashSV/splash-sv-init.h | 5 ++ bazaar/SplashSV/splash-sv.cpp | 92 ++++++++++++++++++++++++++++++++ bazaar/SplashSV/splash-sv.h | 29 ++++++++++ 5 files changed, 134 insertions(+) create mode 100644 bazaar/SplashSV/SplashSV.upp create mode 100644 bazaar/SplashSV/init create mode 100644 bazaar/SplashSV/splash-sv-init.h create mode 100644 bazaar/SplashSV/splash-sv.cpp create mode 100644 bazaar/SplashSV/splash-sv.h diff --git a/bazaar/SplashSV/SplashSV.upp b/bazaar/SplashSV/SplashSV.upp new file mode 100644 index 000000000..af03259f1 --- /dev/null +++ b/bazaar/SplashSV/SplashSV.upp @@ -0,0 +1,5 @@ +file + splash-sv.h, + splash-sv-init.h, + splash-sv.cpp; + diff --git a/bazaar/SplashSV/init b/bazaar/SplashSV/init new file mode 100644 index 000000000..074f6bec0 --- /dev/null +++ b/bazaar/SplashSV/init @@ -0,0 +1,3 @@ +#ifndef _SplashSV_icpp_init_stub +#define _SplashSV_icpp_init_stub +#endif diff --git a/bazaar/SplashSV/splash-sv-init.h b/bazaar/SplashSV/splash-sv-init.h new file mode 100644 index 000000000..bbfa7fd87 --- /dev/null +++ b/bazaar/SplashSV/splash-sv-init.h @@ -0,0 +1,5 @@ + SetSplashQtf((String)(SPLASHQTF)); + SetSplashLogo(SPLASH_LOGO_NATIVE,SPLASH_LOGO_INTERNATIONAL); + SetSplashNativeLang(SPLASH_NATIVE_LANG); + ShowSplash(); + diff --git a/bazaar/SplashSV/splash-sv.cpp b/bazaar/SplashSV/splash-sv.cpp new file mode 100644 index 000000000..b68800d87 --- /dev/null +++ b/bazaar/SplashSV/splash-sv.cpp @@ -0,0 +1,92 @@ +#include +#include +#include "splash-sv.h" +//#include "PrintProject.h" + + +static String splashqtf; +static Image logoNative; +static Image logoInternational; + +String native_lang; +Label* SplashStatusPtr; +Size SplashScreen(Ctrl& parent, Array& ctrl) +{ + Image logo; + if(ToLower(LNGAsText(GetSystemLNG()& 0xfffff))==native_lang) + logo = logoNative; + else + logo = logoInternational; + + Size isz = logo.GetSize(); + + ImageCtrl& l = ctrl.Create(); + l.SetImage(logo); + Size sz = Size(isz.cx, isz.cy + 260); + parent.Add(ctrl.Create().Color(White).SizePos()); + parent.Add(l.TopPos(0, isz.cy).LeftPos(0, isz.cx)); + + RichTextView& w = ctrl.Create(); + SetLanguage(GetSystemLNG()& 0xfffff); + + Topic t; + t = GetTopic(splashqtf+"$"+ ToLower(LNGAsText(GetSystemLNG()& 0xfffff))); + if (t.text.IsEmpty()) { + t = GetTopic(splashqtf+"$en-us"); + } + w.SetQTF(t); + w.PageWidth(3900); + w.NoSb(); + w.SetFrame(NullFrame()); + parent.Add(w.TopPos(isz.cy , 240).LeftPos(0, isz.cx)); + + Label& SplashStatus=ctrl.Create