Sophie

Sophie

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

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::WCheckBox 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_1WCheckBox.html">WCheckBox</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::WCheckBox Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WCheckBox" --><!-- doxytag: inherits="Wt::WAbstractToggleButton" -->
<p>A user control that represents a check box.  
 <a href="classWt_1_1WCheckBox.html#details">More...</a></p>

<p><code>#include &lt;Wt/WCheckBox&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::WCheckBox:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WCheckBox__inherit__graph.png" border="0" usemap="#Wt_1_1WCheckBox_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WCheckBox_inherit__map" id="Wt_1_1WCheckBox_inherit__map">
<area shape="rect" href="classWt_1_1WAbstractToggleButton.html" title="An abstract base class for radio buttons and check boxes." alt="" coords="5,379,189,405"/><area shape="rect" href="classWt_1_1WFormWidget.html" title="An abstract widget that corresponds to an HTML form element." alt="" coords="32,304,163,331"/><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user&#45;interface interaction." alt="" coords="25,229,169,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="33,155,161,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="48,80,147,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="49,5,145,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1WCheckBox-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="a6277263fb7405d39bd6d6124e56fbb5c"></a><!-- doxytag: member="Wt::WCheckBox::WCheckBox" ref="a6277263fb7405d39bd6d6124e56fbb5c" args="(WContainerWidget *parent=0)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WCheckBox.html#a6277263fb7405d39bd6d6124e56fbb5c">WCheckBox</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 checkbox with empty label. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16025c975c9586c89e548875df811c6a"></a><!-- doxytag: member="Wt::WCheckBox::WCheckBox" ref="a16025c975c9586c89e548875df811c6a" args="(const WString &amp;text, WContainerWidget *parent=0)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WCheckBox.html#a16025c975c9586c89e548875df811c6a">WCheckBox</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 checkbox with given label. <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_1WCheckBox.html#aaa80606e36bfd34a73f6b58dc6cac926">setTristate</a> (bool tristate=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes a tristate checkbox.  <a href="#aaa80606e36bfd34a73f6b58dc6cac926"></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_1WCheckBox.html#ae7c6da01de803c9fd88564e3ef2cbf13">isTristate</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the checkbox is tristate.  <a href="#ae7c6da01de803c9fd88564e3ef2cbf13"></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_1WCheckBox.html#a293d15f49d36587b55a04216322083d8">setCheckState</a> (<a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fb">CheckState</a> state)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the check state.  <a href="#a293d15f49d36587b55a04216322083d8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fb">CheckState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WCheckBox.html#ad94addc6aa260dbaba61e64573f52931">checkState</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the check state.  <a href="#ad94addc6aa260dbaba61e64573f52931"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A user control that represents a check box. </p>
<p>By default, a checkbox can have two states: <a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fbabc1a90642e7fc65241f70c11e9f90210" title="Checked.">Wt::Checked</a> or <a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fbad5dca88ed5fa2185a98cc1f4c686cd9c" title="Unchecked.">Wt::Unchecked</a>, which can be inspected using <a class="el" href="classWt_1_1WAbstractToggleButton.html#abd40ce7a6c4b4e924c9097015f4971ea" title="Returns the button state.">isChecked()</a>, and set using <a class="el" href="classWt_1_1WAbstractToggleButton.html#a2b4ab0746beb381276ff7fcf0bde93c8" title="Checks the button.">setChecked()</a>.</p>
<p>A checkbox may also provide a third state, <a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fba276bb5f9da28be5fc0685d7a5cc2296b" title="Partially checked (for a tri-state checkbox)">Wt::PartiallyChecked</a>, which is useful to indicate that it is neither checked or unchecked. Wt will use native browser support for this HTML5 extension when available (Safari and MS IE), and use an image-based workaround otherwise. You may enable support for the third state using <a class="el" href="classWt_1_1WCheckBox.html#aaa80606e36bfd34a73f6b58dc6cac926" title="Makes a tristate checkbox.">setTristate()</a>, and use <a class="el" href="classWt_1_1WCheckBox.html#a293d15f49d36587b55a04216322083d8" title="Sets the check state.">setCheckState()</a> and <a class="el" href="classWt_1_1WCheckBox.html#ad94addc6aa260dbaba61e64573f52931" title="Returns the check state.">checkState()</a> to read all three states.</p>
<p>A label is added as a sibling of the checkbox to the same parent.</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WGroupBox.html" title="A widget which group widgets into a frame with a title.">Wt::WGroupBox</a> *box = <span class="keyword">new</span> <a class="code" href="classWt_1_1WGroupBox.html" title="A widget which group widgets into a frame with a title.">Wt::WGroupBox</a>(<span class="stringliteral">&quot;In-flight options&quot;</span>);

 <a class="code" href="classWt_1_1WCheckBox.html" title="A user control that represents a check box.">Wt::WCheckBox</a> *w1 = <span class="keyword">new</span> <a class="code" href="classWt_1_1WCheckBox.html#a6277263fb7405d39bd6d6124e56fbb5c" title="Creates a checkbox with empty label.">Wt::WCheckBox</a>(<span class="stringliteral">&quot;Vegetarian diet&quot;</span>, box);
 box-&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> WBreak());
 <a class="code" href="classWt_1_1WCheckBox.html" title="A user control that represents a check box.">Wt::WCheckBox</a> *w2 = <span class="keyword">new</span> <a class="code" href="classWt_1_1WCheckBox.html#a6277263fb7405d39bd6d6124e56fbb5c" title="Creates a checkbox with empty label.">Wt::WCheckBox</a>(<span class="stringliteral">&quot;WIFI access&quot;</span>, box);
 box-&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> WBreak());
 <a class="code" href="classWt_1_1WCheckBox.html" title="A user control that represents a check box.">Wt::WCheckBox</a> *w3 = <span class="keyword">new</span> <a class="code" href="classWt_1_1WCheckBox.html#a6277263fb7405d39bd6d6124e56fbb5c" title="Creates a checkbox with empty label.">Wt::WCheckBox</a>(<span class="stringliteral">&quot;AC plug&quot;</span>, box);

 w1-&gt;<a class="code" href="classWt_1_1WAbstractToggleButton.html#a6838c9a37f3e9e3c466e9f48bde55e62" title="Sets the button state.">setChecked</a>(<span class="keyword">false</span>);
 w2-&gt;<a class="code" href="classWt_1_1WAbstractToggleButton.html#a6838c9a37f3e9e3c466e9f48bde55e62" title="Sets the button state.">setChecked</a>(<span class="keyword">true</span>);
 w3-&gt;<a class="code" href="classWt_1_1WAbstractToggleButton.html#a6838c9a37f3e9e3c466e9f48bde55e62" title="Sets the button state.">setChecked</a>(<span class="keyword">true</span>);
</pre></div><p>WCheckBox is an <a class="el" href="classWt_1_1WWidget.html#ac78e3af143883334c82031790c87416e">inline </a> widget.</p>
<h3>CSS</h3>
<p>This widget corresponds to the HTML <code>&lt;input type="checkbox"&gt;</code> tag. Depending on whether a text is included, it may be nested in a <code>&lt;span&gt;</code> tag which also includes a rendered <a class="el" href="classWt_1_1WLabel.html" title="A label for a form field.">WLabel</a>. 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_1WAbstractToggleButton.html" title="An abstract base class for radio buttons and check boxes.">WAbstractToggleButton</a> </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ad94addc6aa260dbaba61e64573f52931"></a><!-- doxytag: member="Wt::WCheckBox::checkState" ref="ad94addc6aa260dbaba61e64573f52931" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fb">CheckState</a> Wt::WCheckBox::checkState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the check state. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WCheckBox.html#a293d15f49d36587b55a04216322083d8" title="Sets the check state.">setCheckState()</a>, <a class="el" href="classWt_1_1WAbstractToggleButton.html#abd40ce7a6c4b4e924c9097015f4971ea" title="Returns the button state.">isChecked()</a> </dd></dl>

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

<p>Returns whether the checkbox is tristate. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WCheckBox.html#aaa80606e36bfd34a73f6b58dc6cac926" title="Makes a tristate checkbox.">setTristate()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a293d15f49d36587b55a04216322083d8"></a><!-- doxytag: member="Wt::WCheckBox::setCheckState" ref="a293d15f49d36587b55a04216322083d8" args="(CheckState state)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WCheckBox::setCheckState </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fb">CheckState</a>&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the check state. </p>
<p>Unless it is a tri-state checkbox, only <a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fbabc1a90642e7fc65241f70c11e9f90210" title="Checked.">Wt::Checked</a> and <a class="el" href="namespaceWt.html#a59dae4dad2967d1d0f9b765f468442fbad5dca88ed5fa2185a98cc1f4c686cd9c" title="Unchecked.">Wt::Unchecked</a> are valid states. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractToggleButton.html">Wt::WAbstractToggleButton</a>.</p>

</div>
</div>
<a class="anchor" id="aaa80606e36bfd34a73f6b58dc6cac926"></a><!-- doxytag: member="Wt::WCheckBox::setTristate" ref="aaa80606e36bfd34a73f6b58dc6cac926" args="(bool tristate=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WCheckBox::setTristate </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>tristate</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Makes a tristate checkbox. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>You should enable tristate functionality right after construction and this cannot be modified later. </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>