File: classwx_html_parser.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 (608 lines) | stat: -rw-r--r-- 39,161 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
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
<!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: wxHtmlParser 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="#pro-methods">Protected Member Functions</a> &#124;
<a href="classwx_html_parser-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxHtmlParser Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__group__class__html.html">HTML</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;wx/html/htmlpars.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 wxHtmlParser:</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_html_parser__inherit__graph.png" border="0" usemap="#wx_html_parser_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_html_parser_inherit__map" id="wx_html_parser_inherit__map">
<area shape="rect" id="node3" href="classwx_html_win_parser.html" title="This class is derived from wxHtmlParser and its main goal is to parse HTML input so that it can be di..." alt="" coords="5,83,128,111"/></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>Classes derived from this handle the <b>generic</b> parsing of HTML documents: it scans the document and divide it into blocks of tags (where one block consists of beginning and ending tag and of text between these two tags). </p>
<p>It is independent from <a class="el" href="classwx_html_window.html" title="wxHtmlWindow is probably the only class you will directly use unless you want to do something special...">wxHtmlWindow</a> and can be used as stand-alone parser.</p>
<p>It uses system of tag handlers to parse the HTML document. Tag handlers are not statically shared by all instances but are created for each <a class="el" href="classwx_html_parser.html" title="Classes derived from this handle the generic parsing of HTML documents: it scans the document and div...">wxHtmlParser</a> instance. The reason is that the handler may contain document-specific temporary data used during parsing (e.g. complicated structures like tables).</p>
<p>Typically the user calls only the <a class="el" href="classwx_html_parser.html#ad2a0f4c4a60f7745f31a0b0bac9ceac5" title="Proceeds parsing of the document.">wxHtmlParser::Parse</a> method.</p>
<h2></h2>
<div><span class="lib">Library:</span>&#160;&#160;<span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxhtml">wxHTML</a></span></div><div><span class="category">Category:</span>&#160;&#160;<span class="category_text"><a class="el" href="group__group__class__html.html">HTML</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_html.html#overview_html_cells">Cells and Containers</a>, <a class="el" href="overview_html.html#overview_html_handlers">Tag Handlers</a>, <a class="el" href="classwx_html_tag.html" title="This class represents a single HTML tag.">wxHtmlTag</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:a2c2f4cd486c0bfaee31132b7dfea1387"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a2c2f4cd486c0bfaee31132b7dfea1387">wxHtmlParser</a> ()</td></tr>
<tr class="memdesc:a2c2f4cd486c0bfaee31132b7dfea1387"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a2c2f4cd486c0bfaee31132b7dfea1387"></a><br/></td></tr>
<tr class="separator:a2c2f4cd486c0bfaee31132b7dfea1387"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67e06c2e5023fb50c893a1a283205e45"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a67e06c2e5023fb50c893a1a283205e45">AddTagHandler</a> (<a class="el" href="classwx_html_tag_handler.html">wxHtmlTagHandler</a> *handler)</td></tr>
<tr class="memdesc:a67e06c2e5023fb50c893a1a283205e45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds handler to the internal list ( hash table) of handlers.  <a href="#a67e06c2e5023fb50c893a1a283205e45"></a><br/></td></tr>
<tr class="separator:a67e06c2e5023fb50c893a1a283205e45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4856660f14cbcb812b48678b4984665"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#ae4856660f14cbcb812b48678b4984665">AddWord</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;txt)</td></tr>
<tr class="memdesc:ae4856660f14cbcb812b48678b4984665"><td class="mdescLeft">&#160;</td><td class="mdescRight">Must be overwritten in derived class.  <a href="#ae4856660f14cbcb812b48678b4984665"></a><br/></td></tr>
<tr class="separator:ae4856660f14cbcb812b48678b4984665"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac04230b82e6de6dde10757cbe6149980"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#ac04230b82e6de6dde10757cbe6149980">DoParsing</a> (const const_iterator &amp;begin_pos, const const_iterator &amp;end_pos)</td></tr>
<tr class="memdesc:ac04230b82e6de6dde10757cbe6149980"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses the m_Source from <em>begin_pos</em> to <em>end_pos</em> - 1.  <a href="#ac04230b82e6de6dde10757cbe6149980"></a><br/></td></tr>
<tr class="separator:ac04230b82e6de6dde10757cbe6149980"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a743a08491352f57043d2069df5cc7a7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a743a08491352f57043d2069df5cc7a7e">DoParsing</a> ()</td></tr>
<tr class="memdesc:a743a08491352f57043d2069df5cc7a7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses the whole m_Source.  <a href="#a743a08491352f57043d2069df5cc7a7e"></a><br/></td></tr>
<tr class="separator:a743a08491352f57043d2069df5cc7a7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a354d30d5071266b868a225b13333cd0e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a354d30d5071266b868a225b13333cd0e">DoneParser</a> ()</td></tr>
<tr class="memdesc:a354d30d5071266b868a225b13333cd0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This must be called after <a class="el" href="classwx_html_parser.html#a743a08491352f57043d2069df5cc7a7e" title="Parses the whole m_Source.">DoParsing()</a>.  <a href="#a354d30d5071266b868a225b13333cd0e"></a><br/></td></tr>
<tr class="separator:a354d30d5071266b868a225b13333cd0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaea2ccc752d947e65dfe49d4ff1a1e2d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_file_system.html">wxFileSystem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#aaea2ccc752d947e65dfe49d4ff1a1e2d">GetFS</a> () const </td></tr>
<tr class="memdesc:aaea2ccc752d947e65dfe49d4ff1a1e2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns pointer to the file system.  <a href="#aaea2ccc752d947e65dfe49d4ff1a1e2d"></a><br/></td></tr>
<tr class="separator:aaea2ccc752d947e65dfe49d4ff1a1e2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b715eb585661ec4a9a1e9bf48fe660f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_object.html">wxObject</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a9b715eb585661ec4a9a1e9bf48fe660f">GetProduct</a> ()=0</td></tr>
<tr class="memdesc:a9b715eb585661ec4a9a1e9bf48fe660f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns product of parsing.  <a href="#a9b715eb585661ec4a9a1e9bf48fe660f"></a><br/></td></tr>
<tr class="separator:a9b715eb585661ec4a9a1e9bf48fe660f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e1be4b2e16a3cee02ffc2906b14992b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_string.html">wxString</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a7e1be4b2e16a3cee02ffc2906b14992b">GetSource</a> ()</td></tr>
<tr class="memdesc:a7e1be4b2e16a3cee02ffc2906b14992b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns pointer to the source being parsed.  <a href="#a7e1be4b2e16a3cee02ffc2906b14992b"></a><br/></td></tr>
<tr class="separator:a7e1be4b2e16a3cee02ffc2906b14992b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad047fa0b03c8241080e0561fd9a5d8b6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#ad047fa0b03c8241080e0561fd9a5d8b6">InitParser</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;source)</td></tr>
<tr class="memdesc:ad047fa0b03c8241080e0561fd9a5d8b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setups the parser for parsing the <em>source</em> string.  <a href="#ad047fa0b03c8241080e0561fd9a5d8b6"></a><br/></td></tr>
<tr class="separator:ad047fa0b03c8241080e0561fd9a5d8b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaecb050ca8be6e6d980f28774aa35bef"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_f_s_file.html">wxFSFile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#aaecb050ca8be6e6d980f28774aa35bef">OpenURL</a> (<a class="el" href="htmlpars_8h.html#a6e895f8a11485532a3cb67ecec03d4fa">wxHtmlURLType</a> type, const <a class="el" href="classwx_string.html">wxString</a> &amp;url) const </td></tr>
<tr class="memdesc:aaecb050ca8be6e6d980f28774aa35bef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens given URL and returns <code><a class="el" href="classwx_f_s_file.html" title="This class represents a single file opened by wxFileSystem.">wxFSFile</a></code> object that can be used to read data from it.  <a href="#aaecb050ca8be6e6d980f28774aa35bef"></a><br/></td></tr>
<tr class="separator:aaecb050ca8be6e6d980f28774aa35bef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2a0f4c4a60f7745f31a0b0bac9ceac5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_object.html">wxObject</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#ad2a0f4c4a60f7745f31a0b0bac9ceac5">Parse</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;source)</td></tr>
<tr class="memdesc:ad2a0f4c4a60f7745f31a0b0bac9ceac5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Proceeds parsing of the document.  <a href="#ad2a0f4c4a60f7745f31a0b0bac9ceac5"></a><br/></td></tr>
<tr class="separator:ad2a0f4c4a60f7745f31a0b0bac9ceac5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cc9ec3e59aa0d12116988831d4708dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a8cc9ec3e59aa0d12116988831d4708dd">PopTagHandler</a> ()</td></tr>
<tr class="memdesc:a8cc9ec3e59aa0d12116988831d4708dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restores parser's state before last call to <a class="el" href="classwx_html_parser.html#a80498b0ad245e26f6041915e9bae934a" title="Forces the handler to handle additional tags (not returned by wxHtmlTagHandler::GetSupportedTags).">PushTagHandler()</a>.  <a href="#a8cc9ec3e59aa0d12116988831d4708dd"></a><br/></td></tr>
<tr class="separator:a8cc9ec3e59aa0d12116988831d4708dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80498b0ad245e26f6041915e9bae934a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a80498b0ad245e26f6041915e9bae934a">PushTagHandler</a> (<a class="el" href="classwx_html_tag_handler.html">wxHtmlTagHandler</a> *handler, const <a class="el" href="classwx_string.html">wxString</a> &amp;tags)</td></tr>
<tr class="memdesc:a80498b0ad245e26f6041915e9bae934a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Forces the handler to handle additional tags (not returned by <a class="el" href="classwx_html_tag_handler.html#a4659531bcbb3cbcafea31d31a227f747" title="Returns list of supported tags.">wxHtmlTagHandler::GetSupportedTags</a>).  <a href="#a80498b0ad245e26f6041915e9bae934a"></a><br/></td></tr>
<tr class="separator:a80498b0ad245e26f6041915e9bae934a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae49af4d0bc1de1476e9d6d0f235e2766"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#ae49af4d0bc1de1476e9d6d0f235e2766">SetFS</a> (<a class="el" href="classwx_file_system.html">wxFileSystem</a> *fs)</td></tr>
<tr class="memdesc:ae49af4d0bc1de1476e9d6d0f235e2766"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the virtual file system that will be used to request additional files.  <a href="#ae49af4d0bc1de1476e9d6d0f235e2766"></a><br/></td></tr>
<tr class="separator:ae49af4d0bc1de1476e9d6d0f235e2766"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af32c63cbcc6c42ac522b2aba269a422b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#af32c63cbcc6c42ac522b2aba269a422b">StopParsing</a> ()</td></tr>
<tr class="memdesc:af32c63cbcc6c42ac522b2aba269a422b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Call this function to interrupt parsing from a tag handler.  <a href="#af32c63cbcc6c42ac522b2aba269a422b"></a><br/></td></tr>
<tr class="separator:af32c63cbcc6c42ac522b2aba269a422b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a78f5d8c42846d23b6b33093f585f1352"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_html_parser.html#a78f5d8c42846d23b6b33093f585f1352">AddTag</a> (const <a class="el" href="classwx_html_tag.html">wxHtmlTag</a> &amp;tag)</td></tr>
<tr class="memdesc:a78f5d8c42846d23b6b33093f585f1352"><td class="mdescLeft">&#160;</td><td class="mdescRight">This may (and may not) be overwritten in derived class.  <a href="#a78f5d8c42846d23b6b33093f585f1352"></a><br/></td></tr>
<tr class="separator:a78f5d8c42846d23b6b33093f585f1352"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2c2f4cd486c0bfaee31132b7dfea1387"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxHtmlParser::wxHtmlParser </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a78f5d8c42846d23b6b33093f585f1352"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxHtmlParser::AddTag </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_html_tag.html">wxHtmlTag</a> &amp;&#160;</td>
          <td class="paramname"><em>tag</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This may (and may not) be overwritten in derived class. </p>
<p>This method is called each time new tag is about to be added. <em>tag</em> contains information about the tag. (See <a class="el" href="classwx_html_tag.html" title="This class represents a single HTML tag.">wxHtmlTag</a> for details.)</p>
<p>Default (<a class="el" href="classwx_html_parser.html" title="Classes derived from this handle the generic parsing of HTML documents: it scans the document and div...">wxHtmlParser</a>) behaviour is this: first it finds a handler capable of handling this tag and then it calls handler's HandleTag() method. </p>

</div>
</div>
<a class="anchor" id="a67e06c2e5023fb50c893a1a283205e45"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxHtmlParser::AddTagHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_html_tag_handler.html">wxHtmlTagHandler</a> *&#160;</td>
          <td class="paramname"><em>handler</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>Adds handler to the internal list ( hash table) of handlers. </p>
<p>This method should not be called directly by user but rather by derived class' constructor.</p>
<p>This adds the handler to this <b>instance</b> of <a class="el" href="classwx_html_parser.html" title="Classes derived from this handle the generic parsing of HTML documents: it scans the document and div...">wxHtmlParser</a>, not to all objects of this class! (Static front-end to AddTagHandler is provided by <a class="el" href="classwx_html_win_parser.html" title="This class is derived from wxHtmlParser and its main goal is to parse HTML input so that it can be di...">wxHtmlWinParser</a>).</p>
<p>All handlers are deleted on object deletion. </p>

</div>
</div>
<a class="anchor" id="ae4856660f14cbcb812b48678b4984665"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxHtmlParser::AddWord </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>txt</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>Must be overwritten in derived class. </p>
<p>This method is called by <a class="el" href="classwx_html_parser.html#a743a08491352f57043d2069df5cc7a7e" title="Parses the whole m_Source.">DoParsing()</a> each time a part of text is parsed. <em>txt</em> is NOT only one word, it is substring of input. It is not formatted or preprocessed (so white spaces are unmodified). </p>

</div>
</div>
<a class="anchor" id="a354d30d5071266b868a225b13333cd0e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxHtmlParser::DoneParser </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>This must be called after <a class="el" href="classwx_html_parser.html#a743a08491352f57043d2069df5cc7a7e" title="Parses the whole m_Source.">DoParsing()</a>. </p>

</div>
</div>
<a class="anchor" id="ac04230b82e6de6dde10757cbe6149980"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHtmlParser::DoParsing </td>
          <td>(</td>
          <td class="paramtype">const const_iterator &amp;&#160;</td>
          <td class="paramname"><em>begin_pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const const_iterator &amp;&#160;</td>
          <td class="paramname"><em>end_pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parses the m_Source from <em>begin_pos</em> to <em>end_pos</em> - 1. </p>

</div>
</div>
<a class="anchor" id="a743a08491352f57043d2069df5cc7a7e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHtmlParser::DoParsing </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parses the whole m_Source. </p>

</div>
</div>
<a class="anchor" id="aaea2ccc752d947e65dfe49d4ff1a1e2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_file_system.html">wxFileSystem</a>* wxHtmlParser::GetFS </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns pointer to the file system. </p>
<p>Because each tag handler has reference to it is parent parser it can easily request the file by calling: </p>
<div class="fragment"><div class="line"><a class="code" href="classwx_f_s_file.html" title="This class represents a single file opened by wxFileSystem.">wxFSFile</a> *f = m_Parser -&gt; <a class="code" href="classwx_html_parser.html#aaea2ccc752d947e65dfe49d4ff1a1e2d" title="Returns pointer to the file system.">GetFS</a>() -&gt; OpenFile(<span class="stringliteral">&quot;image.jpg&quot;</span>);</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a9b715eb585661ec4a9a1e9bf48fe660f"></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_object.html">wxObject</a>* wxHtmlParser::GetProduct </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns product of parsing. </p>
<p>Returned value is result of parsing of the document.</p>
<p>The type of this result depends on internal representation in derived parser (but it must be derived from wxObject!). See <a class="el" href="classwx_html_win_parser.html" title="This class is derived from wxHtmlParser and its main goal is to parse HTML input so that it can be di...">wxHtmlWinParser</a> for details. </p>

</div>
</div>
<a class="anchor" id="a7e1be4b2e16a3cee02ffc2906b14992b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classwx_string.html">wxString</a>* wxHtmlParser::GetSource </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns pointer to the source being parsed. </p>

</div>
</div>
<a class="anchor" id="ad047fa0b03c8241080e0561fd9a5d8b6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxHtmlParser::InitParser </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>source</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>Setups the parser for parsing the <em>source</em> string. </p>
<p>(Should be overridden in derived class) </p>

</div>
</div>
<a class="anchor" id="aaecb050ca8be6e6d980f28774aa35bef"></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_f_s_file.html">wxFSFile</a>* wxHtmlParser::OpenURL </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="htmlpars_8h.html#a6e895f8a11485532a3cb67ecec03d4fa">wxHtmlURLType</a>&#160;</td>
          <td class="paramname"><em>type</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>url</em>&#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>Opens given URL and returns <code><a class="el" href="classwx_f_s_file.html" title="This class represents a single file opened by wxFileSystem.">wxFSFile</a></code> object that can be used to read data from it. </p>
<p>This method may return <span class="literal">NULL</span> in one of two cases: either the URL doesn't point to any valid resource or the URL is blocked by overridden implementation of <em>OpenURL</em> in derived class.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>Indicates type of the resource. Is one of:<ul>
<li>wxHTML_URL_PAGE: Opening a HTML page.</li>
<li>wxHTML_URL_IMAGE: Opening an image.</li>
<li>wxHTML_URL_OTHER: Opening a resource that doesn't fall into any other category. </li>
</ul>
</td></tr>
    <tr><td class="paramname">url</td><td>URL being opened.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Always use this method in tag handlers instead of <a class="el" href="classwx_html_parser.html#aaea2ccc752d947e65dfe49d4ff1a1e2d" title="Returns pointer to the file system.">GetFS()</a>-&gt;OpenFile() because it can block the URL and is thus more secure. Default behaviour is to call <a class="el" href="classwx_html_window.html#aaeca6abb2c4c5248d418ca19ee51206d" title="Called when an URL is being opened (either when the user clicks on a link or an image is loaded)...">wxHtmlWindow::OnOpeningURL</a> of the associated <a class="el" href="classwx_html_window.html" title="wxHtmlWindow is probably the only class you will directly use unless you want to do something special...">wxHtmlWindow</a> object (which may decide to block the URL or redirect it to another one),if there's any, and always open the URL if the parser is not used with <a class="el" href="classwx_html_window.html" title="wxHtmlWindow is probably the only class you will directly use unless you want to do something special...">wxHtmlWindow</a>. Returned <a class="el" href="classwx_f_s_file.html" title="This class represents a single file opened by wxFileSystem.">wxFSFile</a> object is not guaranteed to point to url, it might have been redirected! </dd></dl>

</div>
</div>
<a class="anchor" id="ad2a0f4c4a60f7745f31a0b0bac9ceac5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classwx_object.html">wxObject</a>* wxHtmlParser::Parse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Proceeds parsing of the document. </p>
<p>This is end-user method. You can simply call it when you need to obtain parsed output (which is parser-specific).</p>
<p>The method does these things:</p>
<ol type="1">
<li>calls InitParser(source)</li>
<li>calls <a class="el" href="classwx_html_parser.html#a743a08491352f57043d2069df5cc7a7e" title="Parses the whole m_Source.">DoParsing()</a></li>
<li>calls <a class="el" href="classwx_html_parser.html#a9b715eb585661ec4a9a1e9bf48fe660f" title="Returns product of parsing.">GetProduct()</a></li>
<li>calls <a class="el" href="classwx_html_parser.html#a354d30d5071266b868a225b13333cd0e" title="This must be called after DoParsing().">DoneParser()</a></li>
<li>returns value returned by <a class="el" href="classwx_html_parser.html#a9b715eb585661ec4a9a1e9bf48fe660f" title="Returns product of parsing.">GetProduct()</a></li>
</ol>
<p>You shouldn't use <a class="el" href="classwx_html_parser.html#ad047fa0b03c8241080e0561fd9a5d8b6" title="Setups the parser for parsing the source string.">InitParser()</a>, <a class="el" href="classwx_html_parser.html#a743a08491352f57043d2069df5cc7a7e" title="Parses the whole m_Source.">DoParsing()</a>, <a class="el" href="classwx_html_parser.html#a9b715eb585661ec4a9a1e9bf48fe660f" title="Returns product of parsing.">GetProduct()</a> or <a class="el" href="classwx_html_parser.html#a354d30d5071266b868a225b13333cd0e" title="This must be called after DoParsing().">DoneParser()</a> directly. </p>

</div>
</div>
<a class="anchor" id="a8cc9ec3e59aa0d12116988831d4708dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHtmlParser::PopTagHandler </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Restores parser's state before last call to <a class="el" href="classwx_html_parser.html#a80498b0ad245e26f6041915e9bae934a" title="Forces the handler to handle additional tags (not returned by wxHtmlTagHandler::GetSupportedTags).">PushTagHandler()</a>. </p>

</div>
</div>
<a class="anchor" id="a80498b0ad245e26f6041915e9bae934a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHtmlParser::PushTagHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_html_tag_handler.html">wxHtmlTagHandler</a> *&#160;</td>
          <td class="paramname"><em>handler</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>tags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Forces the handler to handle additional tags (not returned by <a class="el" href="classwx_html_tag_handler.html#a4659531bcbb3cbcafea31d31a227f747" title="Returns list of supported tags.">wxHtmlTagHandler::GetSupportedTags</a>). </p>
<p>The handler should already be added to this parser.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handler</td><td>the handler </td></tr>
    <tr><td class="paramname">tags</td><td>List of tags (in same format as GetSupportedTags()'s return value). The parser will redirect these tags to handler (until call to <a class="el" href="classwx_html_parser.html#a8cc9ec3e59aa0d12116988831d4708dd" title="Restores parser&#39;s state before last call to PushTagHandler().">PopTagHandler()</a>).</td></tr>
  </table>
  </dd>
</dl>
<p>Example:</p>
<p>Imagine you want to parse following pseudo-html structure: </p>
<div class="fragment"><div class="line">&lt;myitems&gt;</div>
<div class="line">    &lt;param name=<span class="stringliteral">&quot;one&quot;</span> value=<span class="stringliteral">&quot;1&quot;</span>&gt;</div>
<div class="line">    &lt;param name=<span class="stringliteral">&quot;two&quot;</span> value=<span class="stringliteral">&quot;2&quot;</span>&gt;</div>
<div class="line">&lt;/myitems&gt;</div>
<div class="line"></div>
<div class="line">&lt;execute&gt;</div>
<div class="line">    &lt;param program=<span class="stringliteral">&quot;text.exe&quot;</span>&gt;</div>
<div class="line">&lt;/execute&gt;</div>
</div><!-- fragment --><p>It is obvious that you cannot use only one tag handler for &lt;param&gt; tag. Instead you must use context-sensitive handlers for &lt;param&gt; inside &lt;myitems&gt; and &lt;param&gt; inside &lt;execute&gt;. This is the preferred solution:</p>
<div class="fragment"><div class="line">TAG_HANDLER_BEGIN(MYITEM, <span class="stringliteral">&quot;MYITEMS&quot;</span>)</div>
<div class="line">    TAG_HANDLER_PROC(tag)</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// ...something...</span></div>
<div class="line"></div>
<div class="line">        m_Parser -&gt; <a class="code" href="classwx_html_parser.html#a80498b0ad245e26f6041915e9bae934a" title="Forces the handler to handle additional tags (not returned by wxHtmlTagHandler::GetSupportedTags).">PushTagHandler</a>(<span class="keyword">this</span>, <span class="stringliteral">&quot;PARAM&quot;</span>);</div>
<div class="line">        ParseInner(tag);</div>
<div class="line">        m_Parser -&gt; <a class="code" href="classwx_html_parser.html#a8cc9ec3e59aa0d12116988831d4708dd" title="Restores parser&#39;s state before last call to PushTagHandler().">PopTagHandler</a>();</div>
<div class="line"></div>
<div class="line">        <span class="comment">// ...something...</span></div>
<div class="line">    }</div>
<div class="line">TAG_HANDLER_END(MYITEM)</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ae49af4d0bc1de1476e9d6d0f235e2766"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxHtmlParser::SetFS </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classwx_file_system.html">wxFileSystem</a> *&#160;</td>
          <td class="paramname"><em>fs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the virtual file system that will be used to request additional files. </p>
<p>(For example <code>IMG</code> tag handler requests <a class="el" href="classwx_f_s_file.html" title="This class represents a single file opened by wxFileSystem.">wxFSFile</a> with the image data.) </p>

</div>
</div>
<a class="anchor" id="af32c63cbcc6c42ac522b2aba269a422b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void wxHtmlParser::StopParsing </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>Call this function to interrupt parsing from a tag handler. </p>
<p>No more tags will be parsed afterward. This function may only be called from <a class="el" href="classwx_html_parser.html#ad2a0f4c4a60f7745f31a0b0bac9ceac5" title="Proceeds parsing of the document.">Parse()</a> or any function called by it (i.e. from tag handlers). </p>

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

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