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
|
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: wxRichMessageDialog Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
<tbody>
<tr>
<td id="projectlogo">
<a href="http://www.wxwidgets.org/" target="_new">
<img alt="wxWidgets" src="logo.png"/>
</a>
</td>
<td style="padding-left: 0.5em; text-align: right;">
<span id="projectnumber">Version: 3.0.2</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
<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>Categories</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>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</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><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="classwx_rich_message_dialog-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">wxRichMessageDialog Class Reference<div class="ingroups"><a class="el" href="group__group__class__cmndlg.html">Common Dialogs</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <wx/richmsgdlg.h></code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for wxRichMessageDialog:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classwx_rich_message_dialog__inherit__graph.png" border="0" usemap="#wx_rich_message_dialog_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_rich_message_dialog_inherit__map" id="wx_rich_message_dialog_inherit__map">
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Extension of <a class="el" href="classwx_message_dialog.html" title="This class represents a dialog that shows a single or multi-line message, with a choice of OK...">wxMessageDialog</a> with additional functionality. </p>
<p>This class adds the possibility of using a checkbox (that is especially useful for implementing the "Don't ask me again" kind of dialogs) and an extra explanatory text which is initially collapsed and not shown to the user but can be expanded to show more information.</p>
<p>Notice that currently the native dialog is used only under MSW when using Vista or later Windows version. Elsewhere, or for older versions of Windows, a generic implementation which is less familiar to the users is used. Because of this it's recommended to use this class only if you do need its extra functionality and use <a class="el" href="classwx_message_dialog.html" title="This class represents a dialog that shows a single or multi-line message, with a choice of OK...">wxMessageDialog</a> which does have native implementation under all platforms otherwise. However if you do need to put e.g. a checkbox in a dialog, you should definitely consider using this class instead of using your own custom dialog because it will have much better appearance at least under recent Windows versions.</p>
<p>To use this class, you need to create the dialog object and call <a class="el" href="classwx_rich_message_dialog.html#aa382f6767ac0019cee3c6c914384dc77" title="Shows a checkbox with a given label or hides it.">ShowCheckBox()</a> and/or <a class="el" href="classwx_rich_message_dialog.html#a10fc469a0b5d22041d0352646348754d" title="Shows or hides a detailed text and an expander that is used to show or hide the detailed text...">ShowDetailedText()</a> to configure its contents. Other than that, it is used in exactly the same way as <a class="el" href="classwx_message_dialog.html" title="This class represents a dialog that shows a single or multi-line message, with a choice of OK...">wxMessageDialog</a> and supports all the styles supported by it. In particular, <a class="el" href="classwx_rich_message_dialog.html#a3d34a8f0e44933109fae02c81df5cf34" title="Shows the dialog, returning one of wxID_OK, wxID_CANCEL, wxID_YES, wxID_NO.">ShowModal()</a> return value is the same as for <a class="el" href="classwx_message_dialog.html" title="This class represents a dialog that shows a single or multi-line message, with a choice of OK...">wxMessageDialog</a>. The only difference is that you need to use <a class="el" href="classwx_rich_message_dialog.html#a72649d6bd600bbb7c09fb5b0d0d95291" title="Retrieves the state of the checkbox.">IsCheckBoxChecked()</a> to examine the checkbox value if you had called <a class="el" href="classwx_rich_message_dialog.html#aa382f6767ac0019cee3c6c914384dc77" title="Shows a checkbox with a given label or hides it.">ShowCheckBox()</a>.</p>
<p>Here is a simple example: </p>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> MyFrame::ShowDialog()</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">if</span> ( ... shouldn<span class="stringliteral">'t show this dialog again ... )</span></div>
<div class="line"><span class="stringliteral"> return;</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral"> wxRichMessageDialog dlg(this, "Welcome to my wonderful program!");</span></div>
<div class="line"><span class="stringliteral"> dlg.ShowCheckBox("Don'</span>t show welcome dialog again<span class="stringliteral">");</span></div>
<div class="line"><span class="stringliteral"> dlg.ShowModal(); // return value ignored as we have "</span>Ok<span class="stringliteral">" only anyhow</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral"> if ( dlg.IsCheckBoxChecked() )</span></div>
<div class="line"><span class="stringliteral"> ... make sure we won't show it again the next time ...</span></div>
<div class="line"><span class="stringliteral">}</span></div>
</div><!-- fragment --><dl class="section since"><dt>Since</dt><dd>2.9.2</dd></dl>
<h2></h2>
<div><span class="lib">Library:</span>  <span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxcore">wxCore</a></span></div><div><span class="category">Category:</span>  <span class="category_text"><a class="el" href="group__group__class__cmndlg.html">Common Dialogs</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_cmndlg.html#overview_cmndlg_msg">wxMessageDialog Overview</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2a389925c0eaa032f77d584bb7d1c5ca"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_rich_message_dialog.html#a2a389925c0eaa032f77d584bb7d1c5ca">wxRichMessageDialog</a> (<a class="el" href="classwx_window.html">wxWindow</a> *parent, const <a class="el" href="classwx_string.html">wxString</a> &message, const <a class="el" href="classwx_string.html">wxString</a> &caption=<a class="el" href="msgdlg_8h.html#a5f93cd31111d1a0f2c65a4b4235035da">wxMessageBoxCaptionStr</a>, long style=<a class="el" href="defs_8h.html#a9c40266b61a27f0124a69a699753889a">wxOK</a>|<a class="el" href="defs_8h.html#ae160ea382a8f7921484db9d499516dafaa9f0378dc2d52d0a96553e30d05a57ff">wxCENTRE</a>)</td></tr>
<tr class="memdesc:a2a389925c0eaa032f77d584bb7d1c5ca"><td class="mdescLeft"> </td><td class="mdescRight">Constructor specifying the rich message dialog properties. <a href="#a2a389925c0eaa032f77d584bb7d1c5ca"></a><br/></td></tr>
<tr class="separator:a2a389925c0eaa032f77d584bb7d1c5ca"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa382f6767ac0019cee3c6c914384dc77"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_rich_message_dialog.html#aa382f6767ac0019cee3c6c914384dc77">ShowCheckBox</a> (const <a class="el" href="classwx_string.html">wxString</a> &checkBoxText, bool checked=false)</td></tr>
<tr class="memdesc:aa382f6767ac0019cee3c6c914384dc77"><td class="mdescLeft"> </td><td class="mdescRight">Shows a checkbox with a given label or hides it. <a href="#aa382f6767ac0019cee3c6c914384dc77"></a><br/></td></tr>
<tr class="separator:aa382f6767ac0019cee3c6c914384dc77"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a28eb692d8aa85a99c1865b9ca8920057"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_string.html">wxString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_rich_message_dialog.html#a28eb692d8aa85a99c1865b9ca8920057">GetCheckBoxText</a> () const </td></tr>
<tr class="memdesc:a28eb692d8aa85a99c1865b9ca8920057"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the label for the checkbox. <a href="#a28eb692d8aa85a99c1865b9ca8920057"></a><br/></td></tr>
<tr class="separator:a28eb692d8aa85a99c1865b9ca8920057"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10fc469a0b5d22041d0352646348754d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_rich_message_dialog.html#a10fc469a0b5d22041d0352646348754d">ShowDetailedText</a> (const <a class="el" href="classwx_string.html">wxString</a> &detailedText)</td></tr>
<tr class="memdesc:a10fc469a0b5d22041d0352646348754d"><td class="mdescLeft"> </td><td class="mdescRight">Shows or hides a detailed text and an expander that is used to show or hide the detailed text. <a href="#a10fc469a0b5d22041d0352646348754d"></a><br/></td></tr>
<tr class="separator:a10fc469a0b5d22041d0352646348754d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2e5ad4dabc7a9486c4134b13130c1571"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_string.html">wxString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_rich_message_dialog.html#a2e5ad4dabc7a9486c4134b13130c1571">GetDetailedText</a> () const </td></tr>
<tr class="memdesc:a2e5ad4dabc7a9486c4134b13130c1571"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the detailed text. <a href="#a2e5ad4dabc7a9486c4134b13130c1571"></a><br/></td></tr>
<tr class="separator:a2e5ad4dabc7a9486c4134b13130c1571"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a72649d6bd600bbb7c09fb5b0d0d95291"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_rich_message_dialog.html#a72649d6bd600bbb7c09fb5b0d0d95291">IsCheckBoxChecked</a> () const </td></tr>
<tr class="memdesc:a72649d6bd600bbb7c09fb5b0d0d95291"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the state of the checkbox. <a href="#a72649d6bd600bbb7c09fb5b0d0d95291"></a><br/></td></tr>
<tr class="separator:a72649d6bd600bbb7c09fb5b0d0d95291"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3d34a8f0e44933109fae02c81df5cf34"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_rich_message_dialog.html#a3d34a8f0e44933109fae02c81df5cf34">ShowModal</a> ()</td></tr>
<tr class="memdesc:a3d34a8f0e44933109fae02c81df5cf34"><td class="mdescLeft"> </td><td class="mdescRight">Shows the dialog, returning one of wxID_OK, wxID_CANCEL, wxID_YES, wxID_NO. <a href="#a3d34a8f0e44933109fae02c81df5cf34"></a><br/></td></tr>
<tr class="separator:a3d34a8f0e44933109fae02c81df5cf34"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a2a389925c0eaa032f77d584bb7d1c5ca"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">wxRichMessageDialog::wxRichMessageDialog </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classwx_window.html">wxWindow</a> * </td>
<td class="paramname"><em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>message</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>caption</em> = <code><a class="el" href="msgdlg_8h.html#a5f93cd31111d1a0f2c65a4b4235035da">wxMessageBoxCaptionStr</a></code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">long </td>
<td class="paramname"><em>style</em> = <code><a class="el" href="defs_8h.html#a9c40266b61a27f0124a69a699753889a">wxOK</a>|<a class="el" href="defs_8h.html#ae160ea382a8f7921484db9d499516dafaa9f0378dc2d52d0a96553e30d05a57ff">wxCENTRE</a></code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor specifying the rich message dialog properties. </p>
<p>Works just like the constructor for <a class="el" href="classwx_message_dialog.html" title="This class represents a dialog that shows a single or multi-line message, with a choice of OK...">wxMessageDialog</a>. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a28eb692d8aa85a99c1865b9ca8920057"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_string.html">wxString</a> wxRichMessageDialog::GetCheckBoxText </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the label for the checkbox. </p>
<dl class="section return"><dt>Returns</dt><dd>The label for the checkbox, will be the empty string if no checkbox is used. </dd></dl>
</div>
</div>
<a class="anchor" id="a2e5ad4dabc7a9486c4134b13130c1571"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_string.html">wxString</a> wxRichMessageDialog::GetDetailedText </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the detailed text. </p>
<dl class="section return"><dt>Returns</dt><dd>The detailed text or empty if detailed text is not used. </dd></dl>
</div>
</div>
<a class="anchor" id="a72649d6bd600bbb7c09fb5b0d0d95291"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool wxRichMessageDialog::IsCheckBoxChecked </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the state of the checkbox. </p>
<p>If this method is called before showing the dialog, the initial value of the checkbox, as set by <a class="el" href="classwx_rich_message_dialog.html#aa382f6767ac0019cee3c6c914384dc77" title="Shows a checkbox with a given label or hides it.">ShowCheckBox()</a> is used. If it is called after calling <a class="el" href="classwx_dialog.html#a6e078c3d0653f75ad3c34a37c0b54637" title="Shows an application-modal dialog.">wxDialog::ShowModal()</a>, the value set by the user is returned.</p>
<dl class="section return"><dt>Returns</dt><dd><span class="literal">true</span> if the checkbox is checked or <span class="literal">false</span> if not. </dd></dl>
</div>
</div>
<a class="anchor" id="aa382f6767ac0019cee3c6c914384dc77"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxRichMessageDialog::ShowCheckBox </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>checkBoxText</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>checked</em> = <code>false</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shows a checkbox with a given label or hides it. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">checkBoxText</td><td>If the parameter is non-empty a checkbox will be shown with that label, otherwise it will be hidden. </td></tr>
<tr><td class="paramname">checked</td><td>The initial state of the checkbox. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a10fc469a0b5d22041d0352646348754d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxRichMessageDialog::ShowDetailedText </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> & </td>
<td class="paramname"><em>detailedText</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shows or hides a detailed text and an expander that is used to show or hide the detailed text. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">detailedText</td><td>The detailed text that can be expanded when the dialog is shown, if empty no detailed text will be used. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a3d34a8f0e44933109fae02c81df5cf34"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual int wxRichMessageDialog::ShowModal </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Shows the dialog, returning one of wxID_OK, wxID_CANCEL, wxID_YES, wxID_NO. </p>
<p><a class="el" href="classwx_rich_message_dialog.html#a72649d6bd600bbb7c09fb5b0d0d95291" title="Retrieves the state of the checkbox.">IsCheckBoxChecked()</a> can be called afterwards to retrieve the value of the check box if one was used. </p>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<small>
Generated on Thu Nov 27 2014 13:46:54 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>
|