<!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/JWtHome.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/JWtHome.C</div> </div> </div> <div class="contents"> <a href="JWtHome_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) 2009 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 "<a class="code" href="JWtHome_8h.html">JWtHome.h</a>"</span> <a name="l00008"></a>00008 <a name="l00009"></a>00009 <span class="preprocessor">#ifdef WT_EMWEB_BUILD</span> <a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#include "QuoteForm.h"</span> <a name="l00011"></a>00011 <span class="preprocessor">#endif // WT_EMWEB_BUILD</span> <a name="l00012"></a>00012 <span class="preprocessor"></span> <a name="l00013"></a>00013 <span class="preprocessor">#include <Wt/WText></span> <a name="l00014"></a>00014 <span class="preprocessor">#include <Wt/WAnchor></span> <a name="l00015"></a>00015 <span class="preprocessor">#include <Wt/WStackedWidget></span> <a name="l00016"></a>00016 <span class="preprocessor">#include <Wt/WTreeNode></span> <a name="l00017"></a>00017 <span class="preprocessor">#include <Wt/WWidget></span> <a name="l00018"></a>00018 <span class="preprocessor">#include <Wt/WViewWidget></span> <a name="l00019"></a>00019 <span class="preprocessor">#include <Wt/WTabWidget></span> <a name="l00020"></a>00020 <span class="preprocessor">#include <Wt/WMenuItem></span> <a name="l00021"></a>00021 <span class="preprocessor">#include <Wt/WTable></span> <a name="l00022"></a>00022 <span class="preprocessor">#include <Wt/WEnvironment></span> <a name="l00023"></a>00023 <span class="preprocessor">#include <<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/WLogger.html">Wt/WLogger</a>></span> <a name="l00024"></a>00024 <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="ExampleSourceViewer_8h.html">ExampleSourceViewer.h</a>"</span> <a name="l00026"></a>00026 <a name="l00027"></a><a class="code" href="classJWtHome.html#ac59b9d27833b280f5f308157f34359c1">00027</a> <a class="code" href="classJWtHome.html#ac59b9d27833b280f5f308157f34359c1">JWtHome::JWtHome</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WEnvironment.html">WEnvironment</a>& env) <a name="l00028"></a>00028 : <a class="code" href="classHome.html">Home</a>(env, <a name="l00029"></a>00029 <span class="stringliteral">"JWt, Java Web Toolkit"</span>, <a name="l00030"></a>00030 <span class="stringliteral">"jwt-home"</span>, <span class="stringliteral">"css/jwt"</span>) <a name="l00031"></a>00031 { <a name="l00032"></a>00032 <a class="code" href="classHome.html#a36ac9d0c0798abaa419790c4888686b0">addLanguage</a>(<a class="code" href="structLang.html">Lang</a>(<span class="stringliteral">"en"</span>, <span class="stringliteral">"/"</span>, <span class="stringliteral">"en"</span>, <span class="stringliteral">"English"</span>)); <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="keywordtype">char</span>* jwtExamplePath = getenv(<span class="stringliteral">"JWT_EXAMPLE_PATH"</span>); <a name="l00035"></a>00035 <span class="keywordflow">if</span> (jwtExamplePath) <a name="l00036"></a>00036 <a class="code" href="classJWtHome.html#a59bcdcf45b406686a4783307047223eb">jwtExamplePath_</a> = jwtExamplePath; <a name="l00037"></a>00037 <span class="keywordflow">else</span> <a name="l00038"></a>00038 <a class="code" href="classJWtHome.html#a59bcdcf45b406686a4783307047223eb">jwtExamplePath_</a> = <span class="stringliteral">"/home/pieter/projects/jwt/wt-port/java/examples/"</span>; <a name="l00039"></a>00039 <a name="l00040"></a>00040 <a class="code" href="classHome.html#a63520babce460a8f3e1c8d02eb9bc137">init</a>(); <a name="l00041"></a>00041 } <a name="l00042"></a>00042 <a name="l00043"></a><a class="code" href="classJWtHome.html#a042af716e35e7f212acdf33bb91661a3">00043</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a042af716e35e7f212acdf33bb91661a3">JWtHome::examples</a>() <a name="l00044"></a>00044 { <a name="l00045"></a>00045 <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="l00046"></a>00046 <a name="l00047"></a>00047 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a> *intro = <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.examples"</span>)); <a name="l00048"></a>00048 intro-><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="l00049"></a>00049 result-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">addWidget</a>(intro); <a name="l00050"></a>00050 <a name="l00051"></a>00051 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a> = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html">WTabWidget</a>(result); <a name="l00052"></a>00052 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WAnimation.html">WAnimation</a> animation(WAnimation::SlideInFromRight, WAnimation::EaseIn); <a name="l00053"></a>00053 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a168ee0826c0bc38e6d2a5c1b5f5c0630">contentsStack</a>()-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStackedWidget.html#a46949b8def26baae654f54e3774da80e">setTransitionAnimation</a>(animation, <span class="keyword">true</span>); <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="comment">/*</span> <a name="l00056"></a>00056 <span class="comment"> * The following code is functionally equivalent to:</span> <a name="l00057"></a>00057 <span class="comment"> *</span> <a name="l00058"></a>00058 <span class="comment"> * examplesMenu_->addTab(helloWorldExample(), "Hello world");</span> <a name="l00059"></a>00059 <span class="comment"> *</span> <a name="l00060"></a>00060 <span class="comment"> * However, we optimize here for memory consumption (it is a homepage</span> <a name="l00061"></a>00061 <span class="comment"> * after all, and we hope to be slashdotted some day)</span> <a name="l00062"></a>00062 <span class="comment"> *</span> <a name="l00063"></a>00063 <span class="comment"> * Therefore, we wrap all the static content (including the tree</span> <a name="l00064"></a>00064 <span class="comment"> * widgets), into WViewWidgets with static models. In this way the</span> <a name="l00065"></a>00065 <span class="comment"> * widgets are not actually stored in memory on the server.</span> <a name="l00066"></a>00066 <span class="comment"> */</span> <a name="l00067"></a>00067 <a name="l00068"></a>00068 <span class="comment">// The call ->setPathComponent() is to use "/examples/" instead of</span> <a name="l00069"></a>00069 <span class="comment">// "/examples/hello_world" as internal path</span> <a name="l00070"></a>00070 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a8f5bea792ccb3487fb2f3a9258463b3f">addTab</a>(<a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">wrapView</a>(&<a class="code" href="classJWtHome.html#a8e24c42136de12d131cf580da956f6a5">JWtHome::helloWorldExample</a>), <a name="l00071"></a>00071 <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"hello-world"</span>))-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMenuItem.html#a4291756303dbf128b718679cdb907a5a">setPathComponent</a>(<span class="stringliteral">""</span>); <a name="l00072"></a>00072 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a8f5bea792ccb3487fb2f3a9258463b3f">addTab</a>(<a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">wrapView</a>(&<a class="code" href="classJWtHome.html#a2097dbe6ba63b217e3407284f9e65181">JWtHome::chartExample</a>), <a name="l00073"></a>00073 <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"charts"</span>)); <a name="l00074"></a>00074 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a8f5bea792ccb3487fb2f3a9258463b3f">addTab</a>(<a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">wrapView</a>(&<a class="code" href="classJWtHome.html#a4c4c5838d5168e5abade75821786f23a">JWtHome::treeviewExample</a>), <a name="l00075"></a>00075 <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"treeview"</span>)); <a name="l00076"></a>00076 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a8f5bea792ccb3487fb2f3a9258463b3f">addTab</a>(<a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">wrapView</a>(&<a class="code" href="classJWtHome.html#a07bab7a78c177f8f04c7293735c7e618">JWtHome::composerExample</a>), <a name="l00077"></a>00077 <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"mail-composer"</span>)); <a name="l00078"></a>00078 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a8f5bea792ccb3487fb2f3a9258463b3f">addTab</a>(<a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">wrapView</a>(&<a class="code" href="classJWtHome.html#a81c01ebd07bee37195e762ea292e5216">JWtHome::chatExample</a>), <a name="l00079"></a>00079 <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"chat"</span>)); <a name="l00080"></a>00080 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a8f5bea792ccb3487fb2f3a9258463b3f">addTab</a>(<a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">wrapView</a>(&<a class="code" href="classJWtHome.html#a158c10cd1a7866ae985112a9f805509e">JWtHome::figtreeExample</a>), <a name="l00081"></a>00081 <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"figtree"</span>)); <a name="l00082"></a>00082 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a8f5bea792ccb3487fb2f3a9258463b3f">addTab</a>(<a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">wrapView</a>(&<a class="code" href="classJWtHome.html#ac82245a8839dc99f781568cefd7971cd">JWtHome::widgetGalleryExample</a>), <a name="l00083"></a>00083 <a class="code" href="classHome.html#a7c8a4abe8f7ade4407333aaaee98c57e">tr</a>(<span class="stringliteral">"widget-gallery"</span>)); <a name="l00084"></a>00084 <a name="l00085"></a>00085 <span class="comment">// Enable internal paths for the example menu</span> <a name="l00086"></a>00086 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a855b45897b00f82137cd0eb9e0d40dfd">setInternalPathEnabled</a>(<span class="stringliteral">"/examples"</span>); <a name="l00087"></a>00087 <a class="code" href="classHome.html#a3abd28c83870cb52131d423ec9e73b6b">examplesMenu_</a>-><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WTabWidget.html#a5447e1149d6c854f25d6fb6792eef513">currentChanged</a>().<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1Signal.html#a15d1150af031537b492674ee651bf4a3">connect</a>(<span class="keyword">this</span>, &<a class="code" href="classHome.html#a3c26dd54dbc1a2020776f2d6cb2aa6bf">Home::googleAnalyticsLogger</a>); <a name="l00088"></a>00088 <a name="l00089"></a>00089 <span class="keywordflow">return</span> result; <a name="l00090"></a>00090 } <a name="l00091"></a>00091 <a name="l00092"></a><a class="code" href="classJWtHome.html#a3b7c824528c97d93d9fe2f06bea2ab10">00092</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a3b7c824528c97d93d9fe2f06bea2ab10">JWtHome::createQuoteForm</a>() <a name="l00093"></a>00093 { <a name="l00094"></a>00094 <span class="preprocessor">#ifdef WT_EMWEB_BUILD</span> <a name="l00095"></a>00095 <span class="preprocessor"></span> <span class="keywordflow">return</span> <span class="keyword">new</span> QuoteForm(QuoteForm::JWt); <a name="l00096"></a>00096 <span class="preprocessor">#else</span> <a name="l00097"></a>00097 <span class="preprocessor"></span> <span class="keywordflow">return</span> 0; <a name="l00098"></a>00098 <span class="preprocessor">#endif</span> <a name="l00099"></a>00099 <span class="preprocessor"></span>} <a name="l00100"></a>00100 <a name="l00101"></a><a class="code" href="classJWtHome.html#a595396b982cb4ee9bf7871285d907767">00101</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a595396b982cb4ee9bf7871285d907767">JWtHome::sourceViewer</a>(<span class="keyword">const</span> std::string &deployPath) <a name="l00102"></a>00102 { <a name="l00103"></a>00103 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classExampleSourceViewer.html" title="A simple widget to visualise a set of example source files.">ExampleSourceViewer</a>(deployPath, <a class="code" href="classJWtHome.html#a59bcdcf45b406686a4783307047223eb">jwtExamplePath_</a> + <span class="stringliteral">"/"</span>, <span class="stringliteral">"JAVA"</span>); <a name="l00104"></a>00104 } <a name="l00105"></a>00105 <a name="l00106"></a><a class="code" href="classJWtHome.html#ac7311c833f6088d9ca57be147b72d041">00106</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#ac7311c833f6088d9ca57be147b72d041">JWtHome::example</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *textKey, <span class="keyword">const</span> std::string& sourceDir) <a name="l00107"></a>00107 { <a name="l00108"></a>00108 <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="l00109"></a>00109 <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>(textKey), result); <a name="l00110"></a>00110 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#a6360a674c4d5dcc614411c283af8035b">linkSourceBrowser</a>(sourceDir)); <a name="l00111"></a>00111 <span class="keywordflow">return</span> result; <a name="l00112"></a>00112 } <a name="l00113"></a>00113 <a name="l00114"></a><a class="code" href="classJWtHome.html#a8e24c42136de12d131cf580da956f6a5">00114</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a8e24c42136de12d131cf580da956f6a5">JWtHome::helloWorldExample</a>() <a name="l00115"></a>00115 { <a name="l00116"></a>00116 <span class="keywordflow">return</span> <a class="code" href="classJWtHome.html#ac7311c833f6088d9ca57be147b72d041">example</a>(<span class="stringliteral">"home.examples.hello"</span>, <span class="stringliteral">"hello"</span>); <a name="l00117"></a>00117 } <a name="l00118"></a>00118 <a name="l00119"></a><a class="code" href="classJWtHome.html#a2097dbe6ba63b217e3407284f9e65181">00119</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a2097dbe6ba63b217e3407284f9e65181">JWtHome::chartExample</a>() <a name="l00120"></a>00120 { <a name="l00121"></a>00121 <span class="keywordflow">return</span> <a class="code" href="classJWtHome.html#ac7311c833f6088d9ca57be147b72d041">example</a>(<span class="stringliteral">"home.examples.chart"</span>, <span class="stringliteral">"charts"</span>); <a name="l00122"></a>00122 } <a name="l00123"></a>00123 <a name="l00124"></a><a class="code" href="classJWtHome.html#a4c4c5838d5168e5abade75821786f23a">00124</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a4c4c5838d5168e5abade75821786f23a">JWtHome::treeviewExample</a>() <a name="l00125"></a>00125 { <a name="l00126"></a>00126 <span class="keywordflow">return</span> <a class="code" href="classJWtHome.html#ac7311c833f6088d9ca57be147b72d041">example</a>(<span class="stringliteral">"home.examples.treeview"</span>, <span class="stringliteral">"treeviewdragdrop"</span>); <a name="l00127"></a>00127 } <a name="l00128"></a>00128 <a name="l00129"></a><a class="code" href="classJWtHome.html#a07bab7a78c177f8f04c7293735c7e618">00129</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a07bab7a78c177f8f04c7293735c7e618">JWtHome::composerExample</a>() <a name="l00130"></a>00130 { <a name="l00131"></a>00131 <span class="keywordflow">return</span> <a class="code" href="classJWtHome.html#ac7311c833f6088d9ca57be147b72d041">example</a>(<span class="stringliteral">"home.examples.composer"</span>, <span class="stringliteral">"composer"</span>); <a name="l00132"></a>00132 } <a name="l00133"></a>00133 <a name="l00134"></a><a class="code" href="classJWtHome.html#a81c01ebd07bee37195e762ea292e5216">00134</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a81c01ebd07bee37195e762ea292e5216">JWtHome::chatExample</a>() <a name="l00135"></a>00135 { <a name="l00136"></a>00136 <span class="keywordflow">return</span> <a class="code" href="classJWtHome.html#ac7311c833f6088d9ca57be147b72d041">example</a>(<span class="stringliteral">"home.examples.chat"</span>, <span class="stringliteral">"simplechat"</span>); <a name="l00137"></a>00137 } <a name="l00138"></a>00138 <a name="l00139"></a><a class="code" href="classJWtHome.html#a158c10cd1a7866ae985112a9f805509e">00139</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a158c10cd1a7866ae985112a9f805509e">JWtHome::figtreeExample</a>() <a name="l00140"></a>00140 { <a name="l00141"></a>00141 <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="l00142"></a>00142 <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a> *text = <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.examples.figtree"</span>), result); <a name="l00143"></a>00143 text-><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="l00144"></a>00144 <span class="keywordflow">return</span> result; <a name="l00145"></a>00145 } <a name="l00146"></a>00146 <a name="l00147"></a><a class="code" href="classJWtHome.html#ac82245a8839dc99f781568cefd7971cd">00147</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#ac82245a8839dc99f781568cefd7971cd">JWtHome::widgetGalleryExample</a>() <a name="l00148"></a>00148 { <a name="l00149"></a>00149 <span class="keywordflow">return</span> <a class="code" href="classJWtHome.html#ac7311c833f6088d9ca57be147b72d041">example</a>(<span class="stringliteral">"home.examples.widgetgallery"</span>, <span class="stringliteral">"widgetgallery"</span>); <a name="l00150"></a>00150 } <a name="l00151"></a>00151 <a name="l00152"></a><a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">00152</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *<a class="code" href="classJWtHome.html#a672e099a484d04e215e749436e92c409">JWtHome::wrapView</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">WWidget</a> *(<a class="code" href="classJWtHome.html">JWtHome</a>::*<a class="code" href="group__chatexample.html#gabf00719b4e042ae3ee5676d30791ace0">createWidget</a>)()) <a name="l00153"></a>00153 { <a name="l00154"></a>00154 <span class="keywordflow">return</span> makeStaticModel(boost::bind(createWidget, <span class="keyword">this</span>)); <a name="l00155"></a>00155 } <a name="l00156"></a>00156 <a name="l00157"></a><a class="code" href="JWtHome_8h.html#a2a952aa6c3f14a1591b7cb592d840c2e">00157</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WApplication.html">WApplication</a> *<a class="code" href="JWtHome_8C.html#a2a952aa6c3f14a1591b7cb592d840c2e">createJWtHomeApplication</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WEnvironment.html">WEnvironment</a>& env) <a name="l00158"></a>00158 { <a name="l00159"></a>00159 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classJWtHome.html">JWtHome</a>(env); <a name="l00160"></a>00160 } </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>