<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Wt examples: /home/koen/project/wt/public-git/wt/examples/wt-homepage/Home.C Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt examples  <span id="projectnumber">3.2.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <div class="title">/home/koen/project/wt/public-git/wt/examples/wt-homepage/Home.C</div> </div> </div> <div class="contents"> <a href="Home_8C.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * See the LICENSE file for terms of use.</span> <a name="l00005"></a>00005 <span class="comment"> */</span> <a name="l00006"></a>00006 <a name="l00007"></a>00007 <span class="preprocessor">#include <fstream></span> <a name="l00008"></a>00008 <span class="preprocessor">#include <iostream></span> <a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="preprocessor">#include <boost/lexical_cast.hpp></span> <a name="l00011"></a>00011 <span class="preprocessor">#include <boost/tokenizer.hpp></span> <a name="l00012"></a>00012 <span class="preprocessor">#include <boost/algorithm/string.hpp></span> <a name="l00013"></a>00013 <a name="l00014"></a>00014 <span class="preprocessor">#include <Wt/WAnchor></span> <a name="l00015"></a>00015 <span class="preprocessor">#include <Wt/WApplication></span> <a name="l00016"></a>00016 <span class="preprocessor">#include <Wt/WEnvironment></span> <a name="l00017"></a>00017 <span class="preprocessor">#include <<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/WLogger.html">Wt/WLogger</a>></span> <a name="l00018"></a>00018 <span class="preprocessor">#include <Wt/WMenu></span> <a name="l00019"></a>00019 <span class="preprocessor">#include <Wt/WPushButton></span> <a name="l00020"></a>00020 <span class="preprocessor">#include <Wt/WStackedWidget></span> <a name="l00021"></a>00021 <span class="preprocessor">#include <Wt/WTabWidget></span> <a name="l00022"></a>00022 <span class="preprocessor">#include <Wt/WTable></span> <a name="l00023"></a>00023 <span class="preprocessor">#include <Wt/WTableCell></span> <a name="l00024"></a>00024 <span class="preprocessor">#include <Wt/WTemplate></span> <a name="l00025"></a>00025 <span class="preprocessor">#include <Wt/WText></span> <a name="l00026"></a>00026 <span class="preprocessor">#include <Wt/WViewWidget></span> <a name="l00027"></a>00027 <span class="preprocessor">#include <Wt/WVBoxLayout></span> <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="Home_8h.html">Home.h</a>"</span> <a name="l00030"></a>00030 <span class="preprocessor">#include "view/BlogView.h"</span> <a name="l00031"></a>00031 <a name="l00032"></a><a class="code" href="Home_8C.html#a423b307dcf2d1198cb3a063fb8062133">00032</a> <span class="keyword">static</span> <span class="keyword">const</span> std::string <a class="code" href="Home_8C.html#a423b307dcf2d1198cb3a063fb8062133">SRC_INTERNAL_PATH</a> = <span class="stringliteral">"src"</span>; <a name="l00033"></a>00033 <a name="l00034"></a><a class="code" href="classHome.html#a7b27d4931b4b445d279202a098a0e8fd">00034</a> <a class="code" href="classHome.html#a7b27d4931b4b445d279202a098a0e8fd">Home::~Home</a>() <a name="l00035"></a>00035 { <a name="l00036"></a>00036 } <a name="l00037"></a>00037 <a name="l00038"></a><a class="code" href="classHome.html#ae5021fb481a207618c292c81cfbe7457">00038</a> <a class="code" href="classHome.html#ae5021fb481a207618c292c81cfbe7457">Home::Home</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WEnvironment.html">WEnvironment</a>& env, <span class="keyword">const</span> std::string& title, <a name="l00039"></a>00039 <span class="keyword">const</span> std::string& resourceBundle, <span class="keyword">const</span> std::string& cssPath) <a name="l00040"></a>00040 : <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html">WApplication</a>(env), <a name="l00041"></a>00041 releases_(0), <a name="l00042"></a>00042 homePage_(0), <a name="l00043"></a>00043 sourceViewer_(0) <a name="l00044"></a>00044 { <a name="l00045"></a>00045 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a4f304244f6bc75be6cd5f41798ea5e2e">messageResourceBundle</a>().<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMessageResourceBundle.html#a01368946b2a2aaceab3a64cddb1cb1e2">use</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a88b082dadadd3fb7dbe10887e7d89c91">appRoot</a>() + resourceBundle, <span class="keyword">false</span>); <a name="l00046"></a>00046 <a name="l00047"></a>00047 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#af377d541443b4bcea5fcc40be7c70173">useStyleSheet</a>(cssPath + <span class="stringliteral">"/wt.css"</span>); <a name="l00048"></a>00048 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#af377d541443b4bcea5fcc40be7c70173">useStyleSheet</a>(cssPath + <span class="stringliteral">"/wt_ie.css"</span>, <span class="stringliteral">"lt IE 7"</span>); <a name="l00049"></a>00049 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#af377d541443b4bcea5fcc40be7c70173">useStyleSheet</a>(<span class="stringliteral">"css/home.css"</span>); <a name="l00050"></a>00050 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#af377d541443b4bcea5fcc40be7c70173">useStyleSheet</a>(<span class="stringliteral">"css/sourceview.css"</span>); <a name="l00051"></a>00051 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a71a3f7da5abb9a76df94fab69ba61670">setTitle</a>(title); <a name="l00052"></a>00052 <a name="l00053"></a>00053 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a5c9cc1350019d69f154a2b44cdaf2596">setLocale</a>(<span class="stringliteral">""</span>); <a name="l00054"></a>00054 <a class="code" href="classHome.html#a526a7423463c4662ad824b5580d7ed3e">language_</a> = 0; <a name="l00055"></a>00055 } <a name="l00056"></a>00056 <a name="l00057"></a><a class="code" href="classHome.html#a63520babce460a8f3e1c8d02eb9bc137">00057</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#a63520babce460a8f3e1c8d02eb9bc137">Home::init</a>() <a name="l00058"></a>00058 { <a name="l00059"></a>00059 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a674fd6a2522d66d07908e8f3d82424a9">internalPathChanged</a>().connect(<span class="keyword">this</span>, &<a class="code" href="classHome.html#a070118440bcd93bf8e511847c61cf97e">Home::setup</a>); <a name="l00060"></a>00060 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a674fd6a2522d66d07908e8f3d82424a9">internalPathChanged</a>().connect(<span class="keyword">this</span>, &<a class="code" href="classHome.html#ad381554da62b59ddbb9ae85b7c5ef93a">Home::setLanguageFromPath</a>); <a name="l00061"></a>00061 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a674fd6a2522d66d07908e8f3d82424a9">internalPathChanged</a>().connect(<span class="keyword">this</span>, &<a class="code" href="classHome.html#abf2e03a8963dbd0c84ad14c5f8d9244e">Home::logInternalPath</a>); <a name="l00062"></a>00062 <a name="l00063"></a>00063 <a class="code" href="classHome.html#a070118440bcd93bf8e511847c61cf97e">setup</a>(); <a name="l00064"></a>00064 <a name="l00065"></a>00065 <a class="code" href="classHome.html#ad381554da62b59ddbb9ae85b7c5ef93a">setLanguageFromPath</a>(); <a name="l00066"></a>00066 } <a name="l00067"></a>00067 <a name="l00068"></a><a class="code" href="classHome.html#a070118440bcd93bf8e511847c61cf97e">00068</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#a070118440bcd93bf8e511847c61cf97e">Home::setup</a>() <a name="l00069"></a>00069 { <a name="l00070"></a>00070 <span class="comment">/*</span> <a name="l00071"></a>00071 <span class="comment"> * This function switches between the two major components of the homepage,</span> <a name="l00072"></a>00072 <span class="comment"> * depending on the internal path:</span> <a name="l00073"></a>00073 <span class="comment"> * /src -> source viewer</span> <a name="l00074"></a>00074 <span class="comment"> * /... -> homepage</span> <a name="l00075"></a>00075 <span class="comment"> *</span> <a name="l00076"></a>00076 <span class="comment"> * FIXME: we should take into account language /cn/src ...</span> <a name="l00077"></a>00077 <span class="comment"> */</span> <a name="l00078"></a>00078 std::string base = <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a95e6b5e4dc9084d45e166264b10b3c46">internalPathNextPart</a>(<span class="stringliteral">"/"</span>); <a name="l00079"></a>00079 <a name="l00080"></a>00080 <span class="keywordflow">if</span> (base == <a class="code" href="Home_8C.html#a423b307dcf2d1198cb3a063fb8062133">SRC_INTERNAL_PATH</a>) { <a name="l00081"></a>00081 <span class="keywordflow">if</span> (!<a class="code" href="classHome.html#a81dbbcea6732bbcf70b267fc2a2083ff">sourceViewer_</a>) { <a name="l00082"></a>00082 <span class="keyword">delete</span> <a class="code" href="classHome.html#a5a9ef14d23cc67713ebf5a34633623ed">homePage_</a>; <a name="l00083"></a>00083 <a class="code" href="classHome.html#a5a9ef14d23cc67713ebf5a34633623ed">homePage_</a> = 0; <a name="l00084"></a>00084 <a name="l00085"></a>00085 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a17e118a04d962459484a12989a80bc05">root</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a608f748cbdda763f1a11556ddad9fbe1">clear</a>(); <a name="l00086"></a>00086 <a name="l00087"></a>00087 <a class="code" href="classHome.html#a81dbbcea6732bbcf70b267fc2a2083ff">sourceViewer_</a> = <a class="code" href="classHome.html#abd90cc8e49527b1c18e01f92663e4862">sourceViewer</a>(<span class="stringliteral">"/"</span> + <a class="code" href="Home_8C.html#a423b307dcf2d1198cb3a063fb8062133">SRC_INTERNAL_PATH</a> + <span class="stringliteral">"/"</span>); <a name="l00088"></a>00088 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WVBoxLayout.html">WVBoxLayout</a> *layout = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WVBoxLayout.html">WVBoxLayout</a>(); <a name="l00089"></a>00089 layout-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WLayout.html#af18bae8c743c9f9a5cabee58826ffb45">setContentsMargins</a>(0, 0, 0, 0); <a name="l00090"></a>00090 layout-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WBoxLayout.html#a7c1ec58e25d0b7add93f5f4342844db6">addWidget</a>(<a class="code" href="classHome.html#a81dbbcea6732bbcf70b267fc2a2083ff">sourceViewer_</a>); <a name="l00091"></a>00091 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a17e118a04d962459484a12989a80bc05">root</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a1c84e0ffe330d4798f0ce217f75be08c">setLayout</a>(layout); <a name="l00092"></a>00092 } <a name="l00093"></a>00093 } <span class="keywordflow">else</span> { <a name="l00094"></a>00094 <span class="keywordflow">if</span> (!<a class="code" href="classHome.html#a5a9ef14d23cc67713ebf5a34633623ed">homePage_</a>) { <a name="l00095"></a>00095 <span class="keyword">delete</span> <a class="code" href="classHome.html#a81dbbcea6732bbcf70b267fc2a2083ff">sourceViewer_</a>; <a name="l00096"></a>00096 <a class="code" href="classHome.html#a81dbbcea6732bbcf70b267fc2a2083ff">sourceViewer_</a> = 0; <a name="l00097"></a>00097 <a name="l00098"></a>00098 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a17e118a04d962459484a12989a80bc05">root</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a608f748cbdda763f1a11556ddad9fbe1">clear</a>(); <a name="l00099"></a>00099 <a name="l00100"></a>00100 <a class="code" href="classHome.html#a26ec7013c619c58952a7d9cbbad16296">createHome</a>(); <a name="l00101"></a>00101 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a17e118a04d962459484a12989a80bc05">root</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<a class="code" href="classHome.html#a5a9ef14d23cc67713ebf5a34633623ed">homePage_</a>); <a name="l00102"></a>00102 <a name="l00103"></a>00103 <a class="code" href="classHome.html#ad381554da62b59ddbb9ae85b7c5ef93a">setLanguageFromPath</a>(); <a name="l00104"></a>00104 } <a name="l00105"></a>00105 } <a name="l00106"></a>00106 } <a name="l00107"></a>00107 <a name="l00108"></a><a class="code" href="classHome.html#a26ec7013c619c58952a7d9cbbad16296">00108</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#a26ec7013c619c58952a7d9cbbad16296">Home::createHome</a>() <a name="l00109"></a>00109 { <a name="l00110"></a>00110 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html">WTemplate</a> *result = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html">WTemplate</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"template"</span>), <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a17e118a04d962459484a12989a80bc05">root</a>()); <a name="l00111"></a>00111 <a class="code" href="classHome.html#a5a9ef14d23cc67713ebf5a34633623ed">homePage_</a> = result; <a name="l00112"></a>00112 <a name="l00113"></a>00113 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a> *languagesDiv = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a>(); <a name="l00114"></a>00114 languagesDiv-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWebWidget.html#a31bbe256124dd34461800c9dd5558b0b">setId</a>(<span class="stringliteral">"top_languages"</span>); <a name="l00115"></a>00115 <a name="l00116"></a>00116 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i < <a class="code" href="classHome.html#ac50d32f527dcd701f238b4db2e0bafa0">languages</a>.size(); ++i) { <a name="l00117"></a>00117 <span class="keywordflow">if</span> (i != 0) <a name="l00118"></a>00118 <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<span class="stringliteral">"- "</span>, languagesDiv); <a name="l00119"></a>00119 <a name="l00120"></a>00120 <span class="keyword">const</span> <a class="code" href="structLang.html">Lang</a>& l = <a class="code" href="classHome.html#ac50d32f527dcd701f238b4db2e0bafa0">languages</a>[i]; <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WAnchor.html">WAnchor</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WLink.html">WLink</a>(WLink::InternalPath, l.<a class="code" href="structLang.html#ae4b25b734896099b9551d16ee49873aa">path_</a>), <a name="l00123"></a>00123 WString::fromUTF8(l.<a class="code" href="structLang.html#a199e1b44f54b75ae92224900409771ff">longDescription_</a>), languagesDiv); <a name="l00124"></a>00124 } <a name="l00125"></a>00125 <a name="l00126"></a>00126 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStackedWidget.html">WStackedWidget</a> *contents = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStackedWidget.html">WStackedWidget</a>(); <a name="l00127"></a>00127 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WAnimation.html">WAnimation</a> fade(WAnimation::Fade, WAnimation::Linear, 250); <a name="l00128"></a>00128 contents-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStackedWidget.html#a46949b8def26baae654f54e3774da80e">setTransitionAnimation</a>(fade); <a name="l00129"></a>00129 contents-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWebWidget.html#a31bbe256124dd34461800c9dd5558b0b">setId</a>(<span class="stringliteral">"main_page"</span>); <a name="l00130"></a>00130 <a name="l00131"></a>00131 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html">WMenu</a>(contents, <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912af916b7ec24727db2d972f0770170c7f5">Vertical</a>); <a name="l00132"></a>00132 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#a8bc28b9d703b93569846441213877d4f">setRenderAsList</a>(<span class="keyword">true</span>); <a name="l00133"></a>00133 <a name="l00134"></a>00134 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ad7840197cc0caf0430792b9f4a0df60d">addItem</a> <a name="l00135"></a>00135 (<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"introduction"</span>), <a class="code" href="classHome.html#a471befeff5c65714689e8ade7efdcb38">introduction</a>())-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenuItem.html#a4291756303dbf128b718679cdb907a5a">setPathComponent</a>(<span class="stringliteral">""</span>); <a name="l00136"></a>00136 <a name="l00137"></a>00137 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ad7840197cc0caf0430792b9f4a0df60d">addItem</a> <a name="l00138"></a>00138 (<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"blog"</span>), <a class="code" href="Home_8h.html#a163cca4b185f096f1744d57f32d7a0d6">deferCreate</a>(boost::bind(&<a class="code" href="classHome.html#a40445c00ba2b7a08b018291cf666f17d">Home::blog</a>, <span class="keyword">this</span>))); <a name="l00139"></a>00139 <a name="l00140"></a>00140 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ad7840197cc0caf0430792b9f4a0df60d">addItem</a> <a name="l00141"></a>00141 (<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"features"</span>), <a class="code" href="classHome.html#a5bd2b198e4e02d1f05dc85f3a13adca0">wrapView</a>(&<a class="code" href="classHome.html#a11f3739ebaf43eb01698aaef2b136a19">Home::features</a>), WMenuItem::PreLoading); <a name="l00142"></a>00142 <a name="l00143"></a>00143 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ad7840197cc0caf0430792b9f4a0df60d">addItem</a> <a name="l00144"></a>00144 (<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"documentation"</span>), <a class="code" href="classHome.html#a5bd2b198e4e02d1f05dc85f3a13adca0">wrapView</a>(&<a class="code" href="classHome.html#a4f384190a3cbf49f1fecdf3f0f33c234">Home::documentation</a>), <a name="l00145"></a>00145 WMenuItem::PreLoading); <a name="l00146"></a>00146 <a name="l00147"></a>00147 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ad7840197cc0caf0430792b9f4a0df60d">addItem</a> <a name="l00148"></a>00148 (<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"examples"</span>), <a class="code" href="classHome.html#a359a8de9caa986c141dcce1b3968b0a3">examples</a>(), <a name="l00149"></a>00149 WMenuItem::PreLoading)-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenuItem.html#a4291756303dbf128b718679cdb907a5a">setPathComponent</a>(<span class="stringliteral">"examples/"</span>); <a name="l00150"></a>00150 <a name="l00151"></a>00151 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ad7840197cc0caf0430792b9f4a0df60d">addItem</a> <a name="l00152"></a>00152 (<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"download"</span>), <a class="code" href="Home_8h.html#a163cca4b185f096f1744d57f32d7a0d6">deferCreate</a>(boost::bind(&<a class="code" href="classHome.html#a3536b47df5b4984aafb1ab219f210822">Home::download</a>, <span class="keyword">this</span>)), <a name="l00153"></a>00153 WMenuItem::PreLoading); <a name="l00154"></a>00154 <a name="l00155"></a>00155 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ad7840197cc0caf0430792b9f4a0df60d">addItem</a> <a name="l00156"></a>00156 (<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"community"</span>), <a class="code" href="classHome.html#a5bd2b198e4e02d1f05dc85f3a13adca0">wrapView</a>(&<a class="code" href="classHome.html#a4be006ace81f78b276571bcc4d7cfb46">Home::community</a>), WMenuItem::PreLoading); <a name="l00157"></a>00157 <a name="l00158"></a>00158 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ad7840197cc0caf0430792b9f4a0df60d">addItem</a> <a name="l00159"></a>00159 (<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"other-language"</span>), <a class="code" href="classHome.html#a5bd2b198e4e02d1f05dc85f3a13adca0">wrapView</a>(&<a class="code" href="classHome.html#a07340aa45ed31efb3b2d6b98f2e495ba">Home::otherLanguage</a>), <a name="l00160"></a>00160 WMenuItem::PreLoading); <a name="l00161"></a>00161 <a name="l00162"></a>00162 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#a8737f262f99d0db0a0f4b7aeb01cfe2e">itemSelectRendered</a>().connect(<span class="keyword">this</span>, &<a class="code" href="classHome.html#a6762815f91ed1f02ab35c34284a95ca9">Home::updateTitle</a>); <a name="l00163"></a>00163 <a name="l00164"></a>00164 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#a0303879705bcdd8dbffc2d1528670d20">itemSelected</a>().connect(<span class="keyword">this</span>, &<a class="code" href="classHome.html#a3c26dd54dbc1a2020776f2d6cb2aa6bf">Home::googleAnalyticsLogger</a>); <a name="l00165"></a>00165 <a name="l00166"></a>00166 <span class="comment">// Make the menu be internal-path aware.</span> <a name="l00167"></a>00167 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#ae1807eba0b1002808dbec779d00a79dc">setInternalPathEnabled</a>(<span class="stringliteral">"/"</span>); <a name="l00168"></a>00168 <a name="l00169"></a>00169 <a class="code" href="classHome.html#ab5152bb8733fe428f5d6d80d17dc42a2">sideBarContent_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a>(); <a name="l00170"></a>00170 <a name="l00171"></a>00171 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html#a49b2e1de86726ef96875a347a8d02203">bindWidget</a>(<span class="stringliteral">"languages"</span>, languagesDiv); <a name="l00172"></a>00172 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html#a49b2e1de86726ef96875a347a8d02203">bindWidget</a>(<span class="stringliteral">"menu"</span>, <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>); <a name="l00173"></a>00173 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html#a49b2e1de86726ef96875a347a8d02203">bindWidget</a>(<span class="stringliteral">"contents"</span>, contents); <a name="l00174"></a>00174 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html#a49b2e1de86726ef96875a347a8d02203">bindWidget</a>(<span class="stringliteral">"sidebar"</span>, <a class="code" href="classHome.html#ab5152bb8733fe428f5d6d80d17dc42a2">sideBarContent_</a>); <a name="l00175"></a>00175 } <a name="l00176"></a>00176 <a name="l00177"></a><a class="code" href="classHome.html#a582d22dab888b8edf9ec9988c5e36b05">00177</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#a582d22dab888b8edf9ec9988c5e36b05">Home::setLanguage</a>(<span class="keywordtype">int</span> index) <a name="l00178"></a>00178 { <a name="l00179"></a>00179 <span class="keywordflow">if</span> (<a class="code" href="classHome.html#a5a9ef14d23cc67713ebf5a34633623ed">homePage_</a>) { <a name="l00180"></a>00180 <span class="keyword">const</span> <a class="code" href="structLang.html">Lang</a>& l = <a class="code" href="classHome.html#ac50d32f527dcd701f238b4db2e0bafa0">languages</a>[index]; <a name="l00181"></a>00181 <a name="l00182"></a>00182 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a5c9cc1350019d69f154a2b44cdaf2596">setLocale</a>(l.<a class="code" href="structLang.html#ad46e6f93e1002656aca93a4e9b1d0ebc">code_</a>); <a name="l00183"></a>00183 <a name="l00184"></a>00184 std::string langPath = l.<a class="code" href="structLang.html#ae4b25b734896099b9551d16ee49873aa">path_</a>; <a name="l00185"></a>00185 <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#aa5cf3b5b9919d2f130c8acd156447132">setInternalBasePath</a>(langPath); <a name="l00186"></a>00186 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a42c7d6ad6bfc8e821e3e667467865902">setInternalBasePath</a>(langPath + <span class="stringliteral">"examples"</span>); <a name="l00187"></a>00187 BlogView *<a class="code" href="classHome.html#a40445c00ba2b7a08b018291cf666f17d">blog</a> = <span class="keyword">dynamic_cast<</span>BlogView *<span class="keyword">></span>(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a0363c673fdb4e3f2be6068c5c1139b69">findWidget</a>(<span class="stringliteral">"blog"</span>)); <a name="l00188"></a>00188 <span class="keywordflow">if</span> (blog) <a name="l00189"></a>00189 blog->setInternalBasePath(langPath + <span class="stringliteral">"blog/"</span>); <a name="l00190"></a>00190 <a class="code" href="classHome.html#a6762815f91ed1f02ab35c34284a95ca9">updateTitle</a>(); <a name="l00191"></a>00191 <a name="l00192"></a>00192 <a class="code" href="classHome.html#a526a7423463c4662ad824b5580d7ed3e">language_</a> = index; <a name="l00193"></a>00193 } <a name="l00194"></a>00194 } <a name="l00195"></a>00195 <a name="l00196"></a><a class="code" href="classHome.html#a6360a674c4d5dcc614411c283af8035b">00196</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a6360a674c4d5dcc614411c283af8035b">Home::linkSourceBrowser</a>(<span class="keyword">const</span> std::string& example) <a name="l00197"></a>00197 { <a name="l00198"></a>00198 <span class="comment">/*</span> <a name="l00199"></a>00199 <span class="comment"> * Instead of using a WAnchor, which will not progress properly because</span> <a name="l00200"></a>00200 <span class="comment"> * it is wrapped with wrapView() (-- should we not fix that?), we use</span> <a name="l00201"></a>00201 <span class="comment"> * a WText which contains an anchor, and enable internal path encoding.</span> <a name="l00202"></a>00202 <span class="comment"> */</span> <a name="l00203"></a>00203 std::string path = <span class="stringliteral">"#/"</span> + <a class="code" href="Home_8C.html#a423b307dcf2d1198cb3a063fb8062133">SRC_INTERNAL_PATH</a> + <span class="stringliteral">"/"</span> + example; <a name="l00204"></a>00204 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a> *a = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"source-browser-link"</span>).arg(path)); <a name="l00205"></a>00205 a-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html#a3491e55f74027b49aaf8cd25369bc0e4">setInternalPathEncoding</a>(<span class="keyword">true</span>); <a name="l00206"></a>00206 <span class="keywordflow">return</span> a; <a name="l00207"></a>00207 } <a name="l00208"></a>00208 <a name="l00209"></a><a class="code" href="classHome.html#ad381554da62b59ddbb9ae85b7c5ef93a">00209</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#ad381554da62b59ddbb9ae85b7c5ef93a">Home::setLanguageFromPath</a>() <a name="l00210"></a>00210 { <a name="l00211"></a>00211 std::string langPath = <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a95e6b5e4dc9084d45e166264b10b3c46">internalPathNextPart</a>(<span class="stringliteral">"/"</span>); <a name="l00212"></a>00212 <a name="l00213"></a>00213 <span class="keywordflow">if</span> (langPath.empty()) <a name="l00214"></a>00214 langPath = <span class="charliteral">'/'</span>; <a name="l00215"></a>00215 <span class="keywordflow">else</span> <a name="l00216"></a>00216 langPath = <span class="charliteral">'/'</span> + langPath + <span class="charliteral">'/'</span>; <a name="l00217"></a>00217 <a name="l00218"></a>00218 <span class="keywordtype">int</span> newLanguage = 0; <a name="l00219"></a>00219 <a name="l00220"></a>00220 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> i = 0; i < <a class="code" href="classHome.html#ac50d32f527dcd701f238b4db2e0bafa0">languages</a>.size(); ++i) { <a name="l00221"></a>00221 <span class="keywordflow">if</span> (<a class="code" href="classHome.html#ac50d32f527dcd701f238b4db2e0bafa0">languages</a>[i].path_ == langPath) { <a name="l00222"></a>00222 newLanguage = i; <a name="l00223"></a>00223 <span class="keywordflow">break</span>; <a name="l00224"></a>00224 } <a name="l00225"></a>00225 } <a name="l00226"></a>00226 <a name="l00227"></a>00227 <span class="keywordflow">if</span> (newLanguage != <a class="code" href="classHome.html#a526a7423463c4662ad824b5580d7ed3e">language_</a>) <a name="l00228"></a>00228 <a class="code" href="classHome.html#a582d22dab888b8edf9ec9988c5e36b05">setLanguage</a>(newLanguage); <a name="l00229"></a>00229 } <a name="l00230"></a>00230 <a name="l00231"></a><a class="code" href="classHome.html#a6762815f91ed1f02ab35c34284a95ca9">00231</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#a6762815f91ed1f02ab35c34284a95ca9">Home::updateTitle</a>() <a name="l00232"></a>00232 { <a name="l00233"></a>00233 <span class="keywordflow">if</span> (<a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#a4e94081f83aee45db0ffd43073f2b8ca">currentItem</a>()) { <a name="l00234"></a>00234 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a71a3f7da5abb9a76df94fab69ba61670">setTitle</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"wt"</span>) + <span class="stringliteral">" - "</span> + <a class="code" href="classHome.html#aaf48ed4f0046a83106757460964042be">mainMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenu.html#a4e94081f83aee45db0ffd43073f2b8ca">currentItem</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenuItem.html#a2061c3c242e98e53c820bfa500db492c">text</a>()); <a name="l00235"></a>00235 } <a name="l00236"></a>00236 } <a name="l00237"></a>00237 <a name="l00238"></a><a class="code" href="classHome.html#abf2e03a8963dbd0c84ad14c5f8d9244e">00238</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#abf2e03a8963dbd0c84ad14c5f8d9244e">Home::logInternalPath</a>(<span class="keyword">const</span> std::string& path) <a name="l00239"></a>00239 { <a name="l00240"></a>00240 <span class="comment">// simulate an access log for the interal paths</span> <a name="l00241"></a>00241 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a75067771ba8fcc56e174f2e741ce278f">log</a>(<span class="stringliteral">"path"</span>) << path; <a name="l00242"></a>00242 <a name="l00243"></a>00243 <span class="comment">// If this goes to /src, we need to invoke google analytics method too</span> <a name="l00244"></a>00244 <span class="keywordflow">if</span> (path.size() >= 4 && path.substr(0, 4) == <span class="stringliteral">"/src"</span>) { <a name="l00245"></a>00245 <a class="code" href="classHome.html#a3c26dd54dbc1a2020776f2d6cb2aa6bf">googleAnalyticsLogger</a>(); <a name="l00246"></a>00246 } <a name="l00247"></a>00247 } <a name="l00248"></a>00248 <a name="l00249"></a><a class="code" href="classHome.html#a471befeff5c65714689e8ade7efdcb38">00249</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a471befeff5c65714689e8ade7efdcb38">Home::introduction</a>() <a name="l00250"></a>00250 { <a name="l00251"></a>00251 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.intro"</span>)); <a name="l00252"></a>00252 } <a name="l00253"></a>00253 <a name="l00254"></a><a class="code" href="classHome.html#a40445c00ba2b7a08b018291cf666f17d">00254</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a40445c00ba2b7a08b018291cf666f17d">Home::blog</a>() <a name="l00255"></a>00255 { <a name="l00256"></a>00256 <span class="keyword">const</span> <a class="code" href="structLang.html">Lang</a>& l = <a class="code" href="classHome.html#ac50d32f527dcd701f238b4db2e0bafa0">languages</a>[<a class="code" href="classHome.html#a526a7423463c4662ad824b5580d7ed3e">language_</a>]; <a name="l00257"></a>00257 std::string langPath = l.<a class="code" href="structLang.html#ae4b25b734896099b9551d16ee49873aa">path_</a>; <a name="l00258"></a>00258 BlogView *<a class="code" href="classHome.html#a40445c00ba2b7a08b018291cf666f17d">blog</a> = <span class="keyword">new</span> BlogView(langPath + <span class="stringliteral">"blog/"</span>, <a name="l00259"></a>00259 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a88b082dadadd3fb7dbe10887e7d89c91">appRoot</a>() + <span class="stringliteral">"blog.db"</span>, <span class="stringliteral">"/wt/blog/feed/"</span>); <a name="l00260"></a>00260 blog->setObjectName(<span class="stringliteral">"blog"</span>); <a name="l00261"></a>00261 <a name="l00262"></a>00262 <span class="keywordflow">if</span> (!blog->user().empty()) <a name="l00263"></a>00263 <a class="code" href="classHome.html#ae59d96c040a01d1297dc55a882ffb8e6">chatSetUser</a>(blog->user()); <a name="l00264"></a>00264 <a name="l00265"></a>00265 blog->userChanged().connect(<span class="keyword">this</span>, &<a class="code" href="classHome.html#ae59d96c040a01d1297dc55a882ffb8e6">Home::chatSetUser</a>); <a name="l00266"></a>00266 <a name="l00267"></a>00267 <span class="keywordflow">return</span> <a class="code" href="classHome.html#a40445c00ba2b7a08b018291cf666f17d">blog</a>; <a name="l00268"></a>00268 } <a name="l00269"></a>00269 <a name="l00270"></a><a class="code" href="classHome.html#ae59d96c040a01d1297dc55a882ffb8e6">00270</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#ae59d96c040a01d1297dc55a882ffb8e6">Home::chatSetUser</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WString.html">WString</a>& userName) <a name="l00271"></a>00271 { <a name="l00272"></a>00272 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a38d922da0a0d83395519f3eaab85d0f6">WApplication::instance</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a2a92457b9212cef4057cb54e56183967">doJavaScript</a> <a name="l00273"></a>00273 (<span class="stringliteral">"if (window.chat) "</span> <a name="l00274"></a>00274 <span class="stringliteral">"try {"</span> <a name="l00275"></a>00275 <span class="stringliteral">""</span><span class="stringliteral">"window.chat.emit(window.chat, 'login', "</span> <a name="l00276"></a>00276 <span class="stringliteral">""</span> <span class="stringliteral">""</span> + userName.<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WString.html#abcdf277c20807ab963effd7e54732fa8">jsStringLiteral</a>() + <span class="stringliteral">"); "</span> <a name="l00277"></a>00277 <span class="stringliteral">"} catch (e) {"</span> <a name="l00278"></a>00278 <span class="stringliteral">""</span><span class="stringliteral">"window.chatUser = "</span> + userName.<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WString.html#abcdf277c20807ab963effd7e54732fa8">jsStringLiteral</a>() + <span class="stringliteral">";"</span> <a name="l00279"></a>00279 <span class="stringliteral">"}"</span> <a name="l00280"></a>00280 <span class="stringliteral">"else "</span> <a name="l00281"></a>00281 <span class="stringliteral">""</span><span class="stringliteral">"window.chatUser = "</span> + userName.<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WString.html#abcdf277c20807ab963effd7e54732fa8">jsStringLiteral</a>() + <span class="stringliteral">";"</span>); <a name="l00282"></a>00282 } <a name="l00283"></a>00283 <a name="l00284"></a><a class="code" href="classHome.html#a0cc1b83013ca364378ebf7e548f6e34a">00284</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a0cc1b83013ca364378ebf7e548f6e34a">Home::status</a>() <a name="l00285"></a>00285 { <a name="l00286"></a>00286 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.status"</span>)); <a name="l00287"></a>00287 } <a name="l00288"></a>00288 <a name="l00289"></a><a class="code" href="classHome.html#a11f3739ebaf43eb01698aaef2b136a19">00289</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a11f3739ebaf43eb01698aaef2b136a19">Home::features</a>() <a name="l00290"></a>00290 { <a name="l00291"></a>00291 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.features"</span>)); <a name="l00292"></a>00292 } <a name="l00293"></a>00293 <a name="l00294"></a><a class="code" href="classHome.html#a4f384190a3cbf49f1fecdf3f0f33c234">00294</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a4f384190a3cbf49f1fecdf3f0f33c234">Home::documentation</a>() <a name="l00295"></a>00295 { <a name="l00296"></a>00296 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a> *result = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.documentation"</span>)); <a name="l00297"></a>00297 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html#a3491e55f74027b49aaf8cd25369bc0e4">setInternalPathEncoding</a>(<span class="keyword">true</span>); <a name="l00298"></a>00298 <span class="keywordflow">return</span> result; <a name="l00299"></a>00299 } <a name="l00300"></a>00300 <a name="l00301"></a><a class="code" href="classHome.html#a07340aa45ed31efb3b2d6b98f2e495ba">00301</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a07340aa45ed31efb3b2d6b98f2e495ba">Home::otherLanguage</a>() <a name="l00302"></a>00302 { <a name="l00303"></a>00303 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.other-language"</span>)); <a name="l00304"></a>00304 } <a name="l00305"></a>00305 <a name="l00306"></a><a class="code" href="classHome.html#a5bd2b198e4e02d1f05dc85f3a13adca0">00306</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a5bd2b198e4e02d1f05dc85f3a13adca0">Home::wrapView</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *(<a class="code" href="classHome.html">Home</a>::*<a class="code" href="group__chatexample.html#gabf00719b4e042ae3ee5676d30791ace0">createWidget</a>)()) <a name="l00307"></a>00307 { <a name="l00308"></a>00308 <span class="keywordflow">return</span> makeStaticModel(boost::bind(createWidget, <span class="keyword">this</span>)); <a name="l00309"></a>00309 } <a name="l00310"></a>00310 <a name="l00311"></a><a class="code" href="classHome.html#a4c6b5887e984c16b88385e83805c28a2">00311</a> std::string <a class="code" href="classHome.html#a4c6b5887e984c16b88385e83805c28a2">Home::href</a>(<span class="keyword">const</span> std::string& url, <span class="keyword">const</span> std::string& description) <a name="l00312"></a>00312 { <a name="l00313"></a>00313 <span class="keywordflow">return</span> <span class="stringliteral">"<a href=\""</span> + url + <span class="stringliteral">"\" target=\"_blank\">"</span> + description + <span class="stringliteral">"</a>"</span>; <a name="l00314"></a>00314 } <a name="l00315"></a>00315 <a name="l00316"></a><a class="code" href="classHome.html#a4be006ace81f78b276571bcc4d7cfb46">00316</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a4be006ace81f78b276571bcc4d7cfb46">Home::community</a>() <a name="l00317"></a>00317 { <a name="l00318"></a>00318 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.community"</span>)); <a name="l00319"></a>00319 } <a name="l00320"></a>00320 <a name="l00321"></a><a class="code" href="classHome.html#aafa9b1d1821f2501c80eb6666b54e90e">00321</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#aafa9b1d1821f2501c80eb6666b54e90e">Home::readReleases</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html">WTable</a> *releaseTable) <a name="l00322"></a>00322 { <a name="l00323"></a>00323 std::ifstream f((<a class="code" href="classHome.html#a7e96a995cdb7d825dad505eaf976022c">filePrefix</a>() + <span class="stringliteral">"releases.txt"</span>).c_str()); <a name="l00324"></a>00324 <a name="l00325"></a>00325 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#a431d6a3da63ab9696e084ad7c2438afb">clear</a>(); <a name="l00326"></a>00326 <a name="l00327"></a>00327 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#ac4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 0) <a name="l00328"></a>00328 -><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.download.version"</span>))); <a name="l00329"></a>00329 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#ac4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 1) <a name="l00330"></a>00330 -><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.download.date"</span>))); <a name="l00331"></a>00331 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#ac4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 2) <a name="l00332"></a>00332 -><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.download.description"</span>))); <a name="l00333"></a>00333 <a name="l00334"></a>00334 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#ac4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 0)-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWebWidget.html#a4762c1aa0b5788e54a52270674f21e23">resize</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WLength.html">WLength</a>(15, WLength::FontEx), <a name="l00335"></a>00335 WLength::Auto); <a name="l00336"></a>00336 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#ac4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(0, 1)-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWebWidget.html#a4762c1aa0b5788e54a52270674f21e23">resize</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WLength.html">WLength</a>(15, WLength::FontEx), <a name="l00337"></a>00337 WLength::Auto); <a name="l00338"></a>00338 <a name="l00339"></a>00339 <span class="keywordtype">int</span> row = 1; <a name="l00340"></a>00340 <a name="l00341"></a>00341 <span class="keywordflow">while</span> (f) { <a name="l00342"></a>00342 std::string line; <a name="l00343"></a>00343 getline(f, line); <a name="l00344"></a>00344 <a name="l00345"></a>00345 <span class="keywordflow">if</span> (f) { <a name="l00346"></a>00346 <span class="keyword">typedef</span> boost::tokenizer<boost::escaped_list_separator<char> > <a name="l00347"></a>00347 CsvTokenizer; <a name="l00348"></a>00348 CsvTokenizer tok(line); <a name="l00349"></a>00349 <a name="l00350"></a>00350 CsvTokenizer::iterator i=tok.begin(); <a name="l00351"></a>00351 <a name="l00352"></a>00352 std::string fileName = *i; <a name="l00353"></a>00353 std::string description = *(++i); <a name="l00354"></a>00354 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#ac4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(row, 0)-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a> <a name="l00355"></a>00355 (<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a4c6b5887e984c16b88385e83805c28a2">href</a>(<span class="stringliteral">"http://prdownloads.sourceforge.net/witty/"</span> <a name="l00356"></a>00356 + fileName + <span class="stringliteral">"?download"</span>, description))); <a name="l00357"></a>00357 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#ac4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(row, 1)-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(*(++i))); <a name="l00358"></a>00358 releaseTable-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html#ac4b59af9a44e185edb14e7f1f439d6c4">elementAt</a>(row, 2)-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(*(++i))); <a name="l00359"></a>00359 <a name="l00360"></a>00360 ++row; <a name="l00361"></a>00361 } <a name="l00362"></a>00362 } <a name="l00363"></a>00363 } <a name="l00364"></a>00364 <a name="l00365"></a>00365 <span class="preprocessor">#ifdef WT_EMWEB_BUILD</span> <a name="l00366"></a>00366 <span class="preprocessor"></span><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#add9b5fae03ff6dfc6220e853cd21e209">Home::quoteForm</a>() <a name="l00367"></a>00367 { <a name="l00368"></a>00368 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a> *result = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a>(); <a name="l00369"></a>00369 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWebWidget.html#afd3a3b359681111460a93d13979d17dd">setStyleClass</a>(<span class="stringliteral">"quote"</span>); <a name="l00370"></a>00370 <a name="l00371"></a>00371 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html">WTemplate</a> *requestTemplate = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html">WTemplate</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"quote.request"</span>), result); <a name="l00372"></a>00372 <a name="l00373"></a>00373 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a> *quoteButton = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"quote.requestbutton"</span>)); <a name="l00374"></a>00374 requestTemplate-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTemplate.html#a49b2e1de86726ef96875a347a8d02203">bindWidget</a>(<span class="stringliteral">"button"</span>, quoteButton); <a name="l00375"></a>00375 <a name="l00376"></a>00376 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#add9b5fae03ff6dfc6220e853cd21e209">quoteForm</a> = <a class="code" href="classHome.html#a6c03aafecae7c54dae30981a3fb29a65">createQuoteForm</a>(); <a name="l00377"></a>00377 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(quoteForm); <a name="l00378"></a>00378 <a name="l00379"></a>00379 quoteButton-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(quoteForm, &WWidget::show); <a name="l00380"></a>00380 quoteButton-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(requestTemplate, &WWidget::hide); <a name="l00381"></a>00381 <a name="l00382"></a>00382 quoteForm-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>(); <a name="l00383"></a>00383 <a name="l00384"></a>00384 <span class="keywordflow">return</span> result; <a name="l00385"></a>00385 } <a name="l00386"></a>00386 <span class="preprocessor">#endif // WT_EMWEB_BUILD</span> <a name="l00387"></a>00387 <span class="preprocessor"></span> <a name="l00388"></a><a class="code" href="classHome.html#a3536b47df5b4984aafb1ab219f210822">00388</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classHome.html#a3536b47df5b4984aafb1ab219f210822">Home::download</a>() <a name="l00389"></a>00389 { <a name="l00390"></a>00390 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a> *result = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a>(); <a name="l00391"></a>00391 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.download"</span>))); <a name="l00392"></a>00392 <a name="l00393"></a>00393 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.download.license"</span>))); <a name="l00394"></a>00394 <a name="l00395"></a>00395 <span class="preprocessor">#ifdef WT_EMWEB_BUILD</span> <a name="l00396"></a>00396 <span class="preprocessor"></span> result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<a class="code" href="classHome.html#add9b5fae03ff6dfc6220e853cd21e209">quoteForm</a>()); <a name="l00397"></a>00397 <span class="preprocessor">#endif // WT_EMWEB_BUILD</span> <a name="l00398"></a>00398 <span class="preprocessor"></span> <a name="l00399"></a>00399 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.download.packages"</span>))); <a name="l00400"></a>00400 <a name="l00401"></a>00401 <a class="code" href="classHome.html#a31eeca8eae96be5b0b1d53ef96a3b4b7">releases_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTable.html">WTable</a>(); <a name="l00402"></a>00402 <a class="code" href="classHome.html#aafa9b1d1821f2501c80eb6666b54e90e">readReleases</a>(<a class="code" href="classHome.html#a31eeca8eae96be5b0b1d53ef96a3b4b7">releases_</a>); <a name="l00403"></a>00403 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<a class="code" href="classHome.html#a31eeca8eae96be5b0b1d53ef96a3b4b7">releases_</a>); <a name="l00404"></a>00404 <a name="l00405"></a>00405 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>(<a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"home.download.other"</span>))); <a name="l00406"></a>00406 <a name="l00407"></a>00407 <span class="keywordflow">return</span> result; <a name="l00408"></a>00408 } <a name="l00409"></a>00409 <a name="l00410"></a>00410 <a name="l00411"></a><a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">00411</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WString.html">WString</a> <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">Home::tr</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *key) <a name="l00412"></a>00412 { <a name="l00413"></a>00413 <span class="keywordflow">return</span> <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">WString::tr</a>(key); <a name="l00414"></a>00414 } <a name="l00415"></a>00415 <a name="l00416"></a><a class="code" href="classHome.html#a3c26dd54dbc1a2020776f2d6cb2aa6bf">00416</a> <span class="keywordtype">void</span> <a class="code" href="classHome.html#a3c26dd54dbc1a2020776f2d6cb2aa6bf">Home::googleAnalyticsLogger</a>() <a name="l00417"></a>00417 { <a name="l00418"></a>00418 std::string googleCmd = <a name="l00419"></a>00419 <span class="stringliteral">"if (window.pageTracker) {"</span> <a name="l00420"></a>00420 <span class="stringliteral">""</span><span class="stringliteral">"try {"</span> <a name="l00421"></a>00421 <span class="stringliteral">""</span> <span class="stringliteral">"setTimeout(function() {"</span> <a name="l00422"></a>00422 <span class="stringliteral">""</span> <span class="stringliteral">"window.pageTracker._trackPageview(\""</span> <a name="l00423"></a>00423 + <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a19f3b913f4bc2f69761d9a3738bf142b">environment</a>().<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WEnvironment.html#aa6c6f66f82b2c6f08317366882d9b827">deploymentPath</a>() + <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#aab6320ecdd0e8e4026e9ef1aca710ca5">internalPath</a>() + <span class="stringliteral">"\");"</span> <a name="l00424"></a>00424 <span class="stringliteral">""</span> <span class="stringliteral">"}, 1000);"</span> <a name="l00425"></a>00425 <span class="stringliteral">""</span><span class="stringliteral">"} catch (e) { }"</span> <a name="l00426"></a>00426 <span class="stringliteral">"}"</span>; <a name="l00427"></a>00427 <a name="l00428"></a>00428 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html#a2a92457b9212cef4057cb54e56183967">doJavaScript</a>(googleCmd); <a name="l00429"></a>00429 } <a name="l00430"></a>00430 </pre></div></div> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>