Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 2180

wt-doc-3.2.3-1.fc18.noarch.rpm

<!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: Wt::WText Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</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
   &#160;<span id="projectnumber">3.2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a>      </li>
      <li class="navelem"><a class="el" href="classWt_1_1WText.html">WText</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::WText Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WText" --><!-- doxytag: inherits="Wt::WInteractWidget" -->
<p>A widget that renders (XHTML) text.  
 <a href="classWt_1_1WText.html#details">More...</a></p>

<p><code>#include &lt;Wt/WText&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::WText:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WText__inherit__graph.png" border="0" usemap="#Wt_1_1WText_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WText_inherit__map" id="Wt_1_1WText_inherit__map">
<area shape="rect" href="classWt_1_1WDefaultLoadingIndicator.html" title="A default loading indicator." alt="" coords="5,379,197,405"/><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user&#45;interface interaction." alt="" coords="29,229,173,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="37,155,165,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="52,80,151,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="53,5,149,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1WText-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49bf5785263785717834a9d1a7a52399"></a><!-- doxytag: member="Wt::WText::WText" ref="a49bf5785263785717834a9d1a7a52399" args="(WContainerWidget *parent=0)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a49bf5785263785717834a9d1a7a52399">WText</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a text widget with an empty text. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#abd144b9486708726fbb535c3f5b144c2">WText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a text widget with given text.  <a href="#abd144b9486708726fbb535c3f5b144c2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a49fd6775622dd40cd3676f0945723d98">WText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text, <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480">TextFormat</a> textFormat, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a text widget with given text and format.  <a href="#a49fd6775622dd40cd3676f0945723d98"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aec8b48682cf39eba9516c9d5053f8323"></a><!-- doxytag: member="Wt::WText::~WText" ref="aec8b48682cf39eba9516c9d5053f8323" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#aec8b48682cf39eba9516c9d5053f8323">~WText</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a1081f42ae498fa8d23656cec207a4a76">text</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the text.  <a href="#a1081f42ae498fa8d23656cec207a4a76"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a2f788aa524d51b3962642c9f565e66e6">setText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the text.  <a href="#a2f788aa524d51b3962642c9f565e66e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#af22c64c4c5fed3d2aef0915a7e5c5866">setTextFormat</a> (<a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480">TextFormat</a> format)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the text format.  <a href="#af22c64c4c5fed3d2aef0915a7e5c5866"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480">TextFormat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#ac0976c36c5181a534f161ca3724d4296">textFormat</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the text format.  <a href="#ac0976c36c5181a534f161ca3724d4296"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a06fd47b48126caf4881b027d35ba066b">setWordWrap</a> (bool wordWrap)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures word wrapping.  <a href="#a06fd47b48126caf4881b027d35ba066b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#ab2259537310561d9352f63d566b63fd6">wordWrap</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the widget may break lines.  <a href="#ab2259537310561d9352f63d566b63fd6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a57c9dc7dbc3958fab19763bfb50a8286">setPadding</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;padding, WFlags&lt; <a class="el" href="namespaceWt.html#a5a6f4636bcc6ab3c075165d249b3a5a3">Side</a> &gt; sides=Left|Right)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets padding inside the widget.  <a href="#a57c9dc7dbc3958fab19763bfb50a8286"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WLength.html">WLength</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a7de80cae510d43cd917dd1f4baa20b09">padding</a> (<a class="el" href="namespaceWt.html#a5a6f4636bcc6ab3c075165d249b3a5a3">Side</a> side) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the padding set for the widget.  <a href="#a7de80cae510d43cd917dd1f4baa20b09"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a3491e55f74027b49aaf8cd25369bc0e4">setInternalPathEncoding</a> (bool enabled)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables internal path encoding of anchors in the XHTML text.  <a href="#a3491e55f74027b49aaf8cd25369bc0e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a31b128d1c92107fe7c4a82869cf24526">hasInternalPathEncoding</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether internal paths are encoded.  <a href="#a31b128d1c92107fe7c4a82869cf24526"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WText.html#a465517b955bf7bbe086401b57d888552">refresh</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Refresh the widget.  <a href="#a465517b955bf7bbe086401b57d888552"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A widget that renders (XHTML) text. </p>
<p>The text is provided through a <a class="el" href="classWt_1_1WString.html" title="A value class which describes a locale-aware unicode string.">WString</a>, which may either hold a literal text, or a key to localized text which is looked up in locale dependent XML files (see <a class="el" href="classWt_1_1WString.html#a0afc7dc0f9897456d71b569a86ca26c1" title="Creates a localized string from a key.">WString::tr()</a>).</p>
<p>Use <a class="el" href="classWt_1_1WText.html#af22c64c4c5fed3d2aef0915a7e5c5866" title="Sets the text format.">setTextFormat()</a> to configure the textFormat of the text. The default textFormat is <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a>, which allows XHMTL markup to be included in the text. Tags and attributes that indicate "active" content are not allowed and stripped out, to avoid security risks exposed by JavaScript such as the common web-based <a href="http://en.wikipedia.org/wiki/Cross_site_scriptingCross-Site">Cross-Site Scripting (XSS)</a> malicious attack. XSS is the situation where one user of your web application is able to execute a script in another user's browser while your application only intended to display a message entered by the mailicious user to the other user. To defeat this attack, Wt assumes that content in a WText is intended to be passive, and not contain any scripting elements.</p>
<p>The <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480ae06bb9ae9a26d13c3dcf9f20d5067885" title="Format text as plain text.">Wt::PlainText</a> format will display the text literally (escaping any HTML special characters).</p>
<p>In some situations, <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480aeff9ccfd4130ea9922c46d94f82119b7" title="Format text as XHTML markup&#39;ed text.">Wt::XHTMLUnsafeText</a> may be useful to explicitly allow scripting content. Like XHTMLText, it allows XHTML markup, but it also allows potentially dangerous tags and attributes. Use this if you're sure that a user cannot interfere with the text set, and XHTMLText is too limiting.</p>
<p>WText is by default <a class="el" href="classWt_1_1WWidget.html#ac78e3af143883334c82031790c87416e">inline</a>, unless the XHTML contents starts with an element such as <code>&lt;div&gt;</code>, <code>&lt;h&gt;</code> or <code>&lt;p&gt;</code> that is displayed as a block, in which case the widget will also display as a block.</p>
<p>Usage examples: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">Wt::WContainerWidget</a> *container = <span class="keyword">new</span> <a class="code" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">Wt::WContainerWidget</a>();

 <span class="comment">// display an XHTML text:</span>
 container-&gt;<a class="code" href="classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2" title="Adds a child widget to this container.">addWidget</a>(<span class="keyword">new</span> <a class="code" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">Wt::WText</a>(<span class="stringliteral">&quot;Hello &lt;i&gt;dear&lt;/i&gt; visitor.&quot;</span>));

 <span class="comment">// display a plain text:</span>
 container-&gt;<a class="code" href="classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2" title="Adds a child widget to this container.">addWidget</a>(<span class="keyword">new</span> <a class="code" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">Wt::WText</a>(<span class="stringliteral">&quot;The &lt;i&gt; tag displays italic text.&quot;</span>, <a class="code" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480ae06bb9ae9a26d13c3dcf9f20d5067885" title="Format text as plain text.">Wt::PlainText</a>));

 <span class="comment">// display an XHTML fragment from a resource bundle:</span>
 container-&gt;<a class="code" href="classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2" title="Adds a child widget to this container.">addWidget</a>(<span class="keyword">new</span> <a class="code" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">Wt::WText</a>(<a class="code" href="classWt_1_1WWidget.html#aa651f107ec7cf080faef6c435705fc44" title="Short hand for WString::tr()">tr</a>(<span class="stringliteral">&quot;introduction&quot;</span>)));
</pre></div><h3>CSS</h3>
<p>The widget corresponds to an HTML <code>&lt;span&gt;</code> tag or an HTML <code>&lt;div&gt;</code> depending on whether the widget is inline.</p>
<p>This widget does not provide styling, and can be styled using inline or external CSS as appropriate.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WApplication.html#a5c9cc1350019d69f154a2b44cdaf2596" title="Changes the locale.">WApplication::setLocale()</a> </dd>
<dd>
<a class="el" href="classWt_1_1WApplication.html#a4f304244f6bc75be6cd5f41798ea5e2e" title="Returns the message resource bundle.">WApplication::messageResourceBundle()</a> </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abd144b9486708726fbb535c3f5b144c2"></a><!-- doxytag: member="Wt::WText::WText" ref="abd144b9486708726fbb535c3f5b144c2" args="(const WString &amp;text, WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WText::WText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a text widget with given text. </p>
<p>The textFormat is set to <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a>, unless the <code>text</code> is literal (not created using <a class="el" href="classWt_1_1WString.html#a0afc7dc0f9897456d71b569a86ca26c1" title="Creates a localized string from a key.">WString::tr()</a>) and it could not be parsed as valid XML. In that case the textFormat is set to <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480ae06bb9ae9a26d13c3dcf9f20d5067885" title="Format text as plain text.">Wt::PlainText</a>.</p>
<p>Therefore, if you wish to use <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a>, but cannot be sure about <code>text</code> being valid XML, you should verify that the <a class="el" href="classWt_1_1WText.html#ac0976c36c5181a534f161ca3724d4296" title="Returns the text format.">textFormat()</a> is <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a> after construction.</p>
<p>The XML parser will silently discard malicious tags and attributes for literal <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a> text. </p>

</div>
</div>
<a class="anchor" id="a49fd6775622dd40cd3676f0945723d98"></a><!-- doxytag: member="Wt::WText::WText" ref="a49fd6775622dd40cd3676f0945723d98" args="(const WString &amp;text, TextFormat textFormat, WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WText::WText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480">TextFormat</a>&#160;</td>
          <td class="paramname"><em>textFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a text widget with given text and format. </p>
<p>If <em>textFormat</em> is <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a> and <code>text</code> is not literal (not created using <a class="el" href="classWt_1_1WString.html#a0afc7dc0f9897456d71b569a86ca26c1" title="Creates a localized string from a key.">WString::tr()</a>), then if the <code>text</code> could not be parsed as valid XML, the textFormat is changed to <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480ae06bb9ae9a26d13c3dcf9f20d5067885" title="Format text as plain text.">Wt::PlainText</a>.</p>
<p>Therefore, if you wish to use <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a>, but cannot be sure about <code>text</code> being valid XML, you should verify that the <a class="el" href="classWt_1_1WText.html#ac0976c36c5181a534f161ca3724d4296" title="Returns the text format.">textFormat()</a> is <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a> after construction.</p>
<p>The XML parser will silently discard malicious tags and attributes for literal <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a> text. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a31b128d1c92107fe7c4a82869cf24526"></a><!-- doxytag: member="Wt::WText::hasInternalPathEncoding" ref="a31b128d1c92107fe7c4a82869cf24526" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WText::hasInternalPathEncoding </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns whether internal paths are encoded. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WText.html#a3491e55f74027b49aaf8cd25369bc0e4" title="Enables internal path encoding of anchors in the XHTML text.">setInternalPathEncoding()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7de80cae510d43cd917dd1f4baa20b09"></a><!-- doxytag: member="Wt::WText::padding" ref="a7de80cae510d43cd917dd1f4baa20b09" args="(Side side) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WLength.html">WLength</a> Wt::WText::padding </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#a5a6f4636bcc6ab3c075165d249b3a5a3">Side</a>&#160;</td>
          <td class="paramname"><em>side</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the padding set for the widget. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WText.html#a57c9dc7dbc3958fab19763bfb50a8286" title="Sets padding inside the widget.">setPadding(const WLength&amp;, WFlags&lt;Side&gt;)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a465517b955bf7bbe086401b57d888552"></a><!-- doxytag: member="Wt::WText::refresh" ref="a465517b955bf7bbe086401b57d888552" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WText::refresh </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Refresh the widget. </p>
<p>The refresh method is invoked when the locale is changed using <a class="el" href="classWt_1_1WApplication.html#a5c9cc1350019d69f154a2b44cdaf2596" title="Changes the locale.">WApplication::setLocale()</a> or when the user hit the refresh button.</p>
<p>The widget must actualize its contents in response. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WWebWidget.html#a48f8c17376bd04d1359481c5441f072a">Wt::WWebWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a3491e55f74027b49aaf8cd25369bc0e4"></a><!-- doxytag: member="Wt::WText::setInternalPathEncoding" ref="a3491e55f74027b49aaf8cd25369bc0e4" args="(bool enabled)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WText::setInternalPathEncoding </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enables internal path encoding of anchors in the XHTML text. </p>
<p>Anchors to internal paths are represented differently depending on the session implementation (plain HTML, Ajax or HTML5 history). By enabling this option, anchors which reference an internal path (by referring a URL of the form <code>href="#/..."</code>), are re-encoded to link to the internal path.</p>
<p>When using <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a> (or <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480aeff9ccfd4130ea9922c46d94f82119b7" title="Format text as XHTML markup&#39;ed text.">Wt::XHTMLUnsafeText</a>) formatted text, the text is pasted verbatim in the browser (with the exception of XSS filtering if applicable). With this option, however, the XHTML text may be transformed at the cost of an additional XML parsing step.</p>
<p>The default value is <code>false</code>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd>WAnchor::setInternalPath() </dd></dl>

</div>
</div>
<a class="anchor" id="a57c9dc7dbc3958fab19763bfb50a8286"></a><!-- doxytag: member="Wt::WText::setPadding" ref="a57c9dc7dbc3958fab19763bfb50a8286" args="(const WLength &amp;padding, WFlags&lt; Side &gt; sides=Left|Right)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WText::setPadding </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>padding</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WFlags&lt; <a class="el" href="namespaceWt.html#a5a6f4636bcc6ab3c075165d249b3a5a3">Side</a> &gt;&#160;</td>
          <td class="paramname"><em>sides</em> = <code>Left&#160;|&#160;Right</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets padding inside the widget. </p>
<p>Setting padding has the effect of adding distance between the widget children and the border, for a <a class="el" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">WText</a> padding is only supported on the left and/or right. </p>

</div>
</div>
<a class="anchor" id="a2f788aa524d51b3962642c9f565e66e6"></a><!-- doxytag: member="Wt::WText::setText" ref="a2f788aa524d51b3962642c9f565e66e6" args="(const WString &amp;text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WText::setText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the text. </p>
<p>When the current format is <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a>, and <code>text</code> is literal (not created using <a class="el" href="classWt_1_1WString.html#a0afc7dc0f9897456d71b569a86ca26c1" title="Creates a localized string from a key.">WString::tr()</a>), it is parsed using an XML parser which discards malicious tags and attributes silently. When the parser encounters an XML parse error, the textFormat is changed to <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480ae06bb9ae9a26d13c3dcf9f20d5067885" title="Format text as plain text.">Wt::PlainText</a>.</p>
<p>Returns whether the text could be set using the current textFormat. A return value of <code>false</code> indicates that the textFormat was changed in order to be able to accept the new text.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WText.html#a1081f42ae498fa8d23656cec207a4a76" title="Returns the text.">text()</a>, <a class="el" href="classWt_1_1WText.html#a2f788aa524d51b3962642c9f565e66e6" title="Sets the text.">setText()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af22c64c4c5fed3d2aef0915a7e5c5866"></a><!-- doxytag: member="Wt::WText::setTextFormat" ref="af22c64c4c5fed3d2aef0915a7e5c5866" args="(TextFormat format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WText::setTextFormat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480">TextFormat</a>&#160;</td>
          <td class="paramname"><em>format</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the text format. </p>
<p>The textFormat controls how the string should be interpreted: either as plain text, which is displayed literally, or as XHTML-markup.</p>
<p>When changing the textFormat to <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a>, and the current text is literal (not created using <a class="el" href="classWt_1_1WString.html#a0afc7dc0f9897456d71b569a86ca26c1" title="Creates a localized string from a key.">WString::tr()</a>), the current text is parsed using an XML parser which discards malicious tags and attributes silently. When the parser encounters an XML parse error, the textFormat is left unchanged, and this method returns false.</p>
<p>Returns whether the textFormat could be set for the current text.</p>
<p>The default format is <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a>. </p>

</div>
</div>
<a class="anchor" id="a06fd47b48126caf4881b027d35ba066b"></a><!-- doxytag: member="Wt::WText::setWordWrap" ref="a06fd47b48126caf4881b027d35ba066b" args="(bool wordWrap)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WText::setWordWrap </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wordWrap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configures word wrapping. </p>
<p>When <code>wordWrap</code> is <code>true</code>, the widget may break lines, creating a multi-line text. When <code>wordWrap</code> is <code>false</code>, the text will displayed on a single line, unless the text contains end-of-lines (for <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480ae06bb9ae9a26d13c3dcf9f20d5067885" title="Format text as plain text.">Wt::PlainText</a>) or &lt;br /&gt; tags or other block-level tags (for <a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480a847ab5a73b906fea275bd16877b420a4" title="Format text as XSS-safe XHTML markup&#39;ed text.">Wt::XHTMLText</a>).</p>
<p>The default value is <code>true</code>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WText.html#ab2259537310561d9352f63d566b63fd6" title="Returns whether the widget may break lines.">wordWrap()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1081f42ae498fa8d23656cec207a4a76"></a><!-- doxytag: member="Wt::WText::text" ref="a1081f42ae498fa8d23656cec207a4a76" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classWt_1_1WString.html">WString</a>&amp; Wt::WText::text </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the text. </p>
<p>When a literal XHTMLFormatted text was set, this may differ from the text that was set since malicious tags/attributes may have been stripped.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WText.html#a2f788aa524d51b3962642c9f565e66e6" title="Sets the text.">setText(const WString&amp;)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac0976c36c5181a534f161ca3724d4296"></a><!-- doxytag: member="Wt::WText::textFormat" ref="ac0976c36c5181a534f161ca3724d4296" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceWt.html#a140dea437d52d3d7c438ea3bd16a1480">TextFormat</a> Wt::WText::textFormat </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the text format. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WText.html#af22c64c4c5fed3d2aef0915a7e5c5866" title="Sets the text format.">setTextFormat()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ab2259537310561d9352f63d566b63fd6"></a><!-- doxytag: member="Wt::WText::wordWrap" ref="ab2259537310561d9352f63d566b63fd6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WText::wordWrap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns whether the widget may break lines. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WText.html#a06fd47b48126caf4881b027d35ba066b" title="Configures word wrapping.">setWordWrap(bool)</a> </dd></dl>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</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&nbsp;<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>