1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
|
<!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::WAbstractSpinBox 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
 <span id="projectnumber">3.2.1</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 Page</span></a></li>
<li><a href="pages.html"><span>Related 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 List</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class 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_1WAbstractSpinBox.html">WAbstractSpinBox</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-methods">Protected Member Functions</a> </div>
<div class="headertitle">
<div class="title">Wt::WAbstractSpinBox Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WAbstractSpinBox" --><!-- doxytag: inherits="Wt::WLineEdit" -->
<p>An abstract spin box.
<a href="classWt_1_1WAbstractSpinBox.html#details">More...</a></p>
<p><code>#include <Wt/WAbstractSpinBox></code></p>
<div class="dynheader">
Inheritance diagram for Wt::WAbstractSpinBox:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WAbstractSpinBox__inherit__graph.png" border="0" usemap="#Wt_1_1WAbstractSpinBox_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WAbstractSpinBox_inherit__map" id="Wt_1_1WAbstractSpinBox_inherit__map">
<area shape="rect" href="classWt_1_1WDoubleSpinBox.html" title="An input control for fixed point numbers." alt="" coords="5,528,152,555"/><area shape="rect" href="classWt_1_1WSpinBox.html" title="An input control for integer numbers." alt="" coords="176,528,283,555"/><area shape="rect" href="classWt_1_1WLineEdit.html" title="A widget that provides a single line edit." alt="" coords="100,379,207,405"/><area shape="rect" href="classWt_1_1WFormWidget.html" title="An abstract widget that corresponds to an HTML form element." alt="" coords="88,304,219,331"/><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user-interface interaction." alt="" coords="81,229,225,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="89,155,217,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="104,80,203,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="105,5,201,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classWt_1_1WAbstractSpinBox-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">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#aba960889850819ba1a2243c4b233cb81">setNativeControl</a> (bool nativeControl)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Configures whether a native HTML5 control should be used. <a href="#aba960889850819ba1a2243c4b233cb81"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#af62fd3185dddda052ced087181f5134f">nativeControl</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether a native HTML5 control is used. <a href="#af62fd3185dddda052ced087181f5134f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#a739bb38a5d58cd6f18cff812361a2f14">setPrefix</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &prefix)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a prefix. <a href="#a739bb38a5d58cd6f18cff812361a2f14"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#ae5e77b228d538b852bf5f83197cda2f0">prefix</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the prefix. <a href="#ae5e77b228d538b852bf5f83197cda2f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#abef19149e48afdadbb1bdb660d3dc04d">setSuffix</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &suffix)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a suffix. <a href="#abef19149e48afdadbb1bdb660d3dc04d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#a4b2c047bd499c1d62e2a600bb46493c6">suffix</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the suffix. <a href="#a4b2c047bd499c1d62e2a600bb46493c6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#ad47216be4a24336445d770cee9c82b5c">setText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &text)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the content of the line edit. <a href="#ad47216be4a24336445d770cee9c82b5c"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f74722949df737c67f3bd9fe80fa9a7"></a><!-- doxytag: member="Wt::WAbstractSpinBox::WAbstractSpinBox" ref="a5f74722949df737c67f3bd9fe80fa9a7" args="(WContainerWidget *parent=0)" -->
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#a5f74722949df737c67f3bd9fe80fa9a7">WAbstractSpinBox</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WAbstractSpinBox.html#aa55e6a2ea1a13091e65b22c0118a900b">boxPadding</a> (<a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the widget's built-in padding. <a href="#aa55e6a2ea1a13091e65b22c0118a900b"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An abstract spin box. </p>
<h3>CSS</h3>
<p>Using HTML4, the widget is implemented using a <input type="text"> The element can be styled using the <code>Wt-spinbox</code> style. It may be styled through the current theme, or you can override the style using internal or external CSS as appropriate. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa55e6a2ea1a13091e65b22c0118a900b"></a><!-- doxytag: member="Wt::WAbstractSpinBox::boxPadding" ref="aa55e6a2ea1a13091e65b22c0118a900b" args="(Orientation orientation) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Wt::WAbstractSpinBox::boxPadding </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> </td>
<td class="paramname"><em>orientation</em></td><td>)</td>
<td> const<code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the widget's built-in padding. </p>
<p>This is used by the layout managers to correct for a built-in padding which interferes with setting a widget's width (or height) to 100%.</p>
<p>A layout manager needs to set the width to 100% only for form widgets (<a class="el" href="classWt_1_1WTextArea.html" title="A widget that provides a multi-line edit.">WTextArea</a>, <a class="el" href="classWt_1_1WLineEdit.html" title="A widget that provides a single line edit.">WLineEdit</a>, <a class="el" href="classWt_1_1WComboBox.html" title="A widget that provides a drop-down combo-box control.">WComboBox</a>, etc...). Therefore, only for those widgets this needs to return the padding (the default implementation returns 0).</p>
<p>For form widgets, the padding depends on the specific browser/platform combination, unless an explicit padding is set for the widget.</p>
<p>When setting an explicit padding for the widget using a style class, you will want to reimplement this method to return this padding in case you want to set the widget inside a layout manager.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLineEdit.html#a337dcba8f79f886b86c0d9bf7b721c75" title="Returns the widget's built-in border width.">boxBorder()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WLineEdit.html#af347d0ad651b76abea5ee5dcae295db1">Wt::WLineEdit</a>.</p>
</div>
</div>
<a class="anchor" id="af62fd3185dddda052ced087181f5134f"></a><!-- doxytag: member="Wt::WAbstractSpinBox::nativeControl" ref="af62fd3185dddda052ced087181f5134f" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WAbstractSpinBox::nativeControl </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns whether a native HTML5 control is used. </p>
<p>Taking into account the preference for a native control, configured using <a class="el" href="classWt_1_1WAbstractSpinBox.html#aba960889850819ba1a2243c4b233cb81" title="Configures whether a native HTML5 control should be used.">setNativeControl()</a>, this method returns whether a native control is actually being used. </p>
</div>
</div>
<a class="anchor" id="ae5e77b228d538b852bf5f83197cda2f0"></a><!-- doxytag: member="Wt::WAbstractSpinBox::prefix" ref="ae5e77b228d538b852bf5f83197cda2f0" 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>& Wt::WAbstractSpinBox::prefix </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the prefix. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractSpinBox.html#a739bb38a5d58cd6f18cff812361a2f14" title="Sets a prefix.">setPrefix()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="aba960889850819ba1a2243c4b233cb81"></a><!-- doxytag: member="Wt::WAbstractSpinBox::setNativeControl" ref="aba960889850819ba1a2243c4b233cb81" args="(bool nativeControl)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WAbstractSpinBox::setNativeControl </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>nativeControl</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Configures whether a native HTML5 control should be used. </p>
<p>When <code>native</code>, the new "number" input element, specified by HTML5 and when implemented by the browser, is used rather than the built-in element. The native control is styled by the browser (usually in sync with the OS) rather than through the theme chosen.</p>
<p>The default is <code>false</code> (as native support is now well implemented). </p>
</div>
</div>
<a class="anchor" id="a739bb38a5d58cd6f18cff812361a2f14"></a><!-- doxytag: member="Wt::WAbstractSpinBox::setPrefix" ref="a739bb38a5d58cd6f18cff812361a2f14" args="(const WString &prefix)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WAbstractSpinBox::setPrefix </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"><em>prefix</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets a prefix. </p>
<p>Option to set a prefix string shown in front of the value, e.g.:</p>
<div class="fragment"><pre class="fragment"> spinBox->setPrefix(<span class="stringliteral">"$ "</span>);
</pre></div><p>The default prefix is empty.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Not supported by the native controls. </dd></dl>
</div>
</div>
<a class="anchor" id="abef19149e48afdadbb1bdb660d3dc04d"></a><!-- doxytag: member="Wt::WAbstractSpinBox::setSuffix" ref="abef19149e48afdadbb1bdb660d3dc04d" args="(const WString &suffix)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WAbstractSpinBox::setSuffix </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"><em>suffix</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets a suffix. </p>
<p>Option to set a suffix string shown to the right of the value, e.g.:</p>
<div class="fragment"><pre class="fragment"> spinBox->setSuffix(<span class="stringliteral">" crates"</span>);
</pre></div><p>The default suffix is empty.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Not supported by the native controls. </dd></dl>
</div>
</div>
<a class="anchor" id="ad47216be4a24336445d770cee9c82b5c"></a><!-- doxytag: member="Wt::WAbstractSpinBox::setText" ref="ad47216be4a24336445d770cee9c82b5c" args="(const WString &text)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WAbstractSpinBox::setText </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"><em>text</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the content of the line edit. </p>
<p>The default value is "".</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLineEdit.html#ac74b58779cb635898cac13e81d8b0c7a" title="Returns the current content.">text()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WLineEdit.html#addb99c6ab5483836adf44a2706a410af">Wt::WLineEdit</a>.</p>
</div>
</div>
<a class="anchor" id="a4b2c047bd499c1d62e2a600bb46493c6"></a><!-- doxytag: member="Wt::WAbstractSpinBox::suffix" ref="a4b2c047bd499c1d62e2a600bb46493c6" 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>& Wt::WAbstractSpinBox::suffix </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the suffix. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractSpinBox.html#abef19149e48afdadbb1bdb660d3dc04d" title="Sets a suffix.">setSuffix()</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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </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 Fri Mar 30 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>
|