1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Wt::WDialog Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WDialog.html">WDialog</a>
</div>
</div>
<div class="contents">
<h1>Wt::WDialog Class Reference</h1><!-- doxytag: class="Wt::WDialog" --><!-- doxytag: inherits="Wt::WCompositeWidget" -->A WDialog shows a dialog.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WDialog></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WDialog:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WDialog__inherit__graph.png" border="0" usemap="#Wt_1_1WDialog__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WDialog__inherit__map">
<area shape="rect" href="classWt_1_1WMessageBox.html" title="A standard dialog for confirmation or to get simple user input." alt="" coords="19,304,152,331"><area shape="rect" href="classWt_1_1WCompositeWidget.html" title="A widget that hides the implementation of composite widgets." alt="" coords="5,155,165,181"><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="37,80,133,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="37,5,133,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WDialog-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">DialogCode</a> { <a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e68279eafdc9665e6c91d98d2b512a962c">Rejected</a>,
<a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6d4852d715c07070ca1b117cb7e263840">Accepted</a>
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The result of a modal dialog execution. <a href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#b31907fa4f641192b2720ba735226d58">WDialog</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">Constructs a WDialog with a given window title. <a href="#b31907fa4f641192b2720ba735226d58"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="97fa6bfc8c31a3bf98284ad66b2df738"></a><!-- doxytag: member="Wt::WDialog::~WDialog" ref="97fa6bfc8c31a3bf98284ad66b2df738" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#97fa6bfc8c31a3bf98284ad66b2df738">~WDialog</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructs a WDialog. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#e0923afc12895002f30b8ee12ab91aae">setWindowTitle</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &title)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the dialog window title. <a href="#e0923afc12895002f30b8ee12ab91aae"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#cf71bbc665dff57a7af201b4f32f59f8">windowTitle</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the dialog window title. <a href="#cf71bbc665dff57a7af201b4f32f59f8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#626d5109624e7442f9a96310b6919a5a">setCaption</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &caption)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the dialog caption (<b>deprecated</b>). <a href="#626d5109624e7442f9a96310b6919a5a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#f56bc5d90c6da742faa454ddfed4ce00">caption</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the dialog caption (<b>deprecated</b>). <a href="#f56bc5d90c6da742faa454ddfed4ce00"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#b8ae8763648de12a67ada4b8237154a9">setTitleBarEnabled</a> (bool enabled)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables or disables the title bar. <a href="#b8ae8763648de12a67ada4b8237154a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#a23c6db155044c4f2c49269a874dd5cb">isTitleBarEnabled</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the title bar is enabled. <a href="#a23c6db155044c4f2c49269a874dd5cb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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_1WDialog.html#10f2f5df7ee5762845bf7ba334f170ae">contents</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the dialog contents container. <a href="#10f2f5df7ee5762845bf7ba334f170ae"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">DialogCode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#e56cf798aba9f09a8869df50d3f334a6">exec</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Executes the dialog in a recursive event loop. <a href="#e56cf798aba9f09a8869df50d3f334a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#8d0a8725d03e5d7d144ef015983a8d08">done</a> (<a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">DialogCode</a> r)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stops the dialog. <a href="#8d0a8725d03e5d7d144ef015983a8d08"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288">accept</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Closes the dialog, with result is Accepted. <a href="#fab6f75ebb2d2970ebe0bbf1cf19f288"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#fcff2ea14c4ae79b2fc7bac1a86b0062">reject</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Closes the dialog, with result is Rejected. <a href="#fcff2ea14c4ae79b2fc7bac1a86b0062"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>< <a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">DialogCode</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#e7f3991e5adf17ec4e9e93fd8a3a2f79">finished</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when the dialog is closed. <a href="#e7f3991e5adf17ec4e9e93fd8a3a2f79"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">DialogCode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#469ba179a2d620e2f7f6e0142f891c27">result</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the result that was set for this dialog. <a href="#469ba179a2d620e2f7f6e0142f891c27"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#cc8c9734f33b405bf0a706fe2f6e4e05">setModal</a> (bool modal)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets whether the dialog is modal. <a href="#cc8c9734f33b405bf0a706fe2f6e4e05"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#3ded330bb27133ac59ec8d8f0e7a1bcf">isModal</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the dialog is modal. <a href="#3ded330bb27133ac59ec8d8f0e7a1bcf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WDialog.html#a3c85e704c0d7825bd342713f50b35f9">setHidden</a> (bool hidden)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets whether the widget is hidden. <a href="#a3c85e704c0d7825bd342713f50b35f9"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A WDialog shows a dialog.
<p>
By default, the dialog is <em>modal</em>. 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 (this is enforced at the server side, so you may rely on this behavior).<p>
There are two distinct ways for using a WDialog window.<p>
A WDialog can be used as any other widget. In this case, the WDialog is simply instantiated as another widget. The dialog may be closed by calling <a class="el" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">accept()</a>, <a class="el" href="classWt_1_1WDialog.html#fcff2ea14c4ae79b2fc7bac1a86b0062" title="Closes the dialog, with result is Rejected.">reject()</a> or <a class="el" href="classWt_1_1WDialog.html#8d0a8725d03e5d7d144ef015983a8d08" title="Stops the dialog.">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_1WDialog.html#e7f3991e5adf17ec4e9e93fd8a3a2f79" title="Signal emitted when the dialog is closed.">finished()</a> signal, which you then can listen for to process the dialog result and delete the dialog. Unlike other widgets, a dialog does not need to be added to a parent widget, but is hidden by default. You must use the method <a class="el" href="classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181" title="Shows the widget.">show()</a> or setHidden(true) to show the dialog.<p>
The easiest way to display a modal dialog is using <a class="el" href="classWt_1_1WDialog.html#e56cf798aba9f09a8869df50d3f334a6" title="Executes the dialog in a recursive event loop.">exec()</a>: after creating a WDialog window, a call to <a class="el" href="classWt_1_1WDialog.html#e56cf798aba9f09a8869df50d3f334a6" title="Executes the dialog in a recursive event loop.">exec()</a> will block (suspend the thread) until the dialog window is closed, and return the dialog result. Typically, an OK button will be connected to <a class="el" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">accept()</a>, and in some cases a Cancel button to <a class="el" href="classWt_1_1WDialog.html#fcff2ea14c4ae79b2fc7bac1a86b0062" title="Closes the dialog, with result is Rejected.">reject()</a>. This solution has the drawback that it is not scalable to many concurrent sessions, since for every session with a recursive event loop (which is running durring the <a class="el" href="classWt_1_1WDialog.html#e56cf798aba9f09a8869df50d3f334a6" title="Executes the dialog in a recursive event loop.">exec()</a> method), a thread is locked. In practical terms, this means it is only suitable for software with restricted access or deployed on an intranet or extranet.<p>
Use setModal(false) to create a non-modal dialog. A non-modal dialog does not block the underlying user interface: the user must not first deal with the dialog before interacting with the rest of the user interface.<p>
Contents for the dialog is defined by adding it to the <a class="el" href="classWt_1_1WDialog.html#10f2f5df7ee5762845bf7ba334f170ae" title="Returns the dialog contents container.">contents()</a> widget.<p>
Usage example, using the <a class="el" href="classWt_1_1WDialog.html#e56cf798aba9f09a8869df50d3f334a6" title="Executes the dialog in a recursive event loop.">exec()</a> method: <div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WDialog.html" title="A WDialog shows a dialog.">Wt::WDialog</a> dialog(<span class="stringliteral">"Personalia"</span>);
<span class="keyword">new</span> <a class="code" href="classWt_1_1WText.html" title="A widget that renders (XHTML) text.">Wt::WText</a>(<span class="stringliteral">"Enter your name: "</span>, dialog.contents());
<a class="code" href="classWt_1_1WLineEdit.html" title="A widget that provides a single line edit.">Wt::WLineEdit</a> edit(dialog.contents());
<span class="keyword">new</span> <a class="code" href="classWt_1_1WBreak.html" title="A widget that provides a line break between inline widgets.">Wt::WBreak</a>(dialog.contents());
<a class="code" href="classWt_1_1WPushButton.html" title="A widget that represents a push button.">Wt::WPushButton</a> ok(<span class="stringliteral">"Ok"</span>, dialog.contents());
<span class="comment">// these events will accept() the Dialog</span>
edit.enterPressed().connect(SLOT(&dialog, <a class="code" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">Wt::WDialog::accept</a>));
ok.clicked().connect(SLOT(&dialog, <a class="code" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">Wt::WDialog::accept</a>));
<span class="keywordflow">if</span> (dialog.exec() == <a class="code" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6d4852d715c07070ca1b117cb7e263840" title="Dialog closed with accept().">Wt::WDialog::Accepted</a>)
setStatus(<span class="stringliteral">"Welcome, "</span> + edit.text());
</pre></div><p>
This dialog looks like this (using the standard look):<p>
<table border="0" align="center" cellspacing="3" cellpadding="3">
<tr>
<td><div align="center">
<img src="WDialog-default-1.png" alt="WDialog-default-1.png">
<p><strong>A simple custom dialog (default)</strong></p></div>
</td><td><div align="center">
<img src="WDialog-polished-1.png" alt="WDialog-polished-1.png">
<p><strong>A simple custom dialog (polished)</strong></p></div>
</td></tr>
</table>
<p>
<h3>CSS</h3>
<p>
A dialog has the <code>Wt-dialog</code> and <code>Wt-outset</code> style classes. The look can be overridden using the following style class selectors:<p>
<div class="fragment"><pre class="fragment">
.Wt-dialog .titlebar : The title bar
.Wt-dialog .body : The body (requires vertical padding 4px).
</pre></div><p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>For the dialog (or rather, the silkscreen covering the user interface below) to render properly in IE, the "html body" margin is set to 0 (if it wasn't already). </dd></dl>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="6f4bab24bf9e39be422bb6d9637268e6"></a><!-- doxytag: member="Wt::WDialog::DialogCode" ref="6f4bab24bf9e39be422bb6d9637268e6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">Wt::WDialog::DialogCode</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The result of a modal dialog execution.
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="6f4bab24bf9e39be422bb6d9637268e68279eafdc9665e6c91d98d2b512a962c"></a><!-- doxytag: member="Rejected" ref="6f4bab24bf9e39be422bb6d9637268e68279eafdc9665e6c91d98d2b512a962c" args="" -->Rejected</em> </td><td>
Dialog closed with <a class="el" href="classWt_1_1WDialog.html#fcff2ea14c4ae79b2fc7bac1a86b0062" title="Closes the dialog, with result is Rejected.">reject()</a>. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="6f4bab24bf9e39be422bb6d9637268e6d4852d715c07070ca1b117cb7e263840"></a><!-- doxytag: member="Accepted" ref="6f4bab24bf9e39be422bb6d9637268e6d4852d715c07070ca1b117cb7e263840" args="" -->Accepted</em> </td><td>
Dialog closed with <a class="el" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">accept()</a>. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="b31907fa4f641192b2720ba735226d58"></a><!-- doxytag: member="Wt::WDialog::WDialog" ref="b31907fa4f641192b2720ba735226d58" args="(const WString &windowTitle=WString())" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Wt::WDialog::WDialog </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>
Constructs a WDialog with a given window title.
<p>
Only a single Dialog may be constructed at any time. Unlike other widgets, a dialog does not need to be added to a container widget.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="e0923afc12895002f30b8ee12ab91aae"></a><!-- doxytag: member="Wt::WDialog::setWindowTitle" ref="e0923afc12895002f30b8ee12ab91aae" args="(const WString &title)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WDialog::setWindowTitle </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"> <em>title</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the dialog window title.
<p>
The window title is displayed in the title bar.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#b8ae8763648de12a67ada4b8237154a9" title="Enables or disables the title bar.">setTitleBarEnabled()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="cf71bbc665dff57a7af201b4f32f59f8"></a><!-- doxytag: member="Wt::WDialog::windowTitle" ref="cf71bbc665dff57a7af201b4f32f59f8" 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::WDialog::windowTitle </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the dialog window title.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#e0923afc12895002f30b8ee12ab91aae" title="Sets the dialog window title.">setWindowTitle()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="626d5109624e7442f9a96310b6919a5a"></a><!-- doxytag: member="Wt::WDialog::setCaption" ref="626d5109624e7442f9a96310b6919a5a" args="(const WString &caption)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WDialog::setCaption </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td>
<td class="paramname"> <em>caption</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the dialog caption (<b>deprecated</b>).
<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd>Use <a class="el" href="classWt_1_1WDialog.html#e0923afc12895002f30b8ee12ab91aae" title="Sets the dialog window title.">setWindowTitle()</a> instead. </dd></dl>
</div>
</div><p>
<a class="anchor" name="f56bc5d90c6da742faa454ddfed4ce00"></a><!-- doxytag: member="Wt::WDialog::caption" ref="f56bc5d90c6da742faa454ddfed4ce00" 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::WDialog::caption </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the dialog caption (<b>deprecated</b>).
<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd>Use <a class="el" href="classWt_1_1WDialog.html#cf71bbc665dff57a7af201b4f32f59f8" title="Returns the dialog window title.">windowTitle()</a> instead. </dd></dl>
</div>
</div><p>
<a class="anchor" name="b8ae8763648de12a67ada4b8237154a9"></a><!-- doxytag: member="Wt::WDialog::setTitleBarEnabled" ref="b8ae8763648de12a67ada4b8237154a9" args="(bool enabled)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WDialog::setTitleBarEnabled </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>
Enables or disables the title bar.
<p>
The titlebar is enabled by default.
</div>
</div><p>
<a class="anchor" name="a23c6db155044c4f2c49269a874dd5cb"></a><!-- doxytag: member="Wt::WDialog::isTitleBarEnabled" ref="a23c6db155044c4f2c49269a874dd5cb" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WDialog::isTitleBarEnabled </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns whether the title bar is enabled.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#b8ae8763648de12a67ada4b8237154a9" title="Enables or disables the title bar.">setTitleBarEnabled()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="10f2f5df7ee5762845bf7ba334f170ae"></a><!-- doxytag: member="Wt::WDialog::contents" ref="10f2f5df7ee5762845bf7ba334f170ae" 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::WDialog::contents </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the dialog contents container.
<p>
Content to the dialog window may be added to this container widget.
</div>
</div><p>
<a class="anchor" name="e56cf798aba9f09a8869df50d3f334a6"></a><!-- doxytag: member="Wt::WDialog::exec" ref="e56cf798aba9f09a8869df50d3f334a6" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">WDialog::DialogCode</a> Wt::WDialog::exec </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Executes the dialog in a recursive event loop.
<p>
Executes the dialog. This blocks the current thread of execution until one of <a class="el" href="classWt_1_1WDialog.html#8d0a8725d03e5d7d144ef015983a8d08" title="Stops the dialog.">done(DialogCode)</a>, <a class="el" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">accept()</a> or <a class="el" href="classWt_1_1WDialog.html#fcff2ea14c4ae79b2fc7bac1a86b0062" title="Closes the dialog, with result is Rejected.">reject()</a> is called.<p>
<em>Warning: using <a class="el" href="classWt_1_1WDialog.html#e56cf798aba9f09a8869df50d3f334a6" title="Executes 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" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#8d0a8725d03e5d7d144ef015983a8d08" title="Stops the dialog.">done(DialogCode r)</a>, <a class="el" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">accept()</a>, <a class="el" href="classWt_1_1WDialog.html#fcff2ea14c4ae79b2fc7bac1a86b0062" title="Closes the dialog, with result is Rejected.">reject()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="8d0a8725d03e5d7d144ef015983a8d08"></a><!-- doxytag: member="Wt::WDialog::done" ref="8d0a8725d03e5d7d144ef015983a8d08" args="(DialogCode r)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WDialog::done </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">DialogCode</a> </td>
<td class="paramname"> <em>r</em> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Stops the dialog.
<p>
Sets the dialog result, and emits the <a class="el" href="classWt_1_1WDialog.html#e7f3991e5adf17ec4e9e93fd8a3a2f79" title="Signal emitted when the dialog is closed.">finished()</a> signal.<p>
If a recursive event loop was started using the <a class="el" href="classWt_1_1WDialog.html#e56cf798aba9f09a8869df50d3f334a6" title="Executes the dialog in a recursive event loop.">exec()</a> method, it is ended.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#e7f3991e5adf17ec4e9e93fd8a3a2f79" title="Signal emitted when the dialog is closed.">finished()</a>, <a class="el" href="classWt_1_1WDialog.html#469ba179a2d620e2f7f6e0142f891c27" title="Returns the result that was set for this dialog.">result()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="fab6f75ebb2d2970ebe0bbf1cf19f288"></a><!-- doxytag: member="Wt::WDialog::accept" ref="fab6f75ebb2d2970ebe0bbf1cf19f288" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WDialog::accept </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Closes the dialog, with result is Accepted.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#8d0a8725d03e5d7d144ef015983a8d08" title="Stops the dialog.">done(DialogCode r)</a>, <a class="el" href="classWt_1_1WDialog.html#fcff2ea14c4ae79b2fc7bac1a86b0062" title="Closes the dialog, with result is Rejected.">reject()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="fcff2ea14c4ae79b2fc7bac1a86b0062"></a><!-- doxytag: member="Wt::WDialog::reject" ref="fcff2ea14c4ae79b2fc7bac1a86b0062" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WDialog::reject </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Closes the dialog, with result is Rejected.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#8d0a8725d03e5d7d144ef015983a8d08" title="Stops the dialog.">done(DialogCode r)</a>, <a class="el" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">accept()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="e7f3991e5adf17ec4e9e93fd8a3a2f79"></a><!-- doxytag: member="Wt::WDialog::finished" ref="e7f3991e5adf17ec4e9e93fd8a3a2f79" 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_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">DialogCode</a>>& Wt::WDialog::finished </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Signal emitted when the dialog is closed.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#8d0a8725d03e5d7d144ef015983a8d08" title="Stops the dialog.">done(DialogCode r)</a>, <a class="el" href="classWt_1_1WDialog.html#fab6f75ebb2d2970ebe0bbf1cf19f288" title="Closes the dialog, with result is Accepted.">accept()</a>, <a class="el" href="classWt_1_1WDialog.html#fcff2ea14c4ae79b2fc7bac1a86b0062" title="Closes the dialog, with result is Rejected.">reject()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="469ba179a2d620e2f7f6e0142f891c27"></a><!-- doxytag: member="Wt::WDialog::result" ref="469ba179a2d620e2f7f6e0142f891c27" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WDialog.html#6f4bab24bf9e39be422bb6d9637268e6">DialogCode</a> Wt::WDialog::result </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the result that was set for this dialog.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#8d0a8725d03e5d7d144ef015983a8d08" title="Stops the dialog.">done(DialogCode r)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="cc8c9734f33b405bf0a706fe2f6e4e05"></a><!-- doxytag: member="Wt::WDialog::setModal" ref="cc8c9734f33b405bf0a706fe2f6e4e05" args="(bool modal)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WDialog::setModal </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>modal</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets whether the dialog is modal.
<p>
A modal dialog will block the underlying user interface.<p>
By default a dialog is modal.
</div>
</div><p>
<a class="anchor" name="3ded330bb27133ac59ec8d8f0e7a1bcf"></a><!-- doxytag: member="Wt::WDialog::isModal" ref="3ded330bb27133ac59ec8d8f0e7a1bcf" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Wt::WDialog::isModal </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns whether the dialog is modal.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WDialog.html#cc8c9734f33b405bf0a706fe2f6e4e05" title="Sets whether the dialog is modal.">setModal()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="a3c85e704c0d7825bd342713f50b35f9"></a><!-- doxytag: member="Wt::WDialog::setHidden" ref="a3c85e704c0d7825bd342713f50b35f9" args="(bool hidden)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WDialog::setHidden </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>hidden</em> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets whether the widget is hidden.
<p>
Hides or show the widget (including all its descendant widgets). setHidden(false) will show this widget and all descendant widgets that are not hidden. 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#1ae4501ce5807c22b71532d9fd564337" title="Returns whether the widget is visible.">isVisible()</a>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WWidget.html#0825c3ccbd4999afc1a88fafa6aa6fc7" title="Hides the widget.">hide()</a>, <a class="el" href="classWt_1_1WWidget.html#52dcef5a385ddfa0a8c3e6c20000f181" title="Shows the widget.">show()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WCompositeWidget.html#ff347ab5d4d5cdbfb0a07aad1636f2d5">Wt::WCompositeWidget</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:06 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>
|