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
|
<!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: wxPersistentWindow< T > Class Template 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-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="classwx_persistent_window-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">wxPersistentWindow< T > Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <wx/persist/window.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 wxPersistentWindow< T >:</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_persistent_window__inherit__graph.png" border="0" usemap="#wx_persistent_window_3_01_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_persistent_window_3_01_t_01_4_inherit__map" id="wx_persistent_window_3_01_t_01_4_inherit__map">
<area shape="rect" id="node2" href="classwx_persistent_object.html" title="Base class for persistent object adapters." alt="" coords="24,6,155,34"/></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"><h3>template<class T><br/>
class wxPersistentWindow< T ></h3>
<p>Base class for persistent windows. </p>
<p>Compared to <a class="el" href="classwx_persistent_object.html" title="Base class for persistent object adapters.">wxPersistentObject</a> this class does three things:</p>
<ul>
<li>Most importantly, <a class="el" href="classwx_persistent_window.html" title="Base class for persistent windows.">wxPersistentWindow</a> catches <a class="el" href="classwx_window_destroy_event.html" title="This event is sent as early as possible during the window destruction process.">wxWindowDestroyEvent</a> generated when the window is destroyed and saves its properties automatically when it happens.</li>
<li>It implements <a class="el" href="classwx_persistent_window.html#adf5645fe614a4f617492afdc4fcf6522" title="Implements the base class pure virtual method using wxWindow::GetName().">GetName()</a> using <a class="el" href="classwx_window.html#aab1b302c4bdabd134ce8d401dbaaf990" title="Returns the window's name.">wxWindow::GetName()</a> so that the derived classes don't need to do it.</li>
<li>It adds a convenient <a class="el" href="classwx_persistent_window.html#a10aa6724f3431349ac44fc1d583f6981">wxPersistentWindow::Get()</a> accessor returning the window object of the correct type. </li>
</ul>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aae880a18a0619852354e0c416474d066"><td class="memItemLeft" align="right" valign="top">typedef T </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_window.html#aae880a18a0619852354e0c416474d066">WindowType</a></td></tr>
<tr class="memdesc:aae880a18a0619852354e0c416474d066"><td class="mdescLeft"> </td><td class="mdescRight">The type of the associated window. <a href="#aae880a18a0619852354e0c416474d066"></a><br/></td></tr>
<tr class="separator:aae880a18a0619852354e0c416474d066"><td class="memSeparator" colspan="2"> </td></tr>
</table><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:a92e849fad0fdefa08880d87a7a8d7e48"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_window.html#a92e849fad0fdefa08880d87a7a8d7e48">wxPersistentWindow</a> (<a class="el" href="classwx_persistent_window.html#aae880a18a0619852354e0c416474d066">WindowType</a> *win)</td></tr>
<tr class="memdesc:a92e849fad0fdefa08880d87a7a8d7e48"><td class="mdescLeft"> </td><td class="mdescRight">Constructor for a persistent window object. <a href="#a92e849fad0fdefa08880d87a7a8d7e48"></a><br/></td></tr>
<tr class="separator:a92e849fad0fdefa08880d87a7a8d7e48"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10aa6724f3431349ac44fc1d583f6981"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_persistent_window.html#aae880a18a0619852354e0c416474d066">WindowType</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_window.html#a10aa6724f3431349ac44fc1d583f6981">Get</a> () const </td></tr>
<tr class="separator:a10aa6724f3431349ac44fc1d583f6981"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adf5645fe614a4f617492afdc4fcf6522"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_string.html">wxString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_window.html#adf5645fe614a4f617492afdc4fcf6522">GetName</a> () const </td></tr>
<tr class="memdesc:adf5645fe614a4f617492afdc4fcf6522"><td class="mdescLeft"> </td><td class="mdescRight">Implements the base class pure virtual method using <a class="el" href="classwx_window.html#aab1b302c4bdabd134ce8d401dbaaf990" title="Returns the window's name.">wxWindow::GetName()</a>. <a href="#adf5645fe614a4f617492afdc4fcf6522"></a><br/></td></tr>
<tr class="separator:adf5645fe614a4f617492afdc4fcf6522"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classwx_persistent_object"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classwx_persistent_object')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classwx_persistent_object.html">wxPersistentObject</a></td></tr>
<tr class="memitem:aa400f4ce8ec1eed2498dd5dd1a385942 inherit pub_methods_classwx_persistent_object"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html#aa400f4ce8ec1eed2498dd5dd1a385942">wxPersistentObject</a> (void *obj)</td></tr>
<tr class="memdesc:aa400f4ce8ec1eed2498dd5dd1a385942 inherit pub_methods_classwx_persistent_object"><td class="mdescLeft"> </td><td class="mdescRight">Constructor takes the object which we're associated with. <a href="#aa400f4ce8ec1eed2498dd5dd1a385942"></a><br/></td></tr>
<tr class="separator:aa400f4ce8ec1eed2498dd5dd1a385942 inherit pub_methods_classwx_persistent_object"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:accfdecb17fa0e67708e0c9057cc91041 inherit pub_methods_classwx_persistent_object"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html#accfdecb17fa0e67708e0c9057cc91041">~wxPersistentObject</a> ()</td></tr>
<tr class="memdesc:accfdecb17fa0e67708e0c9057cc91041 inherit pub_methods_classwx_persistent_object"><td class="mdescLeft"> </td><td class="mdescRight">Trivial but virtual destructor. <a href="#accfdecb17fa0e67708e0c9057cc91041"></a><br/></td></tr>
<tr class="separator:accfdecb17fa0e67708e0c9057cc91041 inherit pub_methods_classwx_persistent_object"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae2a7456b936bcc5b3271e4dd2de0ef02 inherit pub_methods_classwx_persistent_object"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html#ae2a7456b936bcc5b3271e4dd2de0ef02">GetObject</a> () const </td></tr>
<tr class="memdesc:ae2a7456b936bcc5b3271e4dd2de0ef02 inherit pub_methods_classwx_persistent_object"><td class="mdescLeft"> </td><td class="mdescRight">Return the associated object. <a href="#ae2a7456b936bcc5b3271e4dd2de0ef02"></a><br/></td></tr>
<tr class="separator:ae2a7456b936bcc5b3271e4dd2de0ef02 inherit pub_methods_classwx_persistent_object"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a93e351e08f224fbe7a2ab110458ba9cc inherit pub_methods_classwx_persistent_object"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html#a93e351e08f224fbe7a2ab110458ba9cc">Save</a> () const =0</td></tr>
<tr class="memdesc:a93e351e08f224fbe7a2ab110458ba9cc inherit pub_methods_classwx_persistent_object"><td class="mdescLeft"> </td><td class="mdescRight">Save the object properties. <a href="#a93e351e08f224fbe7a2ab110458ba9cc"></a><br/></td></tr>
<tr class="separator:a93e351e08f224fbe7a2ab110458ba9cc inherit pub_methods_classwx_persistent_object"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a04f9a557b8dd17c60c83cb29102e093e inherit pub_methods_classwx_persistent_object"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html#a04f9a557b8dd17c60c83cb29102e093e">Restore</a> ()=0</td></tr>
<tr class="memdesc:a04f9a557b8dd17c60c83cb29102e093e inherit pub_methods_classwx_persistent_object"><td class="mdescLeft"> </td><td class="mdescRight">Restore the object properties. <a href="#a04f9a557b8dd17c60c83cb29102e093e"></a><br/></td></tr>
<tr class="separator:a04f9a557b8dd17c60c83cb29102e093e inherit pub_methods_classwx_persistent_object"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a53d730bbfe3fdf57c9c553987f1096f8 inherit pub_methods_classwx_persistent_object"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_string.html">wxString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html#a53d730bbfe3fdf57c9c553987f1096f8">GetKind</a> () const =0</td></tr>
<tr class="memdesc:a53d730bbfe3fdf57c9c553987f1096f8 inherit pub_methods_classwx_persistent_object"><td class="mdescLeft"> </td><td class="mdescRight">Returns the string uniquely identifying the objects supported by this adapter. <a href="#a53d730bbfe3fdf57c9c553987f1096f8"></a><br/></td></tr>
<tr class="separator:a53d730bbfe3fdf57c9c553987f1096f8 inherit pub_methods_classwx_persistent_object"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classwx_persistent_object"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classwx_persistent_object')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classwx_persistent_object.html">wxPersistentObject</a></td></tr>
<tr class="memitem:a0e45b20be1a6b77fe48f49c7232ed212 inherit pro_methods_classwx_persistent_object"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
<tr class="memitem:a0e45b20be1a6b77fe48f49c7232ed212 inherit pro_methods_classwx_persistent_object"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html#a0e45b20be1a6b77fe48f49c7232ed212">SaveValue</a> (const <a class="el" href="classwx_string.html">wxString</a> &name, T value) const </td></tr>
<tr class="memdesc:a0e45b20be1a6b77fe48f49c7232ed212 inherit pro_methods_classwx_persistent_object"><td class="mdescLeft"> </td><td class="mdescRight">Save the specified value using the given name. <a href="#a0e45b20be1a6b77fe48f49c7232ed212"></a><br/></td></tr>
<tr class="separator:a0e45b20be1a6b77fe48f49c7232ed212 inherit pro_methods_classwx_persistent_object"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7dd10ed5914be1d60f9104f0a80bafe5 inherit pro_methods_classwx_persistent_object"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
<tr class="memitem:a7dd10ed5914be1d60f9104f0a80bafe5 inherit pro_methods_classwx_persistent_object"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classwx_persistent_object.html#a7dd10ed5914be1d60f9104f0a80bafe5">RestoreValue</a> (const <a class="el" href="classwx_string.html">wxString</a> &name, T *value)</td></tr>
<tr class="memdesc:a7dd10ed5914be1d60f9104f0a80bafe5 inherit pro_methods_classwx_persistent_object"><td class="mdescLeft"> </td><td class="mdescRight">Restore the value saved by <a class="el" href="classwx_persistent_object.html#a93e351e08f224fbe7a2ab110458ba9cc" title="Save the object properties.">Save()</a>. <a href="#a7dd10ed5914be1d60f9104f0a80bafe5"></a><br/></td></tr>
<tr class="separator:a7dd10ed5914be1d60f9104f0a80bafe5 inherit pro_methods_classwx_persistent_object"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="aae880a18a0619852354e0c416474d066"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class T> </div>
<table class="memname">
<tr>
<td class="memname">typedef T <a class="el" href="classwx_persistent_window.html">wxPersistentWindow</a>< T >::<a class="el" href="classwx_persistent_window.html#aae880a18a0619852354e0c416474d066">WindowType</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>The type of the associated window. </p>
</div>
</div>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a92e849fad0fdefa08880d87a7a8d7e48"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class T> </div>
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_persistent_window.html">wxPersistentWindow</a>< T >::<a class="el" href="classwx_persistent_window.html">wxPersistentWindow</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classwx_persistent_window.html#aae880a18a0619852354e0c416474d066">WindowType</a> * </td>
<td class="paramname"><em>win</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor for a persistent window object. </p>
<p>The constructor uses <a class="el" href="classwx_evt_handler.html#a78719e8b82c9f9c6e4056b3449df1943" title="Connects the given function dynamically with the event handler, id and event type.">wxEvtHandler::Connect()</a> to catch <a class="el" href="classwx_window_destroy_event.html" title="This event is sent as early as possible during the window destruction process.">wxWindowDestroyEvent</a> generated when the window is destroyed and call <a class="el" href="classwx_persistence_manager.html#ab8a9b090b5f84df7b6a765fed78d4820" title="Combines both Save() and Unregister() calls.">wxPersistenceManager::SaveAndUnregister()</a> when this happens. This ensures that the window properties are saved and that this object itself is deleted when the window is. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a10aa6724f3431349ac44fc1d583f6981"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class T> </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_persistent_window.html#aae880a18a0619852354e0c416474d066">WindowType</a>* <a class="el" href="classwx_persistent_window.html">wxPersistentWindow</a>< T >::Get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="adf5645fe614a4f617492afdc4fcf6522"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<class T> </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classwx_string.html">wxString</a> <a class="el" href="classwx_persistent_window.html">wxPersistentWindow</a>< T >::GetName </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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>Implements the base class pure virtual method using <a class="el" href="classwx_window.html#aab1b302c4bdabd134ce8d401dbaaf990" title="Returns the window's name.">wxWindow::GetName()</a>. </p>
<p>Notice that window names are usually not unique while this function must return a unique (at least among the objects of this type) string. Because of this you need to specify a non-default window name in its constructor when creating it or explicitly call <a class="el" href="classwx_window.html#af80875cda5e1af98dcd7c8e712e3c800" title="Sets the window's name.">wxWindow::SetName()</a> before saving or restoring persistent properties. </p>
<p>Implements <a class="el" href="classwx_persistent_object.html#ae175687a86da6a3d0d6edac12840d7e0">wxPersistentObject</a>.</p>
</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>
|