Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 1978

wt-doc-3.2.3-1.fc18.noarch.rpm

<!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::WPopupMenu 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
   &#160;<span id="projectnumber">3.2.3</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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;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_1WPopupMenu.html">WPopupMenu</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::WPopupMenu Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WPopupMenu" --><!-- doxytag: inherits="Wt::WCompositeWidget" -->
<p>A menu presented in a popup window.  
 <a href="classWt_1_1WPopupMenu.html#details">More...</a></p>

<p><code>#include &lt;Wt/WPopupMenu&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::WPopupMenu:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WPopupMenu__inherit__graph.png" border="0" usemap="#Wt_1_1WPopupMenu_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WPopupMenu_inherit__map" id="Wt_1_1WPopupMenu_inherit__map">
<area shape="rect" href="classWt_1_1WCompositeWidget.html" title="A widget that hides the implementation of composite widgets." alt="" coords="5,155,168,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="37,80,136,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="39,5,135,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1WPopupMenu-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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#acbb4d1eb7c4c9c22732db1f8d326755d">WPopupMenu</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new popup menu.  <a href="#acbb4d1eb7c4c9c22732db1f8d326755d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a6109cb59b9a36024e9691efe15392770">addItem</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds an item with given text.  <a href="#a6109cb59b9a36024e9691efe15392770"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#aa17fe5a8c7c687f5073ff67e0e207b27">addItem</a> (const std::string &amp;iconPath, const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds an item with given icon and text.  <a href="#aa17fe5a8c7c687f5073ff67e0e207b27"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;class T , class V &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a75e93ce640fe7860c4011dd183c7a64b">addItem</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text, T *target, void(V::*method)())</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds an item with given text, and specify a slot method to be called when the item is triggered.  <a href="#a75e93ce640fe7860c4011dd183c7a64b"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;class T , class V &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a7e1af8594a639d01b531113b48d54846">addItem</a> (const std::string &amp;iconPath, const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text, T *target, void(V::*method)())</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds an item with given text and icon, and specify a slot method to be called when activated.  <a href="#a7e1af8594a639d01b531113b48d54846"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a50eaba20dd39974f03e891bd2a74c4fd">addMenu</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text, <a class="el" href="classWt_1_1WPopupMenu.html">WPopupMenu</a> *menu)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a submenu, with given text.  <a href="#a50eaba20dd39974f03e891bd2a74c4fd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a192321f03e32aec24dafa9eedb67db08">addMenu</a> (const std::string &amp;iconPath, const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text, <a class="el" href="classWt_1_1WPopupMenu.html">WPopupMenu</a> *menu)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a submenu, with given icon and text.  <a href="#a192321f03e32aec24dafa9eedb67db08"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a7dde07454b4b7557f87b480dc9911569">add</a> (<a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *item)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a menu item.  <a href="#a7dde07454b4b7557f87b480dc9911569"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a8f4135e800cafc0366aab88fd31848e8">addSeparator</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a separator to the menu.  <a href="#a8f4135e800cafc0366aab88fd31848e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c">popup</a> (const <a class="el" href="classWt_1_1WPoint.html">WPoint</a> &amp;point)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shows the the popup at a position.  <a href="#a9da2dff4c6de6845a5a15b1a7c22572c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a8b63c8824aa820d8d3669e563b6f57f4">popup</a> (const <a class="el" href="classWt_1_1WMouseEvent.html">WMouseEvent</a> &amp;event)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shows the the popup at the location of a mouse event.  <a href="#a8b63c8824aa820d8d3669e563b6f57f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a83f2a98f8ef6a107dff0d9df61e4d92e">popup</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *location, <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation=Vertical)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shows the popup besides a widget.  <a href="#a83f2a98f8ef6a107dff0d9df61e4d92e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#aa46285d2d5698ffc27551e8bb3b35d46">exec</a> (const <a class="el" href="classWt_1_1WPoint.html">WPoint</a> &amp;point)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the the popup at a position.  <a href="#aa46285d2d5698ffc27551e8bb3b35d46"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#ae7d3aad5856e9ef376519201a07273aa">exec</a> (const <a class="el" href="classWt_1_1WMouseEvent.html">WMouseEvent</a> &amp;event)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the the popup at the location of a mouse event.  <a href="#ae7d3aad5856e9ef376519201a07273aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a7e5609129a21ed9adf212516526eb663">exec</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *location, <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation=Vertical)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the popup besides a widget.  <a href="#a7e5609129a21ed9adf212516526eb663"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a9cc90b57b1e6bf95c64b0bd542b372e8">result</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last triggered menu item.  <a href="#a9cc90b57b1e6bf95c64b0bd542b372e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a39f35f00435a61483fe25262e82d2acf">setHidden</a> (bool hidden, const <a class="el" href="classWt_1_1WAnimation.html">WAnimation</a> &amp;animation=<a class="el" href="classWt_1_1WAnimation.html">WAnimation</a>())</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Hides or shows the widget.  <a href="#a39f35f00435a61483fe25262e82d2acf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#af2c85d2c02d2f5b144117dbf0ebed4e1">setMaximumSize</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;width, const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;height)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a maximum size.  <a href="#af2c85d2c02d2f5b144117dbf0ebed4e1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a7452ab47aed273d4ec84c39fd3790be4">setMinimumSize</a> (const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;width, const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;height)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a minimum size.  <a href="#a7452ab47aed273d4ec84c39fd3790be4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a6e8aadc13b909ea3bad826515560d504">aboutToHide</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal emitted when the popup is hidden.  <a href="#a6e8aadc13b909ea3bad826515560d504"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>&lt; <a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a4f068a0c76fe439a4ba0b3e444d8f499">triggered</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal emitted when an item is activated.  <a href="#a4f068a0c76fe439a4ba0b3e444d8f499"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WPopupMenu.html#a5f65e7578883ecad37e9b1aae6a6cfe5">setAutoHide</a> (bool enabled, int autoHideDelay=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure auto-hide when the mouse leaves the menu.  <a href="#a5f65e7578883ecad37e9b1aae6a6cfe5"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A menu presented in a popup window. </p>
<p>The menu implements a typical context menu, with support for submenu's. It is not to be confused with <a class="el" href="classWt_1_1WMenu.html" title="A widget that shows a menu of options.">WMenu</a> which implements an always-visible navigation menu for a web application.</p>
<p>When initially created, the menu is invisible, until <a class="el" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c" title="Shows the the popup at a position.">popup()</a> or <a class="el" href="classWt_1_1WPopupMenu.html#aa46285d2d5698ffc27551e8bb3b35d46" title="Executes the the popup at a position.">exec()</a> is called. Then, the menu will remain visible until an item is selected, or the user cancels the menu (by hitting Escape or clicking elsewhere).</p>
<p>The implementation assumes availability of JavaScript to position the menu at the current mouse position and provide feed-back of the currently selected item.</p>
<p>Similar in use as <a class="el" href="classWt_1_1WDialog.html" title="A WDialog shows a dialog.">WDialog</a>, there are two ways of using the menu. The simplest way is to use one of the <a class="el" href="classWt_1_1WPopupMenu.html#aa46285d2d5698ffc27551e8bb3b35d46" title="Executes the the popup at a position.">exec()</a> methods, to use a reentrant event loop and wait until the user cancelled the popup menu (by hitting Escape or clicking elsewhere), or selected an item.</p>
<p>Alternatively, you can use one of the <a class="el" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c" title="Shows the the popup at a position.">popup()</a> methods to show the menu and listen to the <a class="el" href="classWt_1_1WPopupMenu.html#a6e8aadc13b909ea3bad826515560d504">aboutToHide</a> signal where you read the <a class="el" href="classWt_1_1WPopupMenu.html#a9cc90b57b1e6bf95c64b0bd542b372e8" title="Returns the last triggered menu item.">result()</a>.</p>
<p>You have several options to react to the selection of an item:</p>
<ul>
<li>Either you use the <a class="el" href="classWt_1_1WPopupMenuItem.html" title="An item in a popup menu.">WPopupMenuItem</a> itself to identify the action, perhaps by specialization or simply by binding custom data using <a class="el" href="classWt_1_1WPopupMenuItem.html#a981f24ef341a504ff6c529fd5f52dd01" title="Sets associated additional data with the item.">WPopupMenuItem::setData()</a>.</li>
<li>You can bind a separate method to each item's <a class="el" href="classWt_1_1WPopupMenuItem.html#a0c54b12f44d4813c460065d48da00644" title="Signal emitted when an item is activated.">WPopupMenuItem::triggered</a> signal.</li>
<li>You can use a <a class="el" href="classWt_1_1WSignalMapper.html" title="A utility class to connect multiple senders to a single slot.">WSignalMapper</a> to bind extra data with an item's <a class="el" href="classWt_1_1WPopupMenuItem.html#a0c54b12f44d4813c460065d48da00644" title="Signal emitted when an item is activated.">WPopupMenuItem::triggered</a> signal, and handle them in a single slot.</li>
</ul>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <span class="comment">// Create a menu with some items</span>
 <a class="code" href="classWt_1_1WPopupMenu.html#acbb4d1eb7c4c9c22732db1f8d326755d" title="Creates a new popup menu.">WPopupMenu</a> <a class="code" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c" title="Shows the the popup at a position.">popup</a>;
 popup.addItem(<span class="stringliteral">&quot;icons/item1.gif&quot;</span>, <span class="stringliteral">&quot;Item 1&quot;</span>);
 popup.addItem(<span class="stringliteral">&quot;Item 2&quot;</span>)-&gt;setCheckable(<span class="keyword">true</span>);
 popup.addItem(<span class="stringliteral">&quot;Item 3&quot;</span>);
 popup.addSeparator();
 popup.addItem(<span class="stringliteral">&quot;Item 4&quot;</span>);
 popup.addSeparator();
 popup.addItem(<span class="stringliteral">&quot;Item 5&quot;</span>);
 popup.addItem(<span class="stringliteral">&quot;Item 6&quot;</span>);
 popup.addSeparator();

 <a class="code" href="classWt_1_1WPopupMenu.html#acbb4d1eb7c4c9c22732db1f8d326755d" title="Creates a new popup menu.">WPopupMenu</a> *subMenu = <span class="keyword">new</span> <a class="code" href="classWt_1_1WPopupMenu.html#acbb4d1eb7c4c9c22732db1f8d326755d" title="Creates a new popup menu.">WPopupMenu</a>();
 subMenu-&gt;addItem(<span class="stringliteral">&quot;Sub Item 1&quot;</span>);
 subMenu-&gt;addItem(<span class="stringliteral">&quot;Sub Item 2&quot;</span>);
 popup.addMenu(<span class="stringliteral">&quot;Item 7&quot;</span>, subMenu);

 WPopupMenuItem *item = popup.exec(event);

 <span class="keywordflow">if</span> (item) {
   <span class="comment">// ... do associated action.</span>
 }
</pre></div><h3>CSS</h3>
<p>A <a class="el" href="classWt_1_1WPopupMenu.html" title="A menu presented in a popup window.">WPopupMenu</a> has the <code>Wt-popupmenu</code> style class. The look can be overridden using the following style class selectors:</p>
<div class="fragment"><pre class="fragment">
.Wt-popupmenu .Wt-item, .Wt-popupmenu .Wt-selected : item
.Wt-popupmenu .Wt-selected                         : selected item
.Wt-popupmenu .Wt-separator                        : separator
</pre></div><p>A snapshot of the <a class="el" href="classWt_1_1WPopupMenu.html" title="A menu presented in a popup window.">WPopupMenu</a>: </p>
<div class="image">
<img src="WPopupMenu-default-1.png" alt="WPopupMenu-default-1.png"/>
<div class="caption">
WPopupMenu example (default)</div></div>
 <div class="image">
<img src="WPopupMenu-polished-1.png" alt="WPopupMenu-polished-1.png"/>
<div class="caption">
WPopupMenu example (polished)</div></div>
 <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenuItem.html" title="An item in a popup menu.">WPopupMenuItem</a> </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acbb4d1eb7c4c9c22732db1f8d326755d"></a><!-- doxytag: member="Wt::WPopupMenu::WPopupMenu" ref="acbb4d1eb7c4c9c22732db1f8d326755d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WPopupMenu::WPopupMenu </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new popup menu. </p>
<p>The menu is hidden, by default, and must be shown using <a class="el" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c" title="Shows the the popup at a position.">popup()</a> or <a class="el" href="classWt_1_1WPopupMenu.html#aa46285d2d5698ffc27551e8bb3b35d46" title="Executes the the popup at a position.">exec()</a>. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6e8aadc13b909ea3bad826515560d504"></a><!-- doxytag: member="Wt::WPopupMenu::aboutToHide" ref="a6e8aadc13b909ea3bad826515560d504" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a>&amp; Wt::WPopupMenu::aboutToHide </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal emitted when the popup is hidden. </p>
<p>This signal is emitted when the popup is hidden, either because an item was selected, or when the menu was cancelled.</p>
<p>You can use <a class="el" href="classWt_1_1WPopupMenu.html#a9cc90b57b1e6bf95c64b0bd542b372e8" title="Returns the last triggered menu item.">result()</a> to get the selected item. </p>

</div>
</div>
<a class="anchor" id="a7dde07454b4b7557f87b480dc9911569"></a><!-- doxytag: member="Wt::WPopupMenu::add" ref="a7dde07454b4b7557f87b480dc9911569" args="(WPopupMenuItem *item)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::add </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a menu item. </p>
<p>Adds an item to the popup menu. </p>

</div>
</div>
<a class="anchor" id="a6109cb59b9a36024e9691efe15392770"></a><!-- doxytag: member="Wt::WPopupMenu::addItem" ref="a6109cb59b9a36024e9691efe15392770" args="(const WString &amp;text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::addItem </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds an item with given text. </p>
<p>Adds an item to the menu with given text, and returns the corresponding item object.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#a7dde07454b4b7557f87b480dc9911569" title="Adds a menu item.">add(WPopupMenuItem *)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa17fe5a8c7c687f5073ff67e0e207b27"></a><!-- doxytag: member="Wt::WPopupMenu::addItem" ref="aa17fe5a8c7c687f5073ff67e0e207b27" args="(const std::string &amp;iconPath, const WString &amp;text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::addItem </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>iconPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds an item with given icon and text. </p>
<p>Adds an item to the menu with given text and icon, and returns the corresponding item object.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The icon should have a width of 16 pixels.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#a7dde07454b4b7557f87b480dc9911569" title="Adds a menu item.">add(WPopupMenuItem *)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a75e93ce640fe7860c4011dd183c7a64b"></a><!-- doxytag: member="Wt::WPopupMenu::addItem" ref="a75e93ce640fe7860c4011dd183c7a64b" args="(const WString &amp;text, T *target, void(V::*method)())" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class V &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::addItem </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(V::*)()&#160;</td>
          <td class="paramname"><em>method</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds an item with given text, and specify a slot method to be called when the item is triggered. </p>
<p>The <em>target</em> and <code>method</code> are connected to the <a class="el" href="classWt_1_1WPopupMenuItem.html#a0c54b12f44d4813c460065d48da00644" title="Signal emitted when an item is activated.">WPopupMenuItem::triggered</a> signal.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#a7dde07454b4b7557f87b480dc9911569" title="Adds a menu item.">add(WPopupMenuItem *)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7e1af8594a639d01b531113b48d54846"></a><!-- doxytag: member="Wt::WPopupMenu::addItem" ref="a7e1af8594a639d01b531113b48d54846" args="(const std::string &amp;iconPath, const WString &amp;text, T *target, void(V::*method)())" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class V &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::addItem </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>iconPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(V::*)()&#160;</td>
          <td class="paramname"><em>method</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds an item with given text and icon, and specify a slot method to be called when activated. </p>
<p>The <em>target</em> and <code>method</code> are connected to the <a class="el" href="classWt_1_1WPopupMenuItem.html#a0c54b12f44d4813c460065d48da00644" title="Signal emitted when an item is activated.">WPopupMenuItem::triggered</a> signal.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>The icon should have a width of 16 pixels.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#a7dde07454b4b7557f87b480dc9911569" title="Adds a menu item.">add(WPopupMenuItem *)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a50eaba20dd39974f03e891bd2a74c4fd"></a><!-- doxytag: member="Wt::WPopupMenu::addMenu" ref="a50eaba20dd39974f03e891bd2a74c4fd" args="(const WString &amp;text, WPopupMenu *menu)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::addMenu </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</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_1WPopupMenu.html">WPopupMenu</a> *&#160;</td>
          <td class="paramname"><em>menu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a submenu, with given text. </p>
<p>Adds an item with text <code>text</code>, that leads to a submenu <code>menu</code>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#a7dde07454b4b7557f87b480dc9911569" title="Adds a menu item.">add(WPopupMenuItem *)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a192321f03e32aec24dafa9eedb67db08"></a><!-- doxytag: member="Wt::WPopupMenu::addMenu" ref="a192321f03e32aec24dafa9eedb67db08" args="(const std::string &amp;iconPath, const WString &amp;text, WPopupMenu *menu)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::addMenu </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>iconPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</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_1WPopupMenu.html">WPopupMenu</a> *&#160;</td>
          <td class="paramname"><em>menu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a submenu, with given icon and text. </p>
<p>Adds an item with given text and icon, that leads to a submenu <code>menu</code>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#a7dde07454b4b7557f87b480dc9911569" title="Adds a menu item.">add(WPopupMenuItem *)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a8f4135e800cafc0366aab88fd31848e8"></a><!-- doxytag: member="Wt::WPopupMenu::addSeparator" ref="a8f4135e800cafc0366aab88fd31848e8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::addSeparator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a separator to the menu. </p>
<p>Adds a separator the popup menu. The separator is an empty div with style-class "separator". </p>

</div>
</div>
<a class="anchor" id="aa46285d2d5698ffc27551e8bb3b35d46"></a><!-- doxytag: member="Wt::WPopupMenu::exec" ref="aa46285d2d5698ffc27551e8bb3b35d46" args="(const WPoint &amp;point)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::exec </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WPoint.html">WPoint</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Executes the the popup at a position. </p>
<p>Displays the popup at a point with document coordinates <code>p</code>, using <a class="el" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c" title="Shows the the popup at a position.">popup()</a>, and the waits until a menu item is selected, or the menu is cancelled.</p>
<p>Returns the selected menu (or sub-menu) item, or <code>0</code> if the user cancelled the menu.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c" title="Shows the the popup at a position.">popup()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae7d3aad5856e9ef376519201a07273aa"></a><!-- doxytag: member="Wt::WPopupMenu::exec" ref="ae7d3aad5856e9ef376519201a07273aa" args="(const WMouseEvent &amp;event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::exec </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WMouseEvent.html">WMouseEvent</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Executes the the popup at the location of a mouse event. </p>
<p>This is a convenience method for <a class="el" href="classWt_1_1WPopupMenu.html#aa46285d2d5698ffc27551e8bb3b35d46" title="Executes the the popup at a position.">exec(const WPoint&amp; p)</a> that uses the event's document coordinates.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#aa46285d2d5698ffc27551e8bb3b35d46" title="Executes the the popup at a position.">exec(const WPoint&amp;)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7e5609129a21ed9adf212516526eb663"></a><!-- doxytag: member="Wt::WPopupMenu::exec" ref="a7e5609129a21ed9adf212516526eb663" args="(WWidget *location, Orientation orientation=Vertical)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> * Wt::WPopupMenu::exec </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td>
          <td class="paramname"><em>location</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a>&#160;</td>
          <td class="paramname"><em>orientation</em> = <code>Vertical</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Executes the popup besides a widget. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WWidget.html#aef120ad789aec5ee406c2e312efeb4b5" title="Positions a widget next to another widget.">positionAt()</a>, popup(const WPointF&amp;) </dd></dl>

</div>
</div>
<a class="anchor" id="a9da2dff4c6de6845a5a15b1a7c22572c"></a><!-- doxytag: member="Wt::WPopupMenu::popup" ref="a9da2dff4c6de6845a5a15b1a7c22572c" args="(const WPoint &amp;point)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::popup </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WPoint.html">WPoint</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shows the the popup at a position. </p>
<p>Displays the popup at a point with document coordinates <code>point</code>. The positions intelligent, and will chose one of the four menu corners to correspond to this point so that the popup menu is completely visible within the window.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#aa46285d2d5698ffc27551e8bb3b35d46" title="Executes the the popup at a position.">exec()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a8b63c8824aa820d8d3669e563b6f57f4"></a><!-- doxytag: member="Wt::WPopupMenu::popup" ref="a8b63c8824aa820d8d3669e563b6f57f4" args="(const WMouseEvent &amp;event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::popup </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WMouseEvent.html">WMouseEvent</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shows the the popup at the location of a mouse event. </p>
<p>This is a convenience method for <a class="el" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c" title="Shows the the popup at a position.">popup(const WPoint&amp;)</a> that uses the event's document coordinates.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenu.html#a9da2dff4c6de6845a5a15b1a7c22572c" title="Shows the the popup at a position.">popup(const WPoint&amp; p)</a>, <a class="el" href="classWt_1_1WMouseEvent.html#a76d0dffbee01451f043ff603eb133334" title="Returns the mouse position relative to the document.">WMouseEvent::document()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a83f2a98f8ef6a107dff0d9df61e4d92e"></a><!-- doxytag: member="Wt::WPopupMenu::popup" ref="a83f2a98f8ef6a107dff0d9df61e4d92e" args="(WWidget *location, Orientation orientation=Vertical)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::popup </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td>
          <td class="paramname"><em>location</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a>&#160;</td>
          <td class="paramname"><em>orientation</em> = <code>Vertical</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shows the popup besides a widget. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WWidget.html#aef120ad789aec5ee406c2e312efeb4b5" title="Positions a widget next to another widget.">positionAt()</a>, popup(const WPointF&amp;) </dd></dl>

</div>
</div>
<a class="anchor" id="a9cc90b57b1e6bf95c64b0bd542b372e8"></a><!-- doxytag: member="Wt::WPopupMenu::result" ref="a9cc90b57b1e6bf95c64b0bd542b372e8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a>* Wt::WPopupMenu::result </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the last triggered menu item. </p>
<p>The result is <code>0</code> when the user cancelled the popup menu. </p>

</div>
</div>
<a class="anchor" id="a5f65e7578883ecad37e9b1aae6a6cfe5"></a><!-- doxytag: member="Wt::WPopupMenu::setAutoHide" ref="a5f65e7578883ecad37e9b1aae6a6cfe5" args="(bool enabled, int autoHideDelay=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::setAutoHide </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enabled</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>autoHideDelay</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configure auto-hide when the mouse leaves the menu. </p>
<p>If <code>enabled</code>, The popup menu will be hidden when the mouse leaves the menu for longer than <code>autoHideDelay</code> (milliseconds). The popup menu result will be 0, as if the user cancelled.</p>
<p>By default, this option is disabled. </p>

</div>
</div>
<a class="anchor" id="a39f35f00435a61483fe25262e82d2acf"></a><!-- doxytag: member="Wt::WPopupMenu::setHidden" ref="a39f35f00435a61483fe25262e82d2acf" args="(bool hidden, const WAnimation &amp;animation=WAnimation())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::setHidden </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>hidden</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WAnimation.html">WAnimation</a> &amp;&#160;</td>
          <td class="paramname"><em>animation</em> = <code><a class="el" href="classWt_1_1WAnimation.html">WAnimation</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Hides or shows the widget. </p>
<p>Hides or show the widget (including all its descendant widgets). When setting <code>hidden</code> = <code>false</code>, this widget and all descendant widgets that are not hidden will be shown. A widget is only visible if it and all its ancestors in the widget tree are visible, which may be checked using <a class="el" href="classWt_1_1WCompositeWidget.html#a1ae4501ce5807c22b71532d9fd564337" title="Returns whether the widget is visible.">isVisible()</a>. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WCompositeWidget.html#a2c905ba0dd649609a6a29b89b3438e1b">Wt::WCompositeWidget</a>.</p>

</div>
</div>
<a class="anchor" id="af2c85d2c02d2f5b144117dbf0ebed4e1"></a><!-- doxytag: member="Wt::WPopupMenu::setMaximumSize" ref="af2c85d2c02d2f5b144117dbf0ebed4e1" args="(const WLength &amp;width, const WLength &amp;height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::setMaximumSize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a maximum size. </p>
<p>Specifies a maximum size for this widget, setting CSS <code>max-width</code> and <code>max-height</code> properties.</p>
<p>The default the maximum width and height are <a class="el" href="classWt_1_1WLength.html#a0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">WLength::Auto</a>, indicating no maximum size. A <a class="el" href="classWt_1_1WLength.html#a908caf5d6be7e244e24598e6d22cd4c0a304d9ef07db638690997830a7b348db1" title="Percentage (meaning context-sensitive)">WLength::Percentage</a> size should not be used, as this is (in virtually all cases) undefined behaviour.</p>
<p>When the widget is a container widget that contains a layout manager, then setting a maximum size will have the effect of letting the size of the container to reflect the preferred size of the contents (rather than constraining the size of the children based on the size of the container), up to the specified maximum size.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WCompositeWidget.html#a976e94e38c7a9cc0f212e13a9792912e" title="Resizes the widget.">resize()</a>, <a class="el" href="classWt_1_1WPopupMenu.html#a7452ab47aed273d4ec84c39fd3790be4" title="Sets a minimum size.">setMinimumSize()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WCompositeWidget.html#a7ba5622622b118e72b9a407d10df7ece">Wt::WCompositeWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a7452ab47aed273d4ec84c39fd3790be4"></a><!-- doxytag: member="Wt::WPopupMenu::setMinimumSize" ref="a7452ab47aed273d4ec84c39fd3790be4" args="(const WLength &amp;width, const WLength &amp;height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WPopupMenu::setMinimumSize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WLength.html">WLength</a> &amp;&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a minimum size. </p>
<p>Specifies a minimum size for this widget, setting CSS <code>min-width</code> and <code>min-height</code> properties.</p>
<p>The default minimum width and height is 0. The special value <a class="el" href="classWt_1_1WLength.html#a0cf39ca4225776879d56ade60320c31a" title="An &#39;auto&#39; length.">WLength::Auto</a> indicates that the initial width is used as minimum size. A <a class="el" href="classWt_1_1WLength.html#a908caf5d6be7e244e24598e6d22cd4c0a304d9ef07db638690997830a7b348db1" title="Percentage (meaning context-sensitive)">WLength::Percentage</a> size should not be used, as this is (in virtually all cases) undefined behaviour.</p>
<p>When the widget is inserted in a layout manager, then the minimum size will be taken into account.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WCompositeWidget.html#a976e94e38c7a9cc0f212e13a9792912e" title="Resizes the widget.">resize()</a>, <a class="el" href="classWt_1_1WCompositeWidget.html#ab14d3fa5b63d36c1df1148f49b62e92a" title="Returns the minimum width.">minimumWidth()</a>, <a class="el" href="classWt_1_1WCompositeWidget.html#a3289852d4a8a268fc8ee2c4c474bce15" title="Returns the minimum height.">minimumHeight()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WCompositeWidget.html#acf95c795e47eee85425c98509aa8e57a">Wt::WCompositeWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a4f068a0c76fe439a4ba0b3e444d8f499"></a><!-- doxytag: member="Wt::WPopupMenu::triggered" ref="a4f068a0c76fe439a4ba0b3e444d8f499" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a>&lt;<a class="el" href="classWt_1_1WPopupMenuItem.html">WPopupMenuItem</a> *&gt;&amp; Wt::WPopupMenu::triggered </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal emitted when an item is activated. </p>
<p>Passes the activated item as argument. This signal is only emitted for the toplevel menu.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WPopupMenuItem.html#a0c54b12f44d4813c460065d48da00644" title="Signal emitted when an item is activated.">WPopupMenuItem::triggered()</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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</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 Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<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>