File: classwx_text_data_object.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 (350 lines) | stat: -rw-r--r-- 33,720 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
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
<!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: wxTextDataObject 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="classwx_text_data_object-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxTextDataObject Class Reference<div class="ingroups"><a class="el" href="group__group__class__dnd.html">Clipboard and Drag &amp; Drop</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;wx/dataobj.h&gt;</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 wxTextDataObject:</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_text_data_object__inherit__graph.png" border="0" usemap="#wx_text_data_object_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_text_data_object_inherit__map" id="wx_text_data_object_inherit__map">
<area shape="rect" id="node7" href="classwx_u_r_l_data_object.html" title="wxURLDataObject is a wxDataObject containing an URL and can be used e.g." alt="" coords="13,238,139,266"/><area shape="rect" id="node2" href="classwx_data_object_simple.html" title="This is the simplest possible implementation of the wxDataObject class." alt="" coords="5,83,147,111"/><area shape="rect" id="node4" href="classwx_data_object.html" title="A wxDataObject represents data that can be copied to or from the clipboard, or dragged and dropped..." alt="" coords="25,6,127,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"><p><a class="el" href="classwx_text_data_object.html" title="wxTextDataObject is a specialization of wxDataObjectSimple for text data.">wxTextDataObject</a> is a specialization of <a class="el" href="classwx_data_object_simple.html" title="This is the simplest possible implementation of the wxDataObject class.">wxDataObjectSimple</a> for text data. </p>
<p>It can be used without change to paste data into the <a class="el" href="classwx_clipboard.html" title="A class for manipulating the clipboard.">wxClipboard</a> or a <a class="el" href="classwx_drop_source.html" title="This class represents a source for a drag and drop operation.">wxDropSource</a>. A user may wish to derive a new class from this class for providing text on-demand in order to minimize memory consumption when offering data in several formats, such as plain text and RTF because by default the text is stored in a string in this class, but it might as well be generated when requested. For this, <a class="el" href="classwx_text_data_object.html#a15a488fff1040695932831cbf91dc5c8" title="Returns the data size.">GetTextLength()</a> and <a class="el" href="classwx_text_data_object.html#a6b43294c05885cc8981b37f3c42815bd" title="Returns the text associated with the data object.">GetText()</a> will have to be overridden.</p>
<p>Note that if you already have the text inside a string, you will not achieve any efficiency gain by overriding these functions because copying wxStrings is already a very efficient operation (data is not actually copied because wxStrings are reference counted).</p>
<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><div><span class="category">Category:</span>&#160;&#160;<span class="category_text"><a class="el" href="group__group__class__dnd.html">Clipboard and Drag &amp; Drop</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_dnd.html">Drag and Drop Overview</a>, <a class="el" href="classwx_data_object.html" title="A wxDataObject represents data that can be copied to or from the clipboard, or dragged and dropped...">wxDataObject</a>, <a class="el" href="classwx_data_object_simple.html" title="This is the simplest possible implementation of the wxDataObject class.">wxDataObjectSimple</a>, <a class="el" href="classwx_file_data_object.html" title="wxFileDataObject is a specialization of wxDataObject for file names.">wxFileDataObject</a>, <a class="el" href="classwx_bitmap_data_object.html" title="wxBitmapDataObject is a specialization of wxDataObject for bitmap data.">wxBitmapDataObject</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:a1d1c7457cb2b89f2df0a11129344c078"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_text_data_object.html#a1d1c7457cb2b89f2df0a11129344c078">wxTextDataObject</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;text=<a class="el" href="interface_2wx_2string_8h.html#a9a321d587166a30017b608dd2d234033">wxEmptyString</a>)</td></tr>
<tr class="memdesc:a1d1c7457cb2b89f2df0a11129344c078"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, may be used to initialise the text (otherwise <a class="el" href="classwx_text_data_object.html#ac6754f3ad536bd0fa99928604ec48e7a" title="Sets the text associated with the data object.">SetText()</a> should be used later).  <a href="#a1d1c7457cb2b89f2df0a11129344c078"></a><br/></td></tr>
<tr class="separator:a1d1c7457cb2b89f2df0a11129344c078"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b43294c05885cc8981b37f3c42815bd"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_string.html">wxString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_text_data_object.html#a6b43294c05885cc8981b37f3c42815bd">GetText</a> () const </td></tr>
<tr class="memdesc:a6b43294c05885cc8981b37f3c42815bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the text associated with the data object.  <a href="#a6b43294c05885cc8981b37f3c42815bd"></a><br/></td></tr>
<tr class="separator:a6b43294c05885cc8981b37f3c42815bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15a488fff1040695932831cbf91dc5c8"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_text_data_object.html#a15a488fff1040695932831cbf91dc5c8">GetTextLength</a> () const </td></tr>
<tr class="memdesc:a15a488fff1040695932831cbf91dc5c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the data size.  <a href="#a15a488fff1040695932831cbf91dc5c8"></a><br/></td></tr>
<tr class="separator:a15a488fff1040695932831cbf91dc5c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43c1ec7300578d552ac3c25cfbdb9188"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_text_data_object.html#a43c1ec7300578d552ac3c25cfbdb9188">GetFormatCount</a> (<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692ef">wxDataObject::Direction</a> dir=<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efac7de2bf89290f75553da7f3cb8fa5397">wxDataObject::Get</a>) const </td></tr>
<tr class="memdesc:a43c1ec7300578d552ac3c25cfbdb9188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns 2 under wxMac and wxGTK, where text data coming from the clipboard may be provided as ANSI (<code>wxDF_TEXT</code>) or as Unicode text (<code>wxDF_UNICODETEXT</code>, but only when <code>wxUSE_UNICODE==1</code>).  <a href="#a43c1ec7300578d552ac3c25cfbdb9188"></a><br/></td></tr>
<tr class="separator:a43c1ec7300578d552ac3c25cfbdb9188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73b44708bbca270fb80dbf2ca267488e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_data_format.html">wxDataFormat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_text_data_object.html#a73b44708bbca270fb80dbf2ca267488e">GetFormat</a> () const </td></tr>
<tr class="memdesc:a73b44708bbca270fb80dbf2ca267488e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the preferred format supported by this object.  <a href="#a73b44708bbca270fb80dbf2ca267488e"></a><br/></td></tr>
<tr class="separator:a73b44708bbca270fb80dbf2ca267488e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afab1f5add25010432a69e34f7ee7e8a1"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_text_data_object.html#afab1f5add25010432a69e34f7ee7e8a1">GetAllFormats</a> (<a class="el" href="classwx_data_format.html">wxDataFormat</a> *formats, <a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692ef">wxDataObject::Direction</a> dir=<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efac7de2bf89290f75553da7f3cb8fa5397">wxDataObject::Get</a>) const </td></tr>
<tr class="memdesc:afab1f5add25010432a69e34f7ee7e8a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns all the formats supported by <a class="el" href="classwx_text_data_object.html" title="wxTextDataObject is a specialization of wxDataObjectSimple for text data.">wxTextDataObject</a>.  <a href="#afab1f5add25010432a69e34f7ee7e8a1"></a><br/></td></tr>
<tr class="separator:afab1f5add25010432a69e34f7ee7e8a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6754f3ad536bd0fa99928604ec48e7a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_text_data_object.html#ac6754f3ad536bd0fa99928604ec48e7a">SetText</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;strText)</td></tr>
<tr class="memdesc:ac6754f3ad536bd0fa99928604ec48e7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the text associated with the data object.  <a href="#ac6754f3ad536bd0fa99928604ec48e7a"></a><br/></td></tr>
<tr class="separator:ac6754f3ad536bd0fa99928604ec48e7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classwx_data_object_simple"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classwx_data_object_simple')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classwx_data_object_simple.html">wxDataObjectSimple</a></td></tr>
<tr class="memitem:ad246b285dd2f414f4b13a4d794bf602d inherit pub_methods_classwx_data_object_simple"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object_simple.html#ad246b285dd2f414f4b13a4d794bf602d">wxDataObjectSimple</a> (const <a class="el" href="classwx_data_format.html">wxDataFormat</a> &amp;format=<a class="el" href="dataobj_8h.html#ad7c90f2b8a468a3999d0df90fa82e5aa">wxFormatInvalid</a>)</td></tr>
<tr class="memdesc:ad246b285dd2f414f4b13a4d794bf602d inherit pub_methods_classwx_data_object_simple"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor accepts the supported format (none by default) which may also be set later with <a class="el" href="classwx_data_object_simple.html#adf9d889c7fcc7e05cb6253b3b1e3cb0f" title="Sets the supported format.">SetFormat()</a>.  <a href="#ad246b285dd2f414f4b13a4d794bf602d"></a><br/></td></tr>
<tr class="separator:ad246b285dd2f414f4b13a4d794bf602d inherit pub_methods_classwx_data_object_simple"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20585d2b354e24e5f7b0f4f559f50594 inherit pub_methods_classwx_data_object_simple"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object_simple.html#a20585d2b354e24e5f7b0f4f559f50594">GetDataHere</a> (void *buf) const </td></tr>
<tr class="memdesc:a20585d2b354e24e5f7b0f4f559f50594 inherit pub_methods_classwx_data_object_simple"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy the data to the buffer, return <span class="literal">true</span> on success.  <a href="#a20585d2b354e24e5f7b0f4f559f50594"></a><br/></td></tr>
<tr class="separator:a20585d2b354e24e5f7b0f4f559f50594 inherit pub_methods_classwx_data_object_simple"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac4311ab34deb1028d471c6a435574ff inherit pub_methods_classwx_data_object_simple"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object_simple.html#aac4311ab34deb1028d471c6a435574ff">GetDataSize</a> () const </td></tr>
<tr class="memdesc:aac4311ab34deb1028d471c6a435574ff inherit pub_methods_classwx_data_object_simple"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the size of our data.  <a href="#aac4311ab34deb1028d471c6a435574ff"></a><br/></td></tr>
<tr class="separator:aac4311ab34deb1028d471c6a435574ff inherit pub_methods_classwx_data_object_simple"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd9099ed166b9fc902106f06db8a8338 inherit pub_methods_classwx_data_object_simple"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_data_format.html">wxDataFormat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object_simple.html#abd9099ed166b9fc902106f06db8a8338">GetFormat</a> () const </td></tr>
<tr class="memdesc:abd9099ed166b9fc902106f06db8a8338 inherit pub_methods_classwx_data_object_simple"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the (one and only one) format supported by this object.  <a href="#abd9099ed166b9fc902106f06db8a8338"></a><br/></td></tr>
<tr class="separator:abd9099ed166b9fc902106f06db8a8338 inherit pub_methods_classwx_data_object_simple"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a064b6e42ceb86247318e7ab62bb47442 inherit pub_methods_classwx_data_object_simple"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object_simple.html#a064b6e42ceb86247318e7ab62bb47442">SetData</a> (size_t len, const void *buf)</td></tr>
<tr class="memdesc:a064b6e42ceb86247318e7ab62bb47442 inherit pub_methods_classwx_data_object_simple"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy the data from the buffer, return <span class="literal">true</span> on success.  <a href="#a064b6e42ceb86247318e7ab62bb47442"></a><br/></td></tr>
<tr class="separator:a064b6e42ceb86247318e7ab62bb47442 inherit pub_methods_classwx_data_object_simple"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf9d889c7fcc7e05cb6253b3b1e3cb0f inherit pub_methods_classwx_data_object_simple"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object_simple.html#adf9d889c7fcc7e05cb6253b3b1e3cb0f">SetFormat</a> (const <a class="el" href="classwx_data_format.html">wxDataFormat</a> &amp;format)</td></tr>
<tr class="memdesc:adf9d889c7fcc7e05cb6253b3b1e3cb0f inherit pub_methods_classwx_data_object_simple"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the supported format.  <a href="#adf9d889c7fcc7e05cb6253b3b1e3cb0f"></a><br/></td></tr>
<tr class="separator:adf9d889c7fcc7e05cb6253b3b1e3cb0f inherit pub_methods_classwx_data_object_simple"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classwx_data_object"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classwx_data_object')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classwx_data_object.html">wxDataObject</a></td></tr>
<tr class="memitem:aa910d21b55e45638567f770aa71a44da inherit pub_methods_classwx_data_object"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object.html#aa910d21b55e45638567f770aa71a44da">wxDataObject</a> ()</td></tr>
<tr class="memdesc:aa910d21b55e45638567f770aa71a44da inherit pub_methods_classwx_data_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#aa910d21b55e45638567f770aa71a44da"></a><br/></td></tr>
<tr class="separator:aa910d21b55e45638567f770aa71a44da inherit pub_methods_classwx_data_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a392665fe790cd29de240223b5bd2936c inherit pub_methods_classwx_data_object"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object.html#a392665fe790cd29de240223b5bd2936c">~wxDataObject</a> ()</td></tr>
<tr class="memdesc:a392665fe790cd29de240223b5bd2936c inherit pub_methods_classwx_data_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a392665fe790cd29de240223b5bd2936c"></a><br/></td></tr>
<tr class="separator:a392665fe790cd29de240223b5bd2936c inherit pub_methods_classwx_data_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa48761390b25d797d4cad393db752568 inherit pub_methods_classwx_data_object"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object.html#aa48761390b25d797d4cad393db752568">GetDataHere</a> (const <a class="el" href="classwx_data_format.html">wxDataFormat</a> &amp;format, void *buf) const =0</td></tr>
<tr class="memdesc:aa48761390b25d797d4cad393db752568 inherit pub_methods_classwx_data_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">The method will write the data of the format <em>format</em> to the buffer <em>buf</em>.  <a href="#aa48761390b25d797d4cad393db752568"></a><br/></td></tr>
<tr class="separator:aa48761390b25d797d4cad393db752568 inherit pub_methods_classwx_data_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10674c65e59f08ba318f942e410b8627 inherit pub_methods_classwx_data_object"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object.html#a10674c65e59f08ba318f942e410b8627">GetDataSize</a> (const <a class="el" href="classwx_data_format.html">wxDataFormat</a> &amp;format) const =0</td></tr>
<tr class="memdesc:a10674c65e59f08ba318f942e410b8627 inherit pub_methods_classwx_data_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the data size of the given format <em>format</em>.  <a href="#a10674c65e59f08ba318f942e410b8627"></a><br/></td></tr>
<tr class="separator:a10674c65e59f08ba318f942e410b8627 inherit pub_methods_classwx_data_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47570ed6123bbebec195a2b7f843103c inherit pub_methods_classwx_data_object"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_data_format.html">wxDataFormat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object.html#a47570ed6123bbebec195a2b7f843103c">GetPreferredFormat</a> (<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692ef">Direction</a> dir=<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efac7de2bf89290f75553da7f3cb8fa5397">Get</a>) const =0</td></tr>
<tr class="memdesc:a47570ed6123bbebec195a2b7f843103c inherit pub_methods_classwx_data_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the preferred format for either rendering the data (if <em>dir</em> is <code>Get</code>, its default value) or for setting it.  <a href="#a47570ed6123bbebec195a2b7f843103c"></a><br/></td></tr>
<tr class="separator:a47570ed6123bbebec195a2b7f843103c inherit pub_methods_classwx_data_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab73fa5f1cb933c67df20ddb1fad99071 inherit pub_methods_classwx_data_object"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object.html#ab73fa5f1cb933c67df20ddb1fad99071">SetData</a> (const <a class="el" href="classwx_data_format.html">wxDataFormat</a> &amp;format, size_t len, const void *buf)</td></tr>
<tr class="memdesc:ab73fa5f1cb933c67df20ddb1fad99071 inherit pub_methods_classwx_data_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the data in the format <em>format</em> of the length <em>len</em> provided in the buffer <em>buf</em>.  <a href="#ab73fa5f1cb933c67df20ddb1fad99071"></a><br/></td></tr>
<tr class="separator:ab73fa5f1cb933c67df20ddb1fad99071 inherit pub_methods_classwx_data_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaedc05373d1e6822c9795f57d8200b72 inherit pub_methods_classwx_data_object"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object.html#aaedc05373d1e6822c9795f57d8200b72">IsSupported</a> (const <a class="el" href="classwx_data_format.html">wxDataFormat</a> &amp;format, <a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692ef">Direction</a> dir=<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efac7de2bf89290f75553da7f3cb8fa5397">Get</a>) const </td></tr>
<tr class="memdesc:aaedc05373d1e6822c9795f57d8200b72 inherit pub_methods_classwx_data_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if this format is supported.  <a href="#aaedc05373d1e6822c9795f57d8200b72"></a><br/></td></tr>
<tr class="separator:aaedc05373d1e6822c9795f57d8200b72 inherit pub_methods_classwx_data_object"><td class="memSeparator" colspan="2">&#160;</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 pub_types_classwx_data_object"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classwx_data_object')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classwx_data_object.html">wxDataObject</a></td></tr>
<tr class="memitem:a7623fd02a6bef5dba7c96ff0a1a692ef inherit pub_types_classwx_data_object"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692ef">Direction</a> { <br/>
&#160;&#160;<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efac7de2bf89290f75553da7f3cb8fa5397">Get</a> = 0x01, 
<br/>
&#160;&#160;<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efa2ab9d7f173f2d17dc8ee7324ed3410b6">Set</a> = 0x02, 
<br/>
&#160;&#160;<a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efa1f94b69e55238c5470f85e252b5fd8df">Both</a> = 0x03
<br/>
 }</td></tr>
<tr class="separator:a7623fd02a6bef5dba7c96ff0a1a692ef inherit pub_types_classwx_data_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1d1c7457cb2b89f2df0a11129344c078"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxTextDataObject::wxTextDataObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>text</em> = <code><a class="el" href="interface_2wx_2string_8h.html#a9a321d587166a30017b608dd2d234033">wxEmptyString</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor, may be used to initialise the text (otherwise <a class="el" href="classwx_text_data_object.html#ac6754f3ad536bd0fa99928604ec48e7a" title="Sets the text associated with the data object.">SetText()</a> should be used later). </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="afab1f5add25010432a69e34f7ee7e8a1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxTextDataObject::GetAllFormats </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_data_format.html">wxDataFormat</a> *&#160;</td>
          <td class="paramname"><em>formats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692ef">wxDataObject::Direction</a>&#160;</td>
          <td class="paramname"><em>dir</em> = <code><a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efac7de2bf89290f75553da7f3cb8fa5397">wxDataObject::Get</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</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>Returns all the formats supported by <a class="el" href="classwx_text_data_object.html" title="wxTextDataObject is a specialization of wxDataObjectSimple for text data.">wxTextDataObject</a>. </p>
<p>Under wxMac and wxGTK they are <code>wxDF_TEXT</code> and <code>wxDF_UNICODETEXT</code>, under other ports returns only one of the two, depending on the build mode. </p>

<p>Implements <a class="el" href="classwx_data_object.html#a71abcc4eb2229e936ea53ebdefa53bef">wxDataObject</a>.</p>

</div>
</div>
<a class="anchor" id="a73b44708bbca270fb80dbf2ca267488e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classwx_data_format.html">wxDataFormat</a>&amp; wxTextDataObject::GetFormat </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the preferred format supported by this object. </p>
<p>This is <code>wxDF_TEXT</code> or <code>wxDF_UNICODETEXT</code> depending on the platform and from the build mode (i.e. from <code>wxUSE_UNICODE</code>). </p>

</div>
</div>
<a class="anchor" id="a43c1ec7300578d552ac3c25cfbdb9188"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t wxTextDataObject::GetFormatCount </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692ef">wxDataObject::Direction</a>&#160;</td>
          <td class="paramname"><em>dir</em> = <code><a class="el" href="classwx_data_object.html#a7623fd02a6bef5dba7c96ff0a1a692efac7de2bf89290f75553da7f3cb8fa5397">wxDataObject::Get</a></code></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>Returns 2 under wxMac and wxGTK, where text data coming from the clipboard may be provided as ANSI (<code>wxDF_TEXT</code>) or as Unicode text (<code>wxDF_UNICODETEXT</code>, but only when <code>wxUSE_UNICODE==1</code>). </p>
<p>Returns 1 under other platforms (e.g. wxMSW) or when building in ANSI mode (<code>wxUSE_UNICODE==0</code>). </p>

<p>Implements <a class="el" href="classwx_data_object.html#a3f82815810bf4dcc34e1a5783c9b8a62">wxDataObject</a>.</p>

</div>
</div>
<a class="anchor" id="a6b43294c05885cc8981b37f3c42815bd"></a>
<div class="memitem">
<div class="memproto">
<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> wxTextDataObject::GetText </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>Returns the text associated with the data object. </p>
<p>You may wish to override this method when offering data on-demand, but this is not required by wxWidgets' internals. Use this method to get data in text form from the <a class="el" href="classwx_clipboard.html" title="A class for manipulating the clipboard.">wxClipboard</a>. </p>

</div>
</div>
<a class="anchor" id="a15a488fff1040695932831cbf91dc5c8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t wxTextDataObject::GetTextLength </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>Returns the data size. </p>
<p>By default, returns the size of the text data set in the constructor or using <a class="el" href="classwx_text_data_object.html#ac6754f3ad536bd0fa99928604ec48e7a" title="Sets the text associated with the data object.">SetText()</a>. This can be overridden to provide text size data on-demand. It is recommended to return the text length plus 1 for a trailing zero, but this is not strictly required. </p>

</div>
</div>
<a class="anchor" id="ac6754f3ad536bd0fa99928604ec48e7a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxTextDataObject::SetText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>strText</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>Sets the text associated with the data object. </p>
<p>This method is called when the data object receives the data and, by default, copies the text into the member variable. If you want to process the text on the fly you may wish to override this function. </p>

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

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