<!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::Ext::Dialog Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt  <span id="projectnumber">3.2.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 Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a> </li> <li class="navelem"><a class="el" href="namespaceWt_1_1Ext.html">Ext</a> </li> <li class="navelem"><a class="el" href="classWt_1_1Ext_1_1Dialog.html">Dialog</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::Ext::Dialog Class Reference<div class="ingroups"><a class="el" href="group__ext.html">Ext widgets (Wt::Ext, deprecated)</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::Ext::Dialog" --><!-- doxytag: inherits="Wt::Ext::Panel" --> <p>A dialog emulates a modal window that blocks the user-interface. <a href="classWt_1_1Ext_1_1Dialog.html#details">More...</a></p> <p><code>#include <Wt/Ext/Dialog></code></p> <div class="dynheader"> Inheritance diagram for Wt::Ext::Dialog:</div> <div class="dyncontent"> <div class="center"><img src="classWt_1_1Ext_1_1Dialog__inherit__graph.png" border="0" usemap="#Wt_1_1Ext_1_1Dialog_inherit__map" alt="Inheritance graph"/></div> <map name="Wt_1_1Ext_1_1Dialog_inherit__map" id="Wt_1_1Ext_1_1Dialog_inherit__map"> <area shape="rect" href="classWt_1_1Ext_1_1MessageBox.html" title="A standard dialog for confirmation or to get simple user input." alt="" coords="12,603,161,629"/><area shape="rect" href="classWt_1_1Ext_1_1Panel.html" title="A container with a title and standard GUI elements." alt="" coords="33,453,140,480"/><area shape="rect" href="classWt_1_1Ext_1_1Container.html" title="A container class which manages its contents using layout managers." alt="" coords="23,379,151,405"/><area shape="rect" href="classWt_1_1Ext_1_1Component.html" title="An abstract base class for widgets that can be visually disabled." alt="" coords="17,304,156,331"/><area shape="rect" href="classWt_1_1Ext_1_1Widget.html" title="An abstract base class for all Ext widgets." alt="" coords="29,229,144,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="23,155,151,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-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"/><area shape="rect" href="classWt_1_1Ext_1_1ProgressDialog.html" title="A standard dialog to inform the user of progress during a time consuming task." alt="" coords="5,677,168,704"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classWt_1_1Ext_1_1Dialog-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-types"></a> Public Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">DialogCode</a> { <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5a1de44c73e14f7eac0884bc26721b2d30">Rejected</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5a9c3465568e73c4e4fd83021536be4ab0">Accepted</a> }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The result of a modal dialog execution. <a href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">More...</a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a76a00b2d5493cdb2f5ed7b340b1e3c6d">Dialog</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &windowTitle=<a class="el" href="classWt_1_1WString.html">WString</a>())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a Dialog with a given window title. <a href="#a76a00b2d5493cdb2f5ed7b340b1e3c6d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab2fc4339c9e2d8befafce8a28233f628"></a><!-- doxytag: member="Wt::Ext::Dialog::~Dialog" ref="ab2fc4339c9e2d8befafce8a28233f628" args="()" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#ab2fc4339c9e2d8befafce8a28233f628">~Dialog</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destruct a Dialog. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#ab6a5820f54f9663a592efd112097939a">setWindowTitle</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &windowTitle)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the dialog window title. <a href="#ab6a5820f54f9663a592efd112097939a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a64577792a7c2a48eefc56ff223b9514a">windowTitle</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the dialog window title. <a href="#a64577792a7c2a48eefc56ff223b9514a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#ab41ccccc3b96e42da6977829c0161073">contents</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the dialog contents container. <a href="#ab41ccccc3b96e42da6977829c0161073"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">DialogCode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a1dbf3f23fde44807110abe3cf43f7944">exec</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Execute the dialog in a recursive event loop. <a href="#a1dbf3f23fde44807110abe3cf43f7944"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a934c0a3801fda4cac6f6d95c8ea2fa22">done</a> (<a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">DialogCode</a> r)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a recursive event loop. <a href="#a934c0a3801fda4cac6f6d95c8ea2fa22"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#aadf699cc3ecaebd6ae093fa2c0e02fda">accept</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a recursive event loop with result Accepted. <a href="#aadf699cc3ecaebd6ae093fa2c0e02fda"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4db5e6b09bb2faf5501662c518c79fb5">reject</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Stop a recursive event loop with result Rejected. <a href="#a4db5e6b09bb2faf5501662c518c79fb5"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>< <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">DialogCode</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a62547a1ae13e2cdee0b383bdb79eef15">finished</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when the recursive event loop is ended. <a href="#a62547a1ae13e2cdee0b383bdb79eef15"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">DialogCode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a43bc83386c56a59afc7edbc7253eb6eb">result</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the result that was set for this dialog. <a href="#a43bc83386c56a59afc7edbc7253eb6eb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a846c648d3b0b2d757a1522503fad5280">setHidden</a> (bool hidden, const <a class="el" href="classWt_1_1WAnimation.html">WAnimation</a> &animation=<a class="el" href="classWt_1_1WAnimation.html">WAnimation</a>())</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Hides or shows the widget. <a href="#a846c648d3b0b2d757a1522503fad5280"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#ad9f19a8ff62e3520544f2ea10a7647ce">addButton</a> (<a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> *button)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a button at the bottom of this dialog. <a href="#ad9f19a8ff62e3520544f2ea10a7647ce"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a89e0ff2766151d3f52b9a6d37286a7d4">removeButton</a> (<a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> *button)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a button from the bottom of this dialog. <a href="#a89e0ff2766151d3f52b9a6d37286a7d4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const std::vector< <a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> * > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a9c1b9d1f950294d122f8148ec992c1a5">buttons</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the list of buttons at the bottom of this dialog. <a href="#a9c1b9d1f950294d122f8148ec992c1a5"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#aa68ac801a657f8ec69134e15bf5d765d">setDefaultButton</a> (<a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> *button)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure a default button for this dialog. <a href="#aa68ac801a657f8ec69134e15bf5d765d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4ffc5198bd395cf95b92ef769b99f393">defaultButton</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the default button for this dialog. <a href="#a4ffc5198bd395cf95b92ef769b99f393"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#aaaba1c432c8803814426daa276708d63">setSizeGripEnabled</a> (bool enabled)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configure a size grip to allow the user to resize this dialog. <a href="#aaaba1c432c8803814426daa276708d63"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a129cb8e3bd17c0531dd975f13e585a65">isSizeGripEnabled</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return if the size grip is enabled. <a href="#a129cb8e3bd17c0531dd975f13e585a65"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A dialog emulates a modal window that blocks the user-interface. </p> <p>A modal window blocks the user interface, and does not allow the user to interact with any other part of the user interface until the dialog is closed.</p> <p>There are two ways for using a Dialog window.</p> <p>The easiest way is using the <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a1dbf3f23fde44807110abe3cf43f7944" title="Execute the dialog in a recursive event loop.">exec()</a> method: after creating a Dialog window, call the <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a1dbf3f23fde44807110abe3cf43f7944" title="Execute the dialog in a recursive event loop.">exec()</a> method which blocks until the dialog window is closed, and returns the dialog result. Typically, an OK button will be connected to the <a class="el" href="classWt_1_1Ext_1_1Dialog.html#aadf699cc3ecaebd6ae093fa2c0e02fda" title="Stop a recursive event loop with result Accepted.">accept()</a> slot, and a Cancel button to the <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4db5e6b09bb2faf5501662c518c79fb5" title="Stop a recursive event loop with result Rejected.">reject()</a> slot. This solution has the drawback that it is not scalable to many concurrent sessions, since every recursive event loop (which is running during the <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a1dbf3f23fde44807110abe3cf43f7944" title="Execute the dialog in a recursive event loop.">exec()</a> method) locks a thread. Therefore it is only suitable for software that doesn't need to scale (to thousands of users).</p> <p>A second way is by treating the Dialog as another widget. The dialog may be closed by calling <a class="el" href="classWt_1_1Ext_1_1Dialog.html#aadf699cc3ecaebd6ae093fa2c0e02fda" title="Stop a recursive event loop with result Accepted.">accept()</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4db5e6b09bb2faf5501662c518c79fb5" title="Stop a recursive event loop with result Rejected.">reject()</a> or <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a934c0a3801fda4cac6f6d95c8ea2fa22" title="Stop a recursive event loop.">done()</a> (or connecting a signal to one of these methods). This will hide the dialog and emit the <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a62547a1ae13e2cdee0b383bdb79eef15" title="Signal emitted when the recursive event loop is ended.">finished()</a> signal, which you then can listen for to process the dialog result and delete the dialog. Unlike other widgets, a dialog is hidden by default. You must use the method <a class="el" href="classWt_1_1WWidget.html#a52dcef5a385ddfa0a8c3e6c20000f181" title="Shows the widget.">show()</a> or setHidden(true) to show the dialog.</p> <p>Since Dialog is a <a class="el" href="classWt_1_1Ext_1_1Panel.html" title="A container with a title and standard GUI elements.">Panel</a>, the dialog contents may be layed out inside the dialog using layout managers. To be compatible with <a class="el" href="classWt_1_1WDialog.html" title="A WDialog shows a dialog.">WDialog</a> howevere, a <a class="el" href="classWt_1_1Ext_1_1Dialog.html#ab41ccccc3b96e42da6977829c0161073" title="Return the dialog contents container.">contents()</a> method is provided which creates a <a class="el" href="classWt_1_1WFitLayout.html" title="A layout manager which spans a single widget to all available space.">WFitLayout</a> that fits a single <a class="el" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">WContainerWidget</a> widget inside the dialog.</p> <p>Only one Dialog window may exist at any time in a single application. An attempt to instantiate a second dialog will result in undefined behaviour.</p> <p>The API is a superset of the <a class="el" href="classWt_1_1WDialog.html" title="A WDialog shows a dialog.">WDialog</a> API: </p> <ul> <li> has additional methods to manage standard buttons (<a class="el" href="classWt_1_1Ext_1_1Dialog.html#ad9f19a8ff62e3520544f2ea10a7647ce" title="Add a button at the bottom of this dialog.">addButton()</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a89e0ff2766151d3f52b9a6d37286a7d4" title="Remove a button from the bottom of this dialog.">removeButton()</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a9c1b9d1f950294d122f8148ec992c1a5" title="Return the list of buttons at the bottom of this dialog.">buttons()</a>); </li> <li> may be resized by the user (unless disabled using <a class="el" href="classWt_1_1Ext_1_1Dialog.html#aaaba1c432c8803814426daa276708d63" title="Configure a size grip to allow the user to resize this dialog.">setSizeGripEnabled()</a>). </li> </ul> <div class="image"> <img src="ExtDialog-1.png" alt="ExtDialog-1.png"/> <div class="caption"> An example Dialog using BorderLayouts</div></div> </div><hr/><h2>Member Enumeration Documentation</h2> <a class="anchor" id="a173316655f09bbf63e79691b17d3c8d5"></a><!-- doxytag: member="Wt::Ext::Dialog::DialogCode" ref="a173316655f09bbf63e79691b17d3c8d5" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">Wt::Ext::Dialog::DialogCode</a></td> </tr> </table> </div> <div class="memdoc"> <p>The result of a modal dialog execution. </p> <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><em><a class="anchor" id="a173316655f09bbf63e79691b17d3c8d5a1de44c73e14f7eac0884bc26721b2d30"></a><!-- doxytag: member="Rejected" ref="a173316655f09bbf63e79691b17d3c8d5a1de44c73e14f7eac0884bc26721b2d30" args="" -->Rejected</em> </td><td> <p><a class="el" href="classWt_1_1Ext_1_1Dialog.html" title="A dialog emulates a modal window that blocks the user-interface.">Dialog</a> closed with <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4db5e6b09bb2faf5501662c518c79fb5" title="Stop a recursive event loop with result Rejected.">reject()</a> </p> </td></tr> <tr><td valign="top"><em><a class="anchor" id="a173316655f09bbf63e79691b17d3c8d5a9c3465568e73c4e4fd83021536be4ab0"></a><!-- doxytag: member="Accepted" ref="a173316655f09bbf63e79691b17d3c8d5a9c3465568e73c4e4fd83021536be4ab0" args="" -->Accepted</em> </td><td> <p><a class="el" href="classWt_1_1Ext_1_1Dialog.html" title="A dialog emulates a modal window that blocks the user-interface.">Dialog</a> closed with <a class="el" href="classWt_1_1Ext_1_1Dialog.html#aadf699cc3ecaebd6ae093fa2c0e02fda" title="Stop a recursive event loop with result Accepted.">accept()</a> </p> </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a76a00b2d5493cdb2f5ed7b340b1e3c6d"></a><!-- doxytag: member="Wt::Ext::Dialog::Dialog" ref="a76a00b2d5493cdb2f5ed7b340b1e3c6d" args="(const WString &windowTitle=WString())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Wt::Ext::Dialog::Dialog </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>windowTitle</em> = <code><a class="el" href="classWt_1_1WString.html">WString</a>()</code></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Construct a Dialog with a given window title. </p> <p>Only a single Dialog may be constructed at any time. Unlike other widgets, a dialog should not need be added to a container widget to be displayed. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="aadf699cc3ecaebd6ae093fa2c0e02fda"></a><!-- doxytag: member="Wt::Ext::Dialog::accept" ref="aadf699cc3ecaebd6ae093fa2c0e02fda" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::accept </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Stop a recursive event loop with result Accepted. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a934c0a3801fda4cac6f6d95c8ea2fa22" title="Stop a recursive event loop.">done(DialogCode)</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4db5e6b09bb2faf5501662c518c79fb5" title="Stop a recursive event loop with result Rejected.">reject()</a> </dd></dl> </div> </div> <a class="anchor" id="ad9f19a8ff62e3520544f2ea10a7647ce"></a><!-- doxytag: member="Wt::Ext::Dialog::addButton" ref="ad9f19a8ff62e3520544f2ea10a7647ce" args="(Button *button)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::addButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> * </td> <td class="paramname"><em>button</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Add a button at the bottom of this dialog. </p> <p>Is the same as <a class="el" href="classWt_1_1Ext_1_1Panel.html#aee162a984a883afe8bffbda643159b44" title="Add a button to the footer of the panel.">Panel::addFooterButton()</a> </p> </div> </div> <a class="anchor" id="a9c1b9d1f950294d122f8148ec992c1a5"></a><!-- doxytag: member="Wt::Ext::Dialog::buttons" ref="a9c1b9d1f950294d122f8148ec992c1a5" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const std::vector<<a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> *>& Wt::Ext::Dialog::buttons </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the list of buttons at the bottom of this dialog. </p> <p>Is the same as <a class="el" href="classWt_1_1Ext_1_1Panel.html#a2330c0b1b31990bcc07e8a0aeebcfb4d" title="Retrn the list of footer buttons.">Panel::footerButtons()</a> </p> <p>Reimplemented in <a class="el" href="classWt_1_1Ext_1_1MessageBox.html#a0ea9c67635ba8acadd3843c281dd3f66">Wt::Ext::MessageBox</a>.</p> </div> </div> <a class="anchor" id="ab41ccccc3b96e42da6977829c0161073"></a><!-- doxytag: member="Wt::Ext::Dialog::contents" ref="ab41ccccc3b96e42da6977829c0161073" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> * Wt::Ext::Dialog::contents </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the dialog contents container. </p> <p>The first invocation to this method creates a single <a class="el" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">WContainerWidget</a> that is fitted in the panel content area, like this: </p> <div class="fragment"><pre class="fragment"> WContainerWidget *contents = <span class="keyword">new</span> WContainerWidget(); dialog->setLayout(<span class="keyword">new</span> WFitLayout()); dialog->layout()->addWidget(contents); </pre></div> </div> </div> <a class="anchor" id="a4ffc5198bd395cf95b92ef769b99f393"></a><!-- doxytag: member="Wt::Ext::Dialog::defaultButton" ref="a4ffc5198bd395cf95b92ef769b99f393" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> * Wt::Ext::Dialog::defaultButton </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the default button for this dialog. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Dialog.html#aa68ac801a657f8ec69134e15bf5d765d" title="Configure a default button for this dialog.">setDefaultButton()</a>, <a class="el" href="classWt_1_1Ext_1_1Button.html#aba951a81109feb3fcf1823e0dd8d8fcd" title="Return if is the default button.">Button::isDefault()</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1Ext_1_1Panel.html">Wt::Ext::Panel</a>.</p> </div> </div> <a class="anchor" id="a934c0a3801fda4cac6f6d95c8ea2fa22"></a><!-- doxytag: member="Wt::Ext::Dialog::done" ref="a934c0a3801fda4cac6f6d95c8ea2fa22" args="(DialogCode r)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::done </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">DialogCode</a> </td> <td class="paramname"><em>r</em></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Stop a recursive event loop. </p> <p>Sets the dialog result, and ends a recursive event loop that was started using the <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a1dbf3f23fde44807110abe3cf43f7944" title="Execute the dialog in a recursive event loop.">exec()</a> method. </p> </div> </div> <a class="anchor" id="a1dbf3f23fde44807110abe3cf43f7944"></a><!-- doxytag: member="Wt::Ext::Dialog::exec" ref="a1dbf3f23fde44807110abe3cf43f7944" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">Dialog::DialogCode</a> Wt::Ext::Dialog::exec </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Execute the dialog in a recursive event loop. </p> <p>Executes the dialog. This blocks the current thread of execution until one of <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a934c0a3801fda4cac6f6d95c8ea2fa22" title="Stop a recursive event loop.">done(DialogCode)</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#aadf699cc3ecaebd6ae093fa2c0e02fda" title="Stop a recursive event loop with result Accepted.">accept()</a> or <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4db5e6b09bb2faf5501662c518c79fb5" title="Stop a recursive event loop with result Rejected.">reject()</a> is called.</p> <p><em>Warning: using <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a1dbf3f23fde44807110abe3cf43f7944" title="Execute the dialog in a recursive event loop.">exec()</a> does not scale to many concurrent sessions, since the thread is locked.</em></p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a934c0a3801fda4cac6f6d95c8ea2fa22" title="Stop a recursive event loop.">done(DialogCode r)</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#aadf699cc3ecaebd6ae093fa2c0e02fda" title="Stop a recursive event loop with result Accepted.">accept()</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4db5e6b09bb2faf5501662c518c79fb5" title="Stop a recursive event loop with result Rejected.">reject()</a> </dd></dl> </div> </div> <a class="anchor" id="a62547a1ae13e2cdee0b383bdb79eef15"></a><!-- doxytag: member="Wt::Ext::Dialog::finished" ref="a62547a1ae13e2cdee0b383bdb79eef15" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a><<a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">DialogCode</a>>& Wt::Ext::Dialog::finished </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Signal emitted when the recursive event loop is ended. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a934c0a3801fda4cac6f6d95c8ea2fa22" title="Stop a recursive event loop.">done(DialogCode)</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#aadf699cc3ecaebd6ae093fa2c0e02fda" title="Stop a recursive event loop with result Accepted.">accept()</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#a4db5e6b09bb2faf5501662c518c79fb5" title="Stop a recursive event loop with result Rejected.">reject()</a> </dd></dl> </div> </div> <a class="anchor" id="a129cb8e3bd17c0531dd975f13e585a65"></a><!-- doxytag: member="Wt::Ext::Dialog::isSizeGripEnabled" ref="a129cb8e3bd17c0531dd975f13e585a65" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Wt::Ext::Dialog::isSizeGripEnabled </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return if the size grip is enabled. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Dialog.html#aaaba1c432c8803814426daa276708d63" title="Configure a size grip to allow the user to resize this dialog.">setSizeGripEnabled()</a> </dd></dl> </div> </div> <a class="anchor" id="a4db5e6b09bb2faf5501662c518c79fb5"></a><!-- doxytag: member="Wt::Ext::Dialog::reject" ref="a4db5e6b09bb2faf5501662c518c79fb5" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::reject </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Stop a recursive event loop with result Rejected. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a934c0a3801fda4cac6f6d95c8ea2fa22" title="Stop a recursive event loop.">done(DialogCode)</a>, <a class="el" href="classWt_1_1Ext_1_1Dialog.html#aadf699cc3ecaebd6ae093fa2c0e02fda" title="Stop a recursive event loop with result Accepted.">accept()</a> </dd></dl> </div> </div> <a class="anchor" id="a89e0ff2766151d3f52b9a6d37286a7d4"></a><!-- doxytag: member="Wt::Ext::Dialog::removeButton" ref="a89e0ff2766151d3f52b9a6d37286a7d4" args="(Button *button)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::removeButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> * </td> <td class="paramname"><em>button</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Remove a button from the bottom of this dialog. </p> <p>The <em>button</em> must have been previously added using <a class="el" href="classWt_1_1Ext_1_1Dialog.html#ad9f19a8ff62e3520544f2ea10a7647ce" title="Add a button at the bottom of this dialog.">addButton()</a>. Is the same as <a class="el" href="classWt_1_1Ext_1_1Panel.html#a7d66822b2f4dd23165215e9dbd8bb31e" title="Remove a button from the footer of the panel.">Panel::removeFooterButton()</a> </p> </div> </div> <a class="anchor" id="a43bc83386c56a59afc7edbc7253eb6eb"></a><!-- doxytag: member="Wt::Ext::Dialog::result" ref="a43bc83386c56a59afc7edbc7253eb6eb" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a173316655f09bbf63e79691b17d3c8d5">DialogCode</a> Wt::Ext::Dialog::result </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the result that was set for this dialog. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Dialog.html#a934c0a3801fda4cac6f6d95c8ea2fa22" title="Stop a recursive event loop.">done(DialogCode)</a> </dd></dl> </div> </div> <a class="anchor" id="aa68ac801a657f8ec69134e15bf5d765d"></a><!-- doxytag: member="Wt::Ext::Dialog::setDefaultButton" ref="aa68ac801a657f8ec69134e15bf5d765d" args="(Button *button)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::setDefaultButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1Ext_1_1Button.html">Button</a> * </td> <td class="paramname"><em>button</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure a default button for this dialog. </p> <p>The <em>button</em> must have been previously added using <a class="el" href="classWt_1_1Ext_1_1Dialog.html#ad9f19a8ff62e3520544f2ea10a7647ce" title="Add a button at the bottom of this dialog.">addButton()</a>. A default button is activated when the user presses Return in the dialog.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Ext_1_1Button.html#a2ed225799c373580940b99312bfa0b79" title="Configure as the default button.">Button::setDefault()</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1Ext_1_1Panel.html">Wt::Ext::Panel</a>.</p> </div> </div> <a class="anchor" id="a846c648d3b0b2d757a1522503fad5280"></a><!-- doxytag: member="Wt::Ext::Dialog::setHidden" ref="a846c648d3b0b2d757a1522503fad5280" args="(bool hidden, const WAnimation &animation=WAnimation())" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::setHidden </td> <td>(</td> <td class="paramtype">bool </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> & </td> <td class="paramname"><em>animation</em> = <code><a class="el" href="classWt_1_1WAnimation.html">WAnimation</a>()</code> </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_1WWebWidget.html#a751a49ab835e4ffb72d5826c87adc494" title="Returns whether the widget is visible.">isVisible()</a>. </p> <p>Reimplemented from <a class="el" href="classWt_1_1Ext_1_1Widget.html#a4029ea0c43677bf49cae0e047689bda7">Wt::Ext::Widget</a>.</p> <p>Reimplemented in <a class="el" href="classWt_1_1Ext_1_1MessageBox.html#a127a61d582c445a7549a0a6874a70488">Wt::Ext::MessageBox</a>.</p> </div> </div> <a class="anchor" id="aaaba1c432c8803814426daa276708d63"></a><!-- doxytag: member="Wt::Ext::Dialog::setSizeGripEnabled" ref="aaaba1c432c8803814426daa276708d63" args="(bool enabled)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::setSizeGripEnabled </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"><em>enabled</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Configure a size grip to allow the user to resize this dialog. </p> <p>When a size grip is enabled, then the user may resize the dialog window.</p> <p>The default is <em>true</em>. </p> </div> </div> <a class="anchor" id="ab6a5820f54f9663a592efd112097939a"></a><!-- doxytag: member="Wt::Ext::Dialog::setWindowTitle" ref="ab6a5820f54f9663a592efd112097939a" args="(const WString &windowTitle)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::Ext::Dialog::setWindowTitle </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>windowTitle</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the dialog window title. </p> <p>Is the same as <a class="el" href="classWt_1_1Ext_1_1Panel.html#a46a86bb4a39637b06f0b20a9f915b72c" title="Set a title.">Panel::setTitle(const WString&)</a> </p> </div> </div> <a class="anchor" id="a64577792a7c2a48eefc56ff223b9514a"></a><!-- doxytag: member="Wt::Ext::Dialog::windowTitle" ref="a64577792a7c2a48eefc56ff223b9514a" 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::Ext::Dialog::windowTitle </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Return the dialog window title. </p> <p>Is the same as <a class="el" href="classWt_1_1Ext_1_1Panel.html#a130b5e84969fc0deb8c4ff28e9f966cc" title="Get the title.">Panel::title()</a> </p> </div> </div> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>