File: persist_8h.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 482,632 kB
  • sloc: cpp: 2,127,216; python: 294,089; makefile: 51,946; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (158 lines) | stat: -rw-r--r-- 9,969 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
<!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: interface/wx/persist.h File 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><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_60feedc7276cc318b43f4d4f48ac8f8e.html">interface</a></li><li class="navelem"><a class="el" href="dir_4fb5f442218c03949e30a92e7978b03f.html">wx</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">persist.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistence_manager.html">wxPersistenceManager</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides support for automatically saving and restoring object properties to persistent storage.  <a href="classwx_persistence_manager.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html">wxPersistentObject</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Base class for persistent object adapters.  <a href="classwx_persistent_object.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6dec2a72ae0c253d4637dcc73371c0c3"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a6dec2a72ae0c253d4637dcc73371c0c3"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classwx_persistent_object.html">wxPersistentObject</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="persist_8h.html#a6dec2a72ae0c253d4637dcc73371c0c3">wxCreatePersistentObject</a> (T *obj)</td></tr>
<tr class="memdesc:a6dec2a72ae0c253d4637dcc73371c0c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function used to create the correct persistent adapter for the given type of objects.  <a href="#a6dec2a72ae0c253d4637dcc73371c0c3"></a><br/></td></tr>
<tr class="separator:a6dec2a72ae0c253d4637dcc73371c0c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f903bc09a3ee6d8e6a54657a985573c"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a1f903bc09a3ee6d8e6a54657a985573c"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="persist_8h.html#a1f903bc09a3ee6d8e6a54657a985573c">wxPersistentRegisterAndRestore</a> (T *obj, const <a class="el" href="classwx_string.html">wxString</a> &amp;name=<a class="el" href="classwx_string.html">wxString</a>())</td></tr>
<tr class="memdesc:a1f903bc09a3ee6d8e6a54657a985573c"><td class="mdescLeft">&#160;</td><td class="mdescRight">A shorter synonym for <a class="el" href="classwx_persistence_manager.html#a2d90794f76e46b357bcffc01be657f94" title="Combines both Register() and Restore() calls.">wxPersistenceManager::RegisterAndRestore()</a>.  <a href="#a1f903bc09a3ee6d8e6a54657a985573c"></a><br/></td></tr>
<tr class="separator:a1f903bc09a3ee6d8e6a54657a985573c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a6dec2a72ae0c253d4637dcc73371c0c3"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_persistent_object.html">wxPersistentObject</a>* wxCreatePersistentObject </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function used to create the correct persistent adapter for the given type of objects. </p>
<p>To be precise, there is no such template function definition but there are overloads of <a class="el" href="interface_2wx_2persist_2bookctrl_8h.html#a8b21681a5cb6009c8acb05f474ca1899" title="Overload allowing persistence adapter creation for wxBookCtrlBase-derived objects.">wxCreatePersistentObject()</a> taking different object types for all wxWidgets classes supporting persistence. And you may also define your own overloads to integrate your custom classes with wxWidgets persistence framework.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_persistence.html#persistence_defining">Defining Custom Persistent Windows</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/persist.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="a1f903bc09a3ee6d8e6a54657a985573c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool wxPersistentRegisterAndRestore </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code><a class="el" href="classwx_string.html">wxString</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A shorter synonym for <a class="el" href="classwx_persistence_manager.html#a2d90794f76e46b357bcffc01be657f94" title="Combines both Register() and Restore() calls.">wxPersistenceManager::RegisterAndRestore()</a>. </p>
<p>This function simply calls <a class="el" href="classwx_persistence_manager.html#a2d90794f76e46b357bcffc01be657f94" title="Combines both Register() and Restore() calls.">wxPersistenceManager::RegisterAndRestore()</a> but using it results in slightly shorter code as it calls <a class="el" href="classwx_persistence_manager.html#a1d594b5905ef1c7a11ccadf348325f5b" title="Returns the unique persistence manager object.">wxPersistenceManager::Get()</a> internally. As an additional convenience, this function can also set the window name.</p>
<p>For the implementation reasons, this function <em>must</em> be used instead of the template method when using Microsoft Visual C++ 6 compiler.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>wxWindow-derived object to register with persistence manager and to try to restore the settings for. </td></tr>
    <tr><td class="paramname">name</td><td>If not empty, <em>obj</em> name is changed to the provided value before registering it. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the settings were restored or false otherwise (this will always be the case when the program runs for the first time, for example).</dd></dl>
<dl class="section since"><dt>Since</dt><dd>2.9.0, <em>name</em> is new in 2.9.1.</dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/persist.h&gt; </pre> 
</div>
</div>
</div><!-- contents -->

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