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
|
<!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::WMenuItem 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="classWt_1_1WMenuItem.html">WMenuItem</a>
</div>
</div>
<div class="contents">
<h1>Wt::WMenuItem Class Reference</h1><!-- doxytag: class="Wt::WMenuItem" --><!-- doxytag: inherits="Wt::WObject" -->A single item in a menu.
<a href="#_details">More...</a>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WMenuItem:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WMenuItem__inherit__graph.png" border="0" usemap="#Wt_1_1WMenuItem__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WMenuItem__inherit__map">
<area shape="rect" href="classWt_1_1WSubMenuItem.html" title="A menu item that contains a nested sub menu." alt="" coords="5,155,144,181"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="27,5,123,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WMenuItem-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 Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#5e276ed0505694a7b89a1dd0c62aa55a">LoadPolicy</a> { <a class="el" href="classWt_1_1WMenuItem.html#5e276ed0505694a7b89a1dd0c62aa55a58296165dae031cb608e3d198ed0dee0">LazyLoading</a>,
<a class="el" href="classWt_1_1WMenuItem.html#5e276ed0505694a7b89a1dd0c62aa55a7917744540a0fbf7f6822014550f990b">PreLoading</a>
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enumeration that determines when contents should be loaded. <a href="classWt_1_1WMenuItem.html#5e276ed0505694a7b89a1dd0c62aa55a">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#772f165f3dc02138c28d74f1f42d1a45">WMenuItem</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &text, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *contents, <a class="el" href="classWt_1_1WMenuItem.html#5e276ed0505694a7b89a1dd0c62aa55a">LoadPolicy</a> policy=LazyLoading)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new item. <a href="#772f165f3dc02138c28d74f1f42d1a45"></a><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_1WMenuItem.html#e9f4792069fcf2f3410c002fdab2d2f1">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 text for this item. <a href="#e9f4792069fcf2f3410c002fdab2d2f1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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_1WMenuItem.html#2061c3c242e98e53c820bfa500db492c">text</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the text for this item. <a href="#2061c3c242e98e53c820bfa500db492c"></a><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_1WMenuItem.html#4291756303dbf128b718679cdb907a5a">setPathComponent</a> (const std::string &path)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the path component for this item. <a href="#4291756303dbf128b718679cdb907a5a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#5ab0b5430b9fb852a45886deb0ff01b1">pathComponent</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the path component for this item. <a href="#5ab0b5430b9fb852a45886deb0ff01b1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="768d7928949e1d54c0e85dba488e3ea6"></a><!-- doxytag: member="Wt::WMenuItem::menu" ref="768d7928949e1d54c0e85dba488e3ea6" args="() const " -->
<a class="el" href="classWt_1_1WMenu.html">WMenu</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#768d7928949e1d54c0e85dba488e3ea6">menu</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the menu. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#961bb119e2231aa47d31d829178899d6">contents</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the contents widget for this item. <a href="#961bb119e2231aa47d31d829178899d6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#185b334943c3e07d63d3e45a17e960f7">itemWidget</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the widget that represents the item. <a href="#185b334943c3e07d63d3e45a17e960f7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9acd8465249e221093f87d9a726c33af"></a><!-- doxytag: member="Wt::WMenuItem::select" ref="9acd8465249e221093f87d9a726c33af" args="()" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#9acd8465249e221093f87d9a726c33af">select</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Selects this item. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#5dd1286e97b110b621e00e02e58a15d2">createItemWidget</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates the widget that represents the item. <a href="#5dd1286e97b110b621e00e02e58a15d2"></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_1WMenuItem.html#df18031f469001bdd5333cff0a66a9a4">updateItemWidget</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *itemWidget)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Updates the widget that represents the item. <a href="#df18031f469001bdd5333cff0a66a9a4"></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_1WMenuItem.html#3af62f2a97827c844e021ad2dd3f6085">renderSelected</a> (bool selected)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Renders the item as selected or unselected. <a href="#3af62f2a97827c844e021ad2dd3f6085"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual SignalBase & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WMenuItem.html#5f1d03e160011fcd39759b681f8bc063">activateSignal</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the signal used to activate the item. <a href="#5f1d03e160011fcd39759b681f8bc063"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A single item in a menu.
<p>
The item determines the look and behaviour of a single item in a <a class="el" href="classWt_1_1WMenu.html" title="A widget that shows a menu of options.">WMenu</a>.<p>
By default, a <a class="el" href="classWt_1_1WMenuItem.html" title="A single item in a menu.">WMenuItem</a> is implemented using a <a class="el" href="classWt_1_1WAnchor.html" title="A widget that represents an HTML anchor (to link to other documents).">WAnchor</a> widget. When the menu participates in application internal paths (see <a class="el" href="classWt_1_1WMenu.html#e1807eba0b1002808dbec779d00a79dc" title="Enables internal paths for items.">WMenu::setInternalPathEnabled()</a>), the anchor references the bookmark URL corresponding to the <a class="el" href="classWt_1_1WMenuItem.html#5ab0b5430b9fb852a45886deb0ff01b1" title="Returns the path component for this item.">pathComponent()</a> for the item (see <a class="el" href="classWt_1_1WApplication.html#37b4cf44f393688785ed3b34f53fead1" title="Returns a bookmarkable URL for the current internal path.">WApplication::bookmarkUrl()</a>.<p>
To provide another look for the menu items (such as perhaps adding an icon), you can specialize this class, and reimplement the virtual methods:<p>
<ul>
<li><a class="el" href="classWt_1_1WMenuItem.html#5dd1286e97b110b621e00e02e58a15d2" title="Creates the widget that represents the item.">createItemWidget()</a>: to provide another widget to represent the item.</li><li><a class="el" href="classWt_1_1WMenuItem.html#df18031f469001bdd5333cff0a66a9a4" title="Updates the widget that represents the item.">updateItemWidget()</a>: to update the widget to reflect item changes, triggered by for example <a class="el" href="classWt_1_1WMenuItem.html#e9f4792069fcf2f3410c002fdab2d2f1" title="Sets the text for this item.">setText()</a> and <a class="el" href="classWt_1_1WMenuItem.html#4291756303dbf128b718679cdb907a5a" title="Sets the path component for this item.">setPathComponent()</a>.</li><li>optionally, <a class="el" href="classWt_1_1WMenuItem.html#5f1d03e160011fcd39759b681f8bc063" title="Returns the signal used to activate the item.">activateSignal()</a>: to bind the event for activating the item to something else than the clicked event.</li><li>optionally, <a class="el" href="classWt_1_1WMenuItem.html#3af62f2a97827c844e021ad2dd3f6085" title="Renders the item as selected or unselected.">renderSelected(bool)</a>: if you need to do additional styling to reflect a selection, other than changing style classes.</li></ul>
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WMenu.html" title="A widget that shows a menu of options.">WMenu</a> <p>
<a class="el" href="classWt_1_1WMenu.html#cbccfeebf2c93244516dec81dcc56fda" title="Adds an item.">WMenu::addItem(WMenuItem *)</a> </dd></dl>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="5e276ed0505694a7b89a1dd0c62aa55a"></a><!-- doxytag: member="Wt::WMenuItem::LoadPolicy" ref="5e276ed0505694a7b89a1dd0c62aa55a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classWt_1_1WMenuItem.html#5e276ed0505694a7b89a1dd0c62aa55a">Wt::WMenuItem::LoadPolicy</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Enumeration that determines when contents should be loaded.
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="5e276ed0505694a7b89a1dd0c62aa55a58296165dae031cb608e3d198ed0dee0"></a><!-- doxytag: member="LazyLoading" ref="5e276ed0505694a7b89a1dd0c62aa55a58296165dae031cb608e3d198ed0dee0" args="" -->LazyLoading</em> </td><td>
Lazy loading: on first use. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="5e276ed0505694a7b89a1dd0c62aa55a7917744540a0fbf7f6822014550f990b"></a><!-- doxytag: member="PreLoading" ref="5e276ed0505694a7b89a1dd0c62aa55a7917744540a0fbf7f6822014550f990b" args="" -->PreLoading</em> </td><td>
Pre-loading: before first use. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="772f165f3dc02138c28d74f1f42d1a45"></a><!-- doxytag: member="Wt::WMenuItem::WMenuItem" ref="772f165f3dc02138c28d74f1f42d1a45" args="(const WString &text, WWidget *contents, LoadPolicy policy=LazyLoading)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Wt::WMenuItem::WMenuItem </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>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>contents</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classWt_1_1WMenuItem.html#5e276ed0505694a7b89a1dd0c62aa55a">LoadPolicy</a> </td>
<td class="paramname"> <em>policy</em> = <code>LazyLoading</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a new item.
<p>
The text specifies the item text. The contents is the widget that must be shown in the <a class="el" href="classWt_1_1WMenu.html" title="A widget that shows a menu of options.">WMenu</a> contents stack when the item is selected.<p>
The load policy specifies whether the contents widgets is transmitted only when it the item is activated for the first time (LazyLoading) or transmitted prior to first rendering.<p>
The <a class="el" href="classWt_1_1WMenuItem.html#5ab0b5430b9fb852a45886deb0ff01b1" title="Returns the path component for this item.">pathComponent()</a> is derived from <code>text</code>, and can be customized using <a class="el" href="classWt_1_1WMenuItem.html#4291756303dbf128b718679cdb907a5a" title="Sets the path component for this item.">setPathComponent()</a>.<p>
<code>contents</code> may be 0, in which case no contents is associated with the item in the contents stack.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="e9f4792069fcf2f3410c002fdab2d2f1"></a><!-- doxytag: member="Wt::WMenuItem::setText" ref="e9f4792069fcf2f3410c002fdab2d2f1" args="(const WString &text)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WMenuItem::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></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the text for this item.
<p>
Unless a custom path component was defined, the <a class="el" href="classWt_1_1WMenuItem.html#5ab0b5430b9fb852a45886deb0ff01b1" title="Returns the path component for this item.">pathComponent()</a> is also updated based on the new text.<p>
The item widget is updated using <a class="el" href="classWt_1_1WMenuItem.html#df18031f469001bdd5333cff0a66a9a4" title="Updates the widget that represents the item.">updateItemWidget()</a>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WMenuItem.html#4291756303dbf128b718679cdb907a5a" title="Sets the path component for this item.">setPathComponent()</a>; </dd></dl>
</div>
</div><p>
<a class="anchor" name="2061c3c242e98e53c820bfa500db492c"></a><!-- doxytag: member="Wt::WMenuItem::text" ref="2061c3c242e98e53c820bfa500db492c" 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::WMenuItem::text </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the text for this item.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WMenuItem.html#e9f4792069fcf2f3410c002fdab2d2f1" title="Sets the text for this item.">setText()</a>; </dd></dl>
</div>
</div><p>
<a class="anchor" name="4291756303dbf128b718679cdb907a5a"></a><!-- doxytag: member="Wt::WMenuItem::setPathComponent" ref="4291756303dbf128b718679cdb907a5a" args="(const std::string &path)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WMenuItem::setPathComponent </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"> <em>path</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the path component for this item.
<p>
The path component is used by the menu item in the application internal path (see <a class="el" href="classWt_1_1WApplication.html#2c1a10aadc0d7ed877b5715b42ca4911" title="Change the internal path.">WApplication::setInternalPath()</a>), when internal paths are enabled (see <a class="el" href="classWt_1_1WMenu.html#e1807eba0b1002808dbec779d00a79dc" title="Enables internal paths for items.">WMenu::setInternalPathEnabled()</a>) for the menu.<p>
You may specify an empty <code>path</code> to let a menu item be the "default" menu option.<p>
For example, if <a class="el" href="classWt_1_1WMenu.html#8cdf2f75f67efa0c10c6fb25fd1cd4da" title="Returns the internal base path.">WMenu::internalBasePath()</a> is <code>"/examples/"</code> and <a class="el" href="classWt_1_1WMenuItem.html#5ab0b5430b9fb852a45886deb0ff01b1" title="Returns the path component for this item.">pathComponent()</a> for is <code>"charts/"</code>, then the internal path for the item will be <code>"/examples/charts/"</code>.<p>
By default, the path is automatically derived from <a class="el" href="classWt_1_1WMenuItem.html#2061c3c242e98e53c820bfa500db492c" title="Returns the text for this item.">text()</a>. If a <a class="el" href="classWt_1_1WString.html#61a714a97bb6d70d60be6f9a1997e636">literal text</a> is used, the path is based on the text itself, otherwise on the <a class="el" href="classWt_1_1WString.html#18807776c41bdaebd7264bbabdd2282a">key</a>. It is converted to lower case, and replacing white space and special characters with '_'.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WMenuItem.html#e9f4792069fcf2f3410c002fdab2d2f1" title="Sets the text for this item.">setText()</a>, <a class="el" href="classWt_1_1WMenu.html#e1807eba0b1002808dbec779d00a79dc" title="Enables internal paths for items.">WMenu::setInternalPathEnabled()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="5ab0b5430b9fb852a45886deb0ff01b1"></a><!-- doxytag: member="Wt::WMenuItem::pathComponent" ref="5ab0b5430b9fb852a45886deb0ff01b1" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string Wt::WMenuItem::pathComponent </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the path component for this item.
<p>
You may want to reimplement this to customize the path component set by the item in the application internal path.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WMenuItem.html#4291756303dbf128b718679cdb907a5a" title="Sets the path component for this item.">setPathComponent()</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classWt_1_1WSubMenuItem.html#f774d49f24f2ee362cc28eb688cb9eef">Wt::WSubMenuItem</a>.</p>
</div>
</div><p>
<a class="anchor" name="961bb119e2231aa47d31d829178899d6"></a><!-- doxytag: member="Wt::WMenuItem::contents" ref="961bb119e2231aa47d31d829178899d6" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::WMenuItem::contents </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the contents widget for this item.
<p>
The contents widget is the widget in the <a class="el" href="classWt_1_1WStackedWidget.html" title="A container widget that stacks its widgets on top of each other.">WStackedWidget</a> associated with this item.
</div>
</div><p>
<a class="anchor" name="185b334943c3e07d63d3e45a17e960f7"></a><!-- doxytag: member="Wt::WMenuItem::itemWidget" ref="185b334943c3e07d63d3e45a17e960f7" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::WMenuItem::itemWidget </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the widget that represents the item.
<p>
This returns the item widget, creating it using <a class="el" href="classWt_1_1WMenuItem.html#5dd1286e97b110b621e00e02e58a15d2" title="Creates the widget that represents the item.">createItemWidget()</a> if necessary.
</div>
</div><p>
<a class="anchor" name="5dd1286e97b110b621e00e02e58a15d2"></a><!-- doxytag: member="Wt::WMenuItem::createItemWidget" ref="5dd1286e97b110b621e00e02e58a15d2" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::WMenuItem::createItemWidget </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates the widget that represents the item.
<p>
The default implementation will simply return a <a class="el" href="classWt_1_1WAnchor.html" title="A widget that represents an HTML anchor (to link to other documents).">WAnchor</a>. A call to <a class="el" href="classWt_1_1WMenuItem.html#5dd1286e97b110b621e00e02e58a15d2" title="Creates the widget that represents the item.">createItemWidget()</a> is immediately followed by <a class="el" href="classWt_1_1WMenuItem.html#df18031f469001bdd5333cff0a66a9a4" title="Updates the widget that represents the item.">updateItemWidget()</a>.<p>
If you reimplement this method, you should probably also reimplement <a class="el" href="classWt_1_1WMenuItem.html#df18031f469001bdd5333cff0a66a9a4" title="Updates the widget that represents the item.">updateItemWidget()</a>.
<p>Reimplemented in <a class="el" href="classWt_1_1WSubMenuItem.html#3883ce17fd7d04553510700189fbc7af">Wt::WSubMenuItem</a>.</p>
</div>
</div><p>
<a class="anchor" name="df18031f469001bdd5333cff0a66a9a4"></a><!-- doxytag: member="Wt::WMenuItem::updateItemWidget" ref="df18031f469001bdd5333cff0a66a9a4" args="(WWidget *itemWidget)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WMenuItem::updateItemWidget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>itemWidget</em> </td>
<td> ) </td>
<td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Updates the widget that represents the item.
<p>
The default implementation will cast the <code>itemWidget</code> to a <a class="el" href="classWt_1_1WAnchor.html" title="A widget that represents an HTML anchor (to link to other documents).">WAnchor</a>, and set the anchor's text and destination according to <a class="el" href="classWt_1_1WMenuItem.html#2061c3c242e98e53c820bfa500db492c" title="Returns the text for this item.">text()</a> and <a class="el" href="classWt_1_1WMenuItem.html#5ab0b5430b9fb852a45886deb0ff01b1" title="Returns the path component for this item.">pathComponent()</a>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WMenuItem.html#5dd1286e97b110b621e00e02e58a15d2" title="Creates the widget that represents the item.">createItemWidget()</a> </dd></dl>
<p>Reimplemented in <a class="el" href="classWt_1_1WSubMenuItem.html#44820d1555db0e1f6593dd80d1c0b34e">Wt::WSubMenuItem</a>.</p>
</div>
</div><p>
<a class="anchor" name="3af62f2a97827c844e021ad2dd3f6085"></a><!-- doxytag: member="Wt::WMenuItem::renderSelected" ref="3af62f2a97827c844e021ad2dd3f6085" args="(bool selected)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WMenuItem::renderSelected </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>selected</em> </td>
<td> ) </td>
<td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Renders the item as selected or unselected.
<p>
The default implementation sets the styleclass for <a class="el" href="classWt_1_1WMenuItem.html#185b334943c3e07d63d3e45a17e960f7" title="Returns the widget that represents the item.">itemWidget()</a> to 'item' for an unselected, and 'itemselected' for a selected item.<p>
Note that this method is called from within a stateless slot implementation, and thus should be stateless as well.
<p>Reimplemented in <a class="el" href="classWt_1_1WSubMenuItem.html#d3096bef2abbc291cb2560cd16d92458">Wt::WSubMenuItem</a>.</p>
</div>
</div><p>
<a class="anchor" name="5f1d03e160011fcd39759b681f8bc063"></a><!-- doxytag: member="Wt::WMenuItem::activateSignal" ref="5f1d03e160011fcd39759b681f8bc063" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SignalBase & Wt::WMenuItem::activateSignal </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [protected, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the signal used to activate the item.
<p>
The default implementation will tries to cast the <a class="el" href="classWt_1_1WMenuItem.html#185b334943c3e07d63d3e45a17e960f7" title="Returns the widget that represents the item.">itemWidget()</a> to a <a class="el" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user-interface interaction.">WInteractWidget</a> and returns the <a class="el" href="classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c">clicked signal</a>.
<p>Reimplemented in <a class="el" href="classWt_1_1WSubMenuItem.html#38d7a0fa3581f34aa72c9fd4d1a6eaeb">Wt::WSubMenuItem</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 <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>
|