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
|
<!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::Ext::AbstractButton 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 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>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="namespaceWt_1_1Ext.html">Ext</a>::<a class="el" href="classWt_1_1Ext_1_1AbstractButton.html">AbstractButton</a>
</div>
</div>
<div class="contents">
<h1>Wt::Ext::AbstractButton Class Reference<br>
<small>
[<a class="el" href="group__ext.html">Ext widgets</a>]</small>
</h1><!-- doxytag: class="Wt::Ext::AbstractButton" --><!-- doxytag: inherits="Wt::Ext::Component" -->Abstract base class for a (toolbar) button or menu item.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/Ext/AbstractButton></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::Ext::AbstractButton:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1Ext_1_1AbstractButton__inherit__graph.png" border="0" usemap="#Wt_1_1Ext_1_1AbstractButton__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1Ext_1_1AbstractButton__inherit__map">
<area shape="rect" href="classWt_1_1Ext_1_1Button.html" title="A button." alt="" coords="5,453,117,480"><area shape="rect" href="classWt_1_1Ext_1_1MenuItem.html" title="An item in a menu." alt="" coords="141,453,272,480"><area shape="rect" href="classWt_1_1Ext_1_1Component.html" title="An abstract base class for widgets that can be visually disabled." alt="" coords="64,304,203,331"><area shape="rect" href="classWt_1_1Ext_1_1Widget.html" title="An abstract base class for all Ext widgets." alt="" coords="77,229,189,256"><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="72,155,195,181"><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="85,80,181,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="85,5,181,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1Ext_1_1AbstractButton-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="e4a53837bb690bc1426a8b8da336bcea"></a><!-- doxytag: member="Wt::Ext::AbstractButton::setText" ref="e4a53837bb690bc1426a8b8da336bcea" args="(const WString &text)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#e4a53837bb690bc1426a8b8da336bcea">setText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &text)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the item text. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7adfdba80922236853b08502a4881a72"></a><!-- doxytag: member="Wt::Ext::AbstractButton::text" ref="7adfdba80922236853b08502a4881a72" args="() const " -->
const <a class="el" href="classWt_1_1WString.html">WString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#7adfdba80922236853b08502a4881a72">text</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the item text. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b484de8e4b543aa36ef5bfd1c8b70548"></a><!-- doxytag: member="Wt::Ext::AbstractButton::setIcon" ref="b484de8e4b543aa36ef5bfd1c8b70548" args="(const std::string &path)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#b484de8e4b543aa36ef5bfd1c8b70548">setIcon</a> (const std::string &path)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the item icon path. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3b00f75eba7eb933b3cd809746cb8a1"></a><!-- doxytag: member="Wt::Ext::AbstractButton::icon" ref="a3b00f75eba7eb933b3cd809746cb8a1" args="() const " -->
const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#a3b00f75eba7eb933b3cd809746cb8a1">icon</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the item icon path. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fe7d30546234065316df73026558fc79"></a><!-- doxytag: member="Wt::Ext::AbstractButton::setCheckable" ref="fe7d30546234065316df73026558fc79" args="(bool how)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#fe7d30546234065316df73026558fc79">setCheckable</a> (bool how)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set if the item is checkable. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3fa242a4f266453da5ef8112cadc59e9"></a><!-- doxytag: member="Wt::Ext::AbstractButton::isCheckable" ref="3fa242a4f266453da5ef8112cadc59e9" args="() const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#3fa242a4f266453da5ef8112cadc59e9">isCheckable</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return if the item is checkable. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="adbc30ae480d99a6e4ca19a070e02d81"></a><!-- doxytag: member="Wt::Ext::AbstractButton::setMenu" ref="adbc30ae480d99a6e4ca19a070e02d81" args="(Menu *menu)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#adbc30ae480d99a6e4ca19a070e02d81">setMenu</a> (<a class="el" href="classWt_1_1Ext_1_1Menu.html">Menu</a> *menu)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set a menu that popups up when the item is activated. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#79b1606d4b674dc13c5e92239be85700">setChecked</a> (bool how)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Change the checked state. <a href="#79b1606d4b674dc13c5e92239be85700"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a637f0902da104ab323131cb237c3556"></a><!-- doxytag: member="Wt::Ext::AbstractButton::isChecked" ref="a637f0902da104ab323131cb237c3556" args="() const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#a637f0902da104ab323131cb237c3556">isChecked</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the checked state. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#fc7e2bc9c426bbbfb9beb9e18e9a0845">configureToolTip</a> (<a class="el" href="classWt_1_1Ext_1_1ToolTipConfig.html">ToolTipConfig</a> *config)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Configure the tool tip associated with this item. <a href="#fc7e2bc9c426bbbfb9beb9e18e9a0845"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1JSignal.html">JSignal</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#43a839bb8e46df6c06ef2df65ae277c9">activated</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when a item gets activated. <a href="#43a839bb8e46df6c06ef2df65ae277c9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1JSignal.html">JSignal</a>< bool > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#4492f5bd82c0c33c0282c955bafce9d4">toggled</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when a item gets toggled. <a href="#4492f5bd82c0c33c0282c955bafce9d4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#2cab98fae87f87209c9999e086253fb0">refresh</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Refresh the widget. <a href="#2cab98fae87f87209c9999e086253fb0"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract base class for a (toolbar) button or menu item.
<p>
You may set the button text using <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#e4a53837bb690bc1426a8b8da336bcea" title="Set the item text.">setText()</a> and icon use <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#b484de8e4b543aa36ef5bfd1c8b70548" title="Set the item icon path.">setIcon()</a>, and configure whether the button/menu item can be checked or toggled using <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#fe7d30546234065316df73026558fc79" title="Set if the item is checkable.">setCheckable()</a>.<p>
To respond to a click, you can connect to the <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#43a839bb8e46df6c06ef2df65ae277c9" title="Signal emitted when a item gets activated.">activated()</a> signal, and for a checkable button/item you may listen to the <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#4492f5bd82c0c33c0282c955bafce9d4" title="Signal emitted when a item gets toggled.">toggled()</a> signal.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Button.html" title="A button.">Button</a>, <a class="el" href="classWt_1_1Ext_1_1MenuItem.html" title="An item in a menu.">MenuItem</a>, <a class="el" href="classWt_1_1Ext_1_1AbstractToggleButton.html" title="Abstract base class for radio button and check box.">AbstractToggleButton</a> </dd></dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="79b1606d4b674dc13c5e92239be85700"></a><!-- doxytag: member="Wt::Ext::AbstractButton::setChecked" ref="79b1606d4b674dc13c5e92239be85700" args="(bool how)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::Ext::AbstractButton::setChecked </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>how</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Change the checked state.
<p>
This is only used when the <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#3fa242a4f266453da5ef8112cadc59e9" title="Return if the item is checkable.">isCheckable()</a> == true.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#fe7d30546234065316df73026558fc79" title="Set if the item is checkable.">setCheckable(bool)</a>, <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#3fa242a4f266453da5ef8112cadc59e9" title="Return if the item is checkable.">isCheckable()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="fc7e2bc9c426bbbfb9beb9e18e9a0845"></a><!-- doxytag: member="Wt::Ext::AbstractButton::configureToolTip" ref="fc7e2bc9c426bbbfb9beb9e18e9a0845" args="(ToolTipConfig *config)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::Ext::AbstractButton::configureToolTip </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1Ext_1_1ToolTipConfig.html">ToolTipConfig</a> * </td>
<td class="paramname"> <em>config</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Configure the tool tip associated with this item.
<p>
If the config has no parent, then ownership is transferred to this widget.
</div>
</div><p>
<a class="anchor" name="43a839bb8e46df6c06ef2df65ae277c9"></a><!-- doxytag: member="Wt::Ext::AbstractButton::activated" ref="43a839bb8e46df6c06ef2df65ae277c9" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1JSignal.html">JSignal</a>& Wt::Ext::AbstractButton::activated </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Signal emitted when a item gets activated.
<p>
This signal is emitted for non-checkable items (for who <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#3fa242a4f266453da5ef8112cadc59e9" title="Return if the item is checkable.">isCheckable()</a> == false), when the user activates the item (by clicking it).<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#fe7d30546234065316df73026558fc79" title="Set if the item is checkable.">setCheckable(bool)</a>, <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#3fa242a4f266453da5ef8112cadc59e9" title="Return if the item is checkable.">isCheckable()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="4492f5bd82c0c33c0282c955bafce9d4"></a><!-- doxytag: member="Wt::Ext::AbstractButton::toggled" ref="4492f5bd82c0c33c0282c955bafce9d4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1JSignal.html">JSignal</a><bool>& Wt::Ext::AbstractButton::toggled </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Signal emitted when a item gets toggled.
<p>
This signal is emitted for checkable items (for who <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#3fa242a4f266453da5ef8112cadc59e9" title="Return if the item is checkable.">isCheckable()</a> == false), when the user changed toggles the item state. The new state is passed as a parameter value.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#fe7d30546234065316df73026558fc79" title="Set if the item is checkable.">setCheckable(bool)</a>, <a class="el" href="classWt_1_1Ext_1_1AbstractButton.html#3fa242a4f266453da5ef8112cadc59e9" title="Return if the item is checkable.">isCheckable()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="2cab98fae87f87209c9999e086253fb0"></a><!-- doxytag: member="Wt::Ext::AbstractButton::refresh" ref="2cab98fae87f87209c9999e086253fb0" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::Ext::AbstractButton::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>
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:08 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by <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>
|