File: classWt_1_1WPushButton.html

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (176 lines) | stat: -rw-r--r-- 11,690 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Wt::WPushButton Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WPushButton.html">WPushButton</a>
  </div>
</div>
<div class="contents">
<h1>Wt::WPushButton Class Reference</h1><!-- doxytag: class="Wt::WPushButton" --><!-- doxytag: inherits="Wt::WFormWidget" -->A widget that represents a push button.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Wt/WPushButton&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WPushButton:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WPushButton__inherit__graph.png" border="0" usemap="#Wt_1_1WPushButton__inherit__map" alt="Inheritance graph"></center>
<map name="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,140,331"><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user&#45;interface interaction." alt="" coords="5,229,147,256"><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="15,155,137,181"><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="28,80,124,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="28,5,124,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classWt_1_1WPushButton-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bd74d092403f1cbe17f8ea3529c0528f"></a><!-- doxytag: member="Wt::WPushButton::WPushButton" ref="bd74d092403f1cbe17f8ea3529c0528f" args="(WContainerWidget *parent=0)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#bd74d092403f1cbe17f8ea3529c0528f">WPushButton</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a push button. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6525ba8c05bb27ad80c4a0a0ff32cf71"></a><!-- doxytag: member="Wt::WPushButton::WPushButton" ref="6525ba8c05bb27ad80c4a0a0ff32cf71" args="(const WString &amp;text, WContainerWidget *parent=0)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#6525ba8c05bb27ad80c4a0a0ff32cf71">WPushButton</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">&nbsp;</td><td class="mdescRight">Creates a push button with given label text. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e76e2ad608c2acb0686dee57649a596d"></a><!-- doxytag: member="Wt::WPushButton::setText" ref="e76e2ad608c2acb0686dee57649a596d" args="(const WString &amp;text)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#e76e2ad608c2acb0686dee57649a596d">setText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the button text. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#c9eeba268762744f72158d9ec8de26fb">text</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the button text.  <a href="#c9eeba268762744f72158d9ec8de26fb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#eb5668bdbe96e460047de04ed5759af9">setIcon</a> (const std::string &amp;url)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets an icon.  <a href="#eb5668bdbe96e460047de04ed5759af9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#f0f52faf4a50b1d80d03d6a32f3c7a28">icon</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the icon.  <a href="#f0f52faf4a50b1d80d03d6a32f3c7a28"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPushButton.html#57084964c8ecf099bcf3e4767a5cca68">refresh</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Refresh the widget.  <a href="#57084964c8ecf099bcf3e4767a5cca68"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A widget that represents a push button. 
<p>
To act on a button click, connect a slot to the <a class="el" href="classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked()</a> signal.<p>
Usage example: <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" title="A widget that represents a push button.">Wt::WPushButton</a>(<span class="stringliteral">"Okay"</span>);
 ok-&gt;<a class="code" href="classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked</a>().connect(SLOT(ok, <a class="code" href="classWt_1_1WWidget.html#5f68ea0ab29adfb8e559153fca281e03" title="Disable thes widget.">Wt::WPushButton::disable</a>));
 ok-&gt;<a class="code" href="classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked</a>().connect(SLOT(<span class="keyword">this</span>, MyClass::processData));
</pre></div><p>
WPushButton is an <a class="el" href="classWt_1_1WWidget.html#c78e3af143883334c82031790c87416e">inline </a> widget.<p>
<h3>CSS</h3>
<p>
The widget corresponds to the HTML <code>&lt;button&gt;</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. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="c9eeba268762744f72158d9ec8de26fb"></a><!-- doxytag: member="Wt::WPushButton::text" ref="c9eeba268762744f72158d9ec8de26fb" 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::WPushButton::text           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the button text. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#e76e2ad608c2acb0686dee57649a596d" title="Sets the button text.">setText()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="eb5668bdbe96e460047de04ed5759af9"></a><!-- doxytag: member="Wt::WPushButton::setIcon" ref="eb5668bdbe96e460047de04ed5759af9" args="(const std::string &amp;url)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPushButton::setIcon           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>url</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets an icon. 
<p>
The icon is placed to the left of the text. 
</div>
</div><p>
<a class="anchor" name="f0f52faf4a50b1d80d03d6a32f3c7a28"></a><!-- doxytag: member="Wt::WPushButton::icon" ref="f0f52faf4a50b1d80d03d6a32f3c7a28" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string&amp; Wt::WPushButton::icon           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the icon. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPushButton.html#eb5668bdbe96e460047de04ed5759af9" title="Sets an icon.">setIcon()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="57084964c8ecf099bcf3e4767a5cca68"></a><!-- doxytag: member="Wt::WPushButton::refresh" ref="57084964c8ecf099bcf3e4767a5cca68" 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>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:07 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>