File: classwx_preferences_editor.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (250 lines) | stat: -rw-r--r-- 15,974 bytes parent folder | download | duplicates (2)
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
<!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: wxPreferencesEditor 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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classwx_preferences_editor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxPreferencesEditor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;wx/preferences.h&gt;</code></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manage preferences dialog. </p>
<p>This class encapsulates the differences &ndash; both in appearance and behaviour &ndash; between preferences dialogs on different platforms. In particular, OS X preferences look very different from the typical notebook control used on other platforms, and both OS X and GTK+ preferences windows are modeless unlike Windows options dialogs that are typically modal.</p>
<p><a class="el" href="classwx_preferences_editor.html" title="Manage preferences dialog.">wxPreferencesEditor</a> is able to hide the differences by hiding the creation of preferences window from the API. Instead, you create an instance of <a class="el" href="classwx_preferences_editor.html" title="Manage preferences dialog.">wxPreferencesEditor</a> and add page descriptions in the form of <a class="el" href="classwx_preferences_page.html" title="One page of preferences dialog.">wxPreferencesPage</a> using its <a class="el" href="classwx_preferences_editor.html#a3f5102fccc200964eb2ea4890b334c29" title="Add a new page to the editor.">AddPage()</a> method. After setting up the editor object, you must call <a class="el" href="classwx_preferences_editor.html#a626cdcd775e6e1150901d64b63c34819" title="Show the preferences dialog or bring it to the top if it&#39;s already shown.">Show()</a> to present preferences to the user.</p>
<dl class="section note"><dt>Note</dt><dd>Notice that this class is not derived from <a class="el" href="classwx_window.html" title="wxWindow is the base class for all windows and represents any visible object on screen.">wxWindow</a> and hence doesn't represent a window, even if its <a class="el" href="classwx_preferences_editor.html#a626cdcd775e6e1150901d64b63c34819" title="Show the preferences dialog or bring it to the top if it&#39;s already shown.">Show()</a> method does create one internally.</dd></dl>
<h2></h2>
<div><span class="lib">Library:</span>&#160;&#160;<span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxcore">wxCore</a></span></div><dl class="section since"><dt>Since</dt><dd>2.9.5 </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:a763bc5d60aef3ebf4ee296fb14634de3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_preferences_editor.html#a763bc5d60aef3ebf4ee296fb14634de3">wxPreferencesEditor</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;title=<a class="el" href="classwx_string.html">wxString</a>())</td></tr>
<tr class="memdesc:a763bc5d60aef3ebf4ee296fb14634de3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a763bc5d60aef3ebf4ee296fb14634de3"></a><br/></td></tr>
<tr class="separator:a763bc5d60aef3ebf4ee296fb14634de3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeea552f6dab4f2a6402e122a9866386a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_preferences_editor.html#aeea552f6dab4f2a6402e122a9866386a">~wxPreferencesEditor</a> ()</td></tr>
<tr class="memdesc:aeea552f6dab4f2a6402e122a9866386a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#aeea552f6dab4f2a6402e122a9866386a"></a><br/></td></tr>
<tr class="separator:aeea552f6dab4f2a6402e122a9866386a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f5102fccc200964eb2ea4890b334c29"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_preferences_editor.html#a3f5102fccc200964eb2ea4890b334c29">AddPage</a> (<a class="el" href="classwx_preferences_page.html">wxPreferencesPage</a> *page)</td></tr>
<tr class="memdesc:a3f5102fccc200964eb2ea4890b334c29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new page to the editor.  <a href="#a3f5102fccc200964eb2ea4890b334c29"></a><br/></td></tr>
<tr class="separator:a3f5102fccc200964eb2ea4890b334c29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a626cdcd775e6e1150901d64b63c34819"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_preferences_editor.html#a626cdcd775e6e1150901d64b63c34819">Show</a> (<a class="el" href="classwx_window.html">wxWindow</a> *parent)</td></tr>
<tr class="memdesc:a626cdcd775e6e1150901d64b63c34819"><td class="mdescLeft">&#160;</td><td class="mdescRight">Show the preferences dialog or bring it to the top if it's already shown.  <a href="#a626cdcd775e6e1150901d64b63c34819"></a><br/></td></tr>
<tr class="separator:a626cdcd775e6e1150901d64b63c34819"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdecd2b18a9d3171e04cdc561848635b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_preferences_editor.html#acdecd2b18a9d3171e04cdc561848635b">Dismiss</a> ()</td></tr>
<tr class="memdesc:acdecd2b18a9d3171e04cdc561848635b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hide the currently shown dialog, if any.  <a href="#acdecd2b18a9d3171e04cdc561848635b"></a><br/></td></tr>
<tr class="separator:acdecd2b18a9d3171e04cdc561848635b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aab8c4d9dfd585acbecdc92f5ddd8432b"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_preferences_editor.html#aab8c4d9dfd585acbecdc92f5ddd8432b">ShouldApplyChangesImmediately</a> () static bool ShownModally()</td></tr>
<tr class="memdesc:aab8c4d9dfd585acbecdc92f5ddd8432b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether changes to values in preferences pages should be applied immediately or only when the user clicks the OK button.  <a href="#aab8c4d9dfd585acbecdc92f5ddd8432b"></a><br/></td></tr>
<tr class="separator:aab8c4d9dfd585acbecdc92f5ddd8432b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a763bc5d60aef3ebf4ee296fb14634de3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxPreferencesEditor::wxPreferencesEditor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>title</em> = <code><a class="el" href="classwx_string.html">wxString</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<p>Creates an empty editor, use <a class="el" href="classwx_preferences_editor.html#a3f5102fccc200964eb2ea4890b334c29" title="Add a new page to the editor.">AddPage()</a> to add controls to it.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">title</td><td>The title overriding the default title of the top level window used by the editor. It is recommended to not specify this parameter to use the native convention for the preferences dialogs instead. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aeea552f6dab4f2a6402e122a9866386a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxPreferencesEditor::~wxPreferencesEditor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>Destroying this object hides the associated preferences window if it is open at the moment.</p>
<p>The destructor is non-virtual as this class is not supposed to be derived from. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3f5102fccc200964eb2ea4890b334c29"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxPreferencesEditor::AddPage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_preferences_page.html">wxPreferencesPage</a> *&#160;</td>
          <td class="paramname"><em>page</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a new page to the editor. </p>
<p>The editor takes ownership of the page and will delete it from its destructor (but not sooner).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_preferences_page.html" title="One page of preferences dialog.">wxPreferencesPage</a>, <a class="el" href="classwx_stock_preferences_page.html" title="Specialization of wxPreferencesPage useful for certain commonly used preferences page.">wxStockPreferencesPage</a> </dd></dl>

</div>
</div>
<a class="anchor" id="acdecd2b18a9d3171e04cdc561848635b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxPreferencesEditor::Dismiss </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Hide the currently shown dialog, if any. </p>
<p>This is typically called to dismiss the dialog if the object whose preferences it is editing was closed. </p>

</div>
</div>
<a class="anchor" id="aab8c4d9dfd585acbecdc92f5ddd8432b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool wxPreferencesEditor::ShouldApplyChangesImmediately </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns whether changes to values in preferences pages should be applied immediately or only when the user clicks the OK button. </p>
<p>Currently, changes are applied immediately on OS X and GTK+.</p>
<p>The preprocessor macro <code>wxHAS_PREF_EDITOR_APPLY_IMMEDIATELY</code> is defined in this case as well. Returns whether the preferences dialog is shown modally.</p>
<p>If this method returns false, as it currently does in wxGTK and wxOSX, <a class="el" href="classwx_preferences_editor.html#a626cdcd775e6e1150901d64b63c34819" title="Show the preferences dialog or bring it to the top if it&#39;s already shown.">Show()</a> simply makes the dialog visible and returns immediately. If it returns true, as it does in wxMSW and under the other platforms, then the dialog is shown modally, i.e. <a class="el" href="classwx_preferences_editor.html#a626cdcd775e6e1150901d64b63c34819" title="Show the preferences dialog or bring it to the top if it&#39;s already shown.">Show()</a> blocks until the user dismisses it.</p>
<p>Notice that it isn't necessary to test the return value of this method to use this class normally, its interface is designed to work in both cases. However it can sometimes be necessary to call it if the program needs to handle modal dialogs specially, e.g. perhaps to block some periodic background update operation while a modal dialog is shown. </p>

</div>
</div>
<a class="anchor" id="a626cdcd775e6e1150901d64b63c34819"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxPreferencesEditor::Show </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_window.html">wxWindow</a> *&#160;</td>
          <td class="paramname"><em>parent</em></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>Show the preferences dialog or bring it to the top if it's already shown. </p>
<p>Notice that this method may or may not block depending on the platform, i.e. depending on whether the dialog is modal or not.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>The window that invokes the preferences. Call <a class="el" href="classwx_preferences_editor.html#acdecd2b18a9d3171e04cdc561848635b" title="Hide the currently shown dialog, if any.">Dismiss()</a> before it's destroyed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:52 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>