<!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/SourceView.h 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/SourceView.h</div> </div> </div> <div class="contents"> <a href="SourceView_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This may look like C code, but it's really -*- C++ -*-</span> <a name="l00002"></a>00002 <span class="comment">/*</span> <a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2009 Emweb bvba </span> <a name="l00004"></a>00004 <span class="comment"> *</span> <a name="l00005"></a>00005 <span class="comment"> * See the LICENSE file for terms of use.</span> <a name="l00006"></a>00006 <span class="comment"> */</span> <a name="l00007"></a>00007 <a name="l00008"></a>00008 <span class="preprocessor">#ifndef SOURCEVIEW_H</span> <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define SOURCEVIEW_H</span> <a name="l00010"></a>00010 <span class="preprocessor"></span> <a name="l00011"></a>00011 <span class="preprocessor">#include <Wt/WViewWidget></span> <a name="l00012"></a>00012 <span class="preprocessor">#include <Wt/WModelIndex></span> <a name="l00013"></a>00013 <span class="preprocessor">#include <Wt/WMemoryResource></span> <a name="l00014"></a>00014 <a name="l00019"></a>00019 <a name="l00026"></a><a class="code" href="classSourceView.html">00026</a> <span class="keyword">class </span><a class="code" href="classSourceView.html" title="View class for source code.">SourceView</a> : <span class="keyword">public</span> Wt::<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WViewWidget.html#a3537a36594d1a8135d63027d6679f279">WViewWidget</a> <a name="l00027"></a>00027 { <a name="l00028"></a>00028 <span class="keyword">public</span>: <a name="l00035"></a>00035 <a class="code" href="classSourceView.html#abf613f5f07d2f82e337c42d9b5d92887" title="Constructor.">SourceView</a>(<span class="keywordtype">int</span> fileNameRole, <span class="keywordtype">int</span> contentRole, <span class="keywordtype">int</span> filePathRole); <a name="l00036"></a>00036 <a name="l00039"></a>00039 <span class="keyword">virtual</span> <a class="code" href="classSourceView.html#aee500dba1590df1506a972b245a65f37" title="Destructor.">~SourceView</a>(); <a name="l00040"></a>00040 <a name="l00046"></a>00046 <span class="keywordtype">bool</span> <a class="code" href="classSourceView.html#a10f2b88b0b8ea6b9563077e7958bc4d0" title="Sets the model index.">setIndex</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WModelIndex.html">Wt::WModelIndex</a>& index); <a name="l00047"></a>00047 <a name="l00053"></a>00053 <span class="keyword">virtual</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html">Wt::WWidget</a> *<a class="code" href="classSourceView.html#a9be1e72f0c562430de10742d9775c164" title="Returns the widget that renders the view.">renderView</a>(); <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="keyword">private</span>: <a name="l00057"></a><a class="code" href="classSourceView.html#a94a8d44f1ef76dd99af7fb73ca754068">00057</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WModelIndex.html">Wt::WModelIndex</a> <a class="code" href="classSourceView.html#a94a8d44f1ef76dd99af7fb73ca754068" title="The index that is currently displayed.">index_</a>; <a name="l00058"></a>00058 <a name="l00060"></a><a class="code" href="classSourceView.html#a763d5eb3f0dd84613ccdd389eb90efe0">00060</a> <span class="keywordtype">int</span> <a class="code" href="classSourceView.html#a763d5eb3f0dd84613ccdd389eb90efe0" title="The role that is currently displayed.">fileNameRole_</a>; <a name="l00061"></a><a class="code" href="classSourceView.html#a9ceb4e47cef2433d2d0da517f1ddbf2b">00061</a> <span class="keywordtype">int</span> <a class="code" href="classSourceView.html#a9ceb4e47cef2433d2d0da517f1ddbf2b">contentRole_</a>; <a name="l00062"></a><a class="code" href="classSourceView.html#ad399598fd48c236b0c7bb44478e59bd5">00062</a> <span class="keywordtype">int</span> <a class="code" href="classSourceView.html#ad399598fd48c236b0c7bb44478e59bd5">filePathRole_</a>; <a name="l00063"></a>00063 <a name="l00064"></a><a class="code" href="classSourceView.html#ad421de7452a92147305787e617aee41a">00064</a> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMemoryResource.html">Wt::WMemoryResource</a>* <a class="code" href="classSourceView.html#ad421de7452a92147305787e617aee41a">imageResource_</a>; <a name="l00065"></a>00065 <a name="l00066"></a>00066 <span class="keyword">private</span>: <a name="l00067"></a>00067 std::string <a class="code" href="classSourceView.html#a74bb7ab280cd3f32ab507b65ba74fc63">imageExtension</a>(<span class="keyword">const</span> std::string& fileName); <a name="l00068"></a>00068 }; <a name="l00069"></a>00069 <a name="l00072"></a>00072 <span class="preprocessor">#endif //SOURCEVIEW_H</span> </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>