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 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471
|
<!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::WPushButton 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_1WPushButton.html">WPushButton</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::WPushButton Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WPushButton" --><!-- doxytag: inherits="Wt::WFormWidget" -->
<p>A widget that represents a push button.
<a href="classWt_1_1WPushButton.html#details">More...</a></p>
<p><code>#include <Wt/WPushButton></code></p>
<div class="dynheader">
Inheritance diagram for Wt::WPushButton:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WPushButton__inherit__graph.png" border="0" usemap="#Wt_1_1WPushButton_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WPushButton_inherit__map" id="Wt_1_1WPushButton_inherit__map">
<area shape="rect" href="classWt_1_1WFormWidget.html" title="An abstract widget that corresponds to an HTML form element." alt="" coords="12,304,143,331"/><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user-interface interaction." alt="" coords="5,229,149,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="13,155,141,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="28,80,127,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="29,5,125,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classWt_1_1WPushButton-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="abd74d092403f1cbe17f8ea3529c0528f"></a><!-- doxytag: member="Wt::WPushButton::WPushButton" ref="abd74d092403f1cbe17f8ea3529c0528f" args="(WContainerWidget *parent=0)" -->
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#abd74d092403f1cbe17f8ea3529c0528f">WPushButton</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a push button. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6525ba8c05bb27ad80c4a0a0ff32cf71"></a><!-- doxytag: member="Wt::WPushButton::WPushButton" ref="a6525ba8c05bb27ad80c4a0a0ff32cf71" args="(const WString &text, WContainerWidget *parent=0)" -->
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#a6525ba8c05bb27ad80c4a0a0ff32cf71">WPushButton</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &text, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a push button with given label text. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae76e2ad608c2acb0686dee57649a596d"></a><!-- doxytag: member="Wt::WPushButton::setText" ref="ae76e2ad608c2acb0686dee57649a596d" args="(const WString &text)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#ae76e2ad608c2acb0686dee57649a596d">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 button text. <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_1WPushButton.html#ac9eeba268762744f72158d9ec8de26fb">text</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the button text. <a href="#ac9eeba268762744f72158d9ec8de26fb"></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_1WPushButton.html#afd65e905dd006fbc29f0e8fb6997eb71">setIcon</a> (const <a class="el" href="classWt_1_1WLink.html">WLink</a> &link)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets an icon. <a href="#afd65e905dd006fbc29f0e8fb6997eb71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WLink.html">WLink</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#abb8de8391ac4033c1468b037d4090a6c">icon</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the icon. <a href="#abb8de8391ac4033c1468b037d4090a6c"></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_1WPushButton.html#ab33d4bb1d2f32ecf798626d19ca2a0df">setLink</a> (const <a class="el" href="classWt_1_1WLink.html">WLink</a> &link)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a destination link. <a href="#ab33d4bb1d2f32ecf798626d19ca2a0df"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WLink.html">WLink</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#a87f92e2a7522b717c06912668b1a87b2">link</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the destination link. <a href="#a87f92e2a7522b717c06912668b1a87b2"></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_1WPushButton.html#aa5830a2118836423f0c16d12bbfd57a0">setRef</a> (const std::string &url)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a destination URL (<b>deprecated</b>). <a href="#aa5830a2118836423f0c16d12bbfd57a0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#a623f45561d5c7935a03c16678f58c162">ref</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the destination URL (<b>deprecated</b>). <a href="#a623f45561d5c7935a03c16678f58c162"></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_1WPushButton.html#adbade65e5201991aa9e7dd131cf66fc9">setResource</a> (<a class="el" href="classWt_1_1WResource.html">WResource</a> *resource)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a destination resource (<b>deprecated</b>). <a href="#adbade65e5201991aa9e7dd131cf66fc9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WResource.html">WResource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#aca1303c5fa3c4efeab3003cfcaa65947">resource</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the destination resource (<b>deprecated</b>). <a href="#aca1303c5fa3c4efeab3003cfcaa65947"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WString.html">WString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#a517e542bbfd98369b8d22e206379fb6f">valueText</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the current value. <a href="#a517e542bbfd98369b8d22e206379fb6f"></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_1WPushButton.html#a700ac25ef6b2c3f51a4e9ccb8654bd98">setValueText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &value)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the current value. <a href="#a700ac25ef6b2c3f51a4e9ccb8654bd98"></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_1WPushButton.html#a7be48a8ffe8ba716557df205f3e8c30d">setLinkTarget</a> (<a class="el" href="namespaceWt.html#a6c93a6e97016801a310275457e43f333">AnchorTarget</a> target)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the link target. <a href="#a7be48a8ffe8ba716557df205f3e8c30d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceWt.html#a6c93a6e97016801a310275457e43f333">AnchorTarget</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#a342d5924943efb3d35c54315c5380809">linkTarget</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the location where the linked content should be displayed. <a href="#a342d5924943efb3d35c54315c5380809"></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_1WPushButton.html#a57084964c8ecf099bcf3e4767a5cca68">refresh</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Refresh the widget. <a href="#a57084964c8ecf099bcf3e4767a5cca68"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A widget that represents a push button. </p>
<p>To act on a button click, connect a slot to the <a class="el" href="classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked()</a> signal.</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WPushButton.html" title="A widget that represents a push button.">Wt::WPushButton</a> *ok = <span class="keyword">new</span> <a class="code" href="classWt_1_1WPushButton.html#abd74d092403f1cbe17f8ea3529c0528f" title="Creates a push button.">Wt::WPushButton</a>(<span class="stringliteral">"Okay"</span>);
ok-><a class="code" href="classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked</a>().connect(ok, &<a class="code" href="classWt_1_1WWidget.html#a5f68ea0ab29adfb8e559153fca281e03" title="Disable thes widget.">Wt::WPushButton::disable</a>);
ok-><a class="code" href="classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked</a>().connect(<span class="keyword">this</span>, &MyClass::processData);
</pre></div><p>WPushButton is an <a class="el" href="classWt_1_1WWidget.html#ac78e3af143883334c82031790c87416e">inline </a> widget.</p>
<h3>CSS</h3>
<p>The widget corresponds to the HTML <code><button></code> tag and has the <code>Wt-btn</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="abb8de8391ac4033c1468b037d4090a6c"></a><!-- doxytag: member="Wt::WPushButton::icon" ref="abb8de8391ac4033c1468b037d4090a6c" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WLink.html">WLink</a> Wt::WPushButton::icon </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the icon. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#afd65e905dd006fbc29f0e8fb6997eb71" title="Sets an icon.">setIcon()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a87f92e2a7522b717c06912668b1a87b2"></a><!-- doxytag: member="Wt::WPushButton::link" ref="a87f92e2a7522b717c06912668b1a87b2" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classWt_1_1WLink.html">WLink</a>& Wt::WPushButton::link </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the destination link. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#ab33d4bb1d2f32ecf798626d19ca2a0df" title="Sets a destination link.">setLink()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a342d5924943efb3d35c54315c5380809"></a><!-- doxytag: member="Wt::WPushButton::linkTarget" ref="a342d5924943efb3d35c54315c5380809" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceWt.html#a6c93a6e97016801a310275457e43f333">AnchorTarget</a> Wt::WPushButton::linkTarget </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the location where the linked content should be displayed. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#a7be48a8ffe8ba716557df205f3e8c30d" title="Sets the link target.">setLinkTarget()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a623f45561d5c7935a03c16678f58c162"></a><!-- doxytag: member="Wt::WPushButton::ref" ref="a623f45561d5c7935a03c16678f58c162" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string Wt::WPushButton::ref </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the destination URL (<b>deprecated</b>). </p>
<p>When the button refers to a resource, the current resource URL is returned. Otherwise, the URL is returned that was set using <a class="el" href="classWt_1_1WPushButton.html#aa5830a2118836423f0c16d12bbfd57a0" title="Sets a destination URL (deprecated).">setRef()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#aa5830a2118836423f0c16d12bbfd57a0" title="Sets a destination URL (deprecated).">setRef()</a>, <a class="el" href="classWt_1_1WResource.html#a11169bf885f297f6f2ebbc1789aeded2" title="Returns the current URL for this resource.">WResource::url()</a></dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000044">Deprecated:</a></b></dt><dd>Use <a class="el" href="classWt_1_1WPushButton.html#a87f92e2a7522b717c06912668b1a87b2" title="Returns the destination link.">link()</a> instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a57084964c8ecf099bcf3e4767a5cca68"></a><!-- doxytag: member="Wt::WPushButton::refresh" ref="a57084964c8ecf099bcf3e4767a5cca68" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WPushButton::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_1WFormWidget.html#a0d96e013a6d123df4d5ae90457287cec">Wt::WFormWidget</a>.</p>
</div>
</div>
<a class="anchor" id="aca1303c5fa3c4efeab3003cfcaa65947"></a><!-- doxytag: member="Wt::WPushButton::resource" ref="aca1303c5fa3c4efeab3003cfcaa65947" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WResource.html">WResource</a>* Wt::WPushButton::resource </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the destination resource (<b>deprecated</b>). </p>
<p>Returns <code>0</code> if no resource has been set.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#adbade65e5201991aa9e7dd131cf66fc9" title="Sets a destination resource (deprecated).">setResource()</a></dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000046">Deprecated:</a></b></dt><dd>Use <a class="el" href="classWt_1_1WPushButton.html#a87f92e2a7522b717c06912668b1a87b2" title="Returns the destination link.">link()</a> instead. </dd></dl>
</div>
</div>
<a class="anchor" id="afd65e905dd006fbc29f0e8fb6997eb71"></a><!-- doxytag: member="Wt::WPushButton::setIcon" ref="afd65e905dd006fbc29f0e8fb6997eb71" args="(const WLink &link)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WPushButton::setIcon </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WLink.html">WLink</a> & </td>
<td class="paramname"><em>link</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets an icon. </p>
<p>The icon is placed to the left of the text. </p>
</div>
</div>
<a class="anchor" id="ab33d4bb1d2f32ecf798626d19ca2a0df"></a><!-- doxytag: member="Wt::WPushButton::setLink" ref="ab33d4bb1d2f32ecf798626d19ca2a0df" args="(const WLink &link)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WPushButton::setLink </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WLink.html">WLink</a> & </td>
<td class="paramname"><em>link</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets a destination link. </p>
<p>This method can be used to make the button behave like a <a class="el" href="classWt_1_1WAnchor.html" title="A widget that represents an HTML anchor (to link to other documents).">WAnchor</a> (or conversely, an anchor look like a button) and redirect to another URL when clicked.</p>
<p>The <code>link</code> may be to a URL, a resource, or an internal path.</p>
<p>By default, a button does not link to an URL and you should listen to the <a class="el" href="classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked()</a> signal to react to a click event. </p>
</div>
</div>
<a class="anchor" id="a7be48a8ffe8ba716557df205f3e8c30d"></a><!-- doxytag: member="Wt::WPushButton::setLinkTarget" ref="a7be48a8ffe8ba716557df205f3e8c30d" args="(AnchorTarget target)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WPushButton::setLinkTarget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespaceWt.html#a6c93a6e97016801a310275457e43f333">AnchorTarget</a> </td>
<td class="paramname"><em>target</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the link target. </p>
<p>This sets the target where the linked contents should be displayed. The default target is TargetSelf. </p>
</div>
</div>
<a class="anchor" id="aa5830a2118836423f0c16d12bbfd57a0"></a><!-- doxytag: member="Wt::WPushButton::setRef" ref="aa5830a2118836423f0c16d12bbfd57a0" args="(const std::string &url)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WPushButton::setRef </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>url</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets a destination URL (<b>deprecated</b>). </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000043">Deprecated:</a></b></dt><dd>Use <a class="el" href="classWt_1_1WPushButton.html#ab33d4bb1d2f32ecf798626d19ca2a0df" title="Sets a destination link.">setLink()</a> insteadd. </dd></dl>
</div>
</div>
<a class="anchor" id="adbade65e5201991aa9e7dd131cf66fc9"></a><!-- doxytag: member="Wt::WPushButton::setResource" ref="adbade65e5201991aa9e7dd131cf66fc9" args="(WResource *resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WPushButton::setResource </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WResource.html">WResource</a> * </td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets a destination resource (<b>deprecated</b>). </p>
<p>This method can be used to make the button behave like a <a class="el" href="classWt_1_1WAnchor.html" title="A widget that represents an HTML anchor (to link to other documents).">WAnchor</a> (or conversely, an anchor look like a button) and redirect to another resource when clicked.</p>
<p>A resource specifies application-dependent content, which may be generated by your application on demand.</p>
<p>This sets the <code>resource</code> as the destination of the button, and is an alternative to <a class="el" href="classWt_1_1WPushButton.html#aa5830a2118836423f0c16d12bbfd57a0" title="Sets a destination URL (deprecated).">setRef()</a>. The resource may be cleared by passing <code>resource</code> = <code>0</code>.</p>
<p>The button does not assume ownership of the resource.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#aa5830a2118836423f0c16d12bbfd57a0" title="Sets a destination URL (deprecated).">setRef()</a></dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000045">Deprecated:</a></b></dt><dd>Use <a class="el" href="classWt_1_1WPushButton.html#ab33d4bb1d2f32ecf798626d19ca2a0df" title="Sets a destination link.">setLink()</a> instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a700ac25ef6b2c3f51a4e9ccb8654bd98"></a><!-- doxytag: member="Wt::WPushButton::setValueText" ref="a700ac25ef6b2c3f51a4e9ccb8654bd98" args="(const WString &value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WPushButton::setValueText </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the current value. </p>
<p>Has no effect, since a button has not value. </p>
<p>Implements <a class="el" href="classWt_1_1WFormWidget.html#a129d31b145f2614f608a852ca4e91731">Wt::WFormWidget</a>.</p>
</div>
</div>
<a class="anchor" id="ac9eeba268762744f72158d9ec8de26fb"></a><!-- doxytag: member="Wt::WPushButton::text" ref="ac9eeba268762744f72158d9ec8de26fb" 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::WPushButton::text </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the button text. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#ae76e2ad608c2acb0686dee57649a596d" title="Sets the button text.">setText()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a517e542bbfd98369b8d22e206379fb6f"></a><!-- doxytag: member="Wt::WPushButton::valueText" ref="a517e542bbfd98369b8d22e206379fb6f" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WString.html">WString</a> Wt::WPushButton::valueText </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the current value. </p>
<p>Returns an empty string, since a button has no value. </p>
<p>Implements <a class="el" href="classWt_1_1WFormWidget.html#a9e1ffd440abc07ce883d0a7b1a3883f6">Wt::WFormWidget</a>.</p>
</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>
|