]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/htwindow.tex
remove C++ comment
[wxWidgets.git] / docs / latex / wx / htwindow.tex
CommitLineData
704a4b75
VS
1%
2% automatically generated by HelpGen from
3% htmlwindow.tex at 14/Mar/99 20:13:37
4%
5
704a4b75
VS
6\section{\class{wxHtmlWindow}}\label{wxhtmlwindow}
7
8wxHtmlWindow is probably the only class you will directly use
9unless you want to do something special (like adding new tag
448af9a4 10handlers or MIME filters).
704a4b75 11
448af9a4
JS
12The purpose of this class is to display HTML pages (either local
13file or downloaded via HTTP protocol) in a window. The width
14of the window is constant - given in the constructor - and virtual height
15is changed dynamically depending on page size.
fa482912 16Once the window is created you can set its content by calling
903972f9
VS
17\helpref{SetPage(text)}{wxhtmlwindowsetpage},
18\helpref{LoadPage(filename)}{wxhtmlwindowloadpage} or
19\helpref{LoadFile}{wxhtmlwindowloadfile}.
704a4b75 20
5270a2f9
VS
21\wxheading{Note}
22
23wxHtmlWindow uses the \helpref{wxImage}{wximage} class for displaying images.
24Don't forget to initialize all image formats you need before loading any page!
25(See \helpref{wxInitAllImageHandlers}{wxinitallimagehandlers} and
26\helpref{wxImage::AddHandler}{wximageaddhandler}.)
27
704a4b75
VS
28\wxheading{Derived from}
29
7376079d
VZ
30\helpref{wxScrolledWindow}{wxscrolledwindow}\\
31\helpref{wxPanel}{wxpanel}\\
32\helpref{wxWindow}{wxwindow}\\
33\helpref{wxEvtHandler}{wxevthandler}\\
34\helpref{wxObject}{wxobject}
704a4b75
VS
35
36\wxheading{Include files}
37
9704b250 38<wx/html/htmlwin.h>
704a4b75 39
a7af285d
VZ
40\wxheading{Library}
41
42\helpref{wxHtml}{librarieslist}
43
a689b6d6
VS
44\wxheading{Window styles}
45
46\twocolwidtha{5cm}
47\begin{twocollist}\itemsep=0pt
48\twocolitem{\windowstyle{wxHW\_SCROLLBAR\_NEVER}}{Never display scrollbars, not
49even when the page is larger than the window.}
ec59d2cc 50\twocolitem{\windowstyle{wxHW\_SCROLLBAR\_AUTO}}{Display scrollbars only if
a689b6d6 51page's size exceeds window's size.}
ec59d2cc 52\twocolitem{\windowstyle{wxHW\_NO\_SELECTION}}{Don't allow the user to select
a689b6d6
VS
53text.}
54\end{twocollist}
55
a1c3cdc4
VS
56
57\wxheading{Event handling}
58
59To process input from a wxHtmlWindow, use these event handler macros to direct input to member
60functions that take a \helpref{wxHtmlCellEvent}{wxhtmlcellevent} argument or a \helpref{wxHtmlLinkEvent}{wxhtmllinkevent}.
61
62\twocolwidtha{7cm}
63\begin{twocollist}\itemsep=0pt
97331b82 64\twocolitem{{\bf EVT\_HTML\_CELL\_CLICKED(id, func)}}{A \helpref{wxHtmlCell}{wxhtmlcell} was clicked.}
7975a361 65\twocolitem{{\bf EVT\_HTML\_CELL\_HOVER(id, func)}}{The mouse passed over a \helpref{wxHtmlCell}{wxhtmlcell}.}
97331b82 66\twocolitem{{\bf EVT\_HTML\_LINK\_CLICKED(id, func)}}{A \helpref{wxHtmlCell}{wxhtmlcell} which contains an hyperlink was clicked.}
a1c3cdc4
VS
67\end{twocollist}
68
69
70\wxheading{See also}
71
72\helpref{wxHtmlLinkEvent}{wxhtmllinkevent}, \helpref{wxHtmlCellEvent}{wxhtmlcellevent}
73
74
75
809e21b5
FM
76\latexignore{\rtfignore{\wxheading{Members}}}
77
704a4b75
VS
78\membersection{wxHtmlWindow::wxHtmlWindow}\label{wxhtmlwindowwxhtmlwindow}
79
80\func{}{wxHtmlWindow}{\void}
81
82Default constructor.
83
2284d64e 84\func{}{wxHtmlWindow}{\param{wxWindow }{*parent}, \param{wxWindowID }{id = -1}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxHW\_DEFAULT\_STYLE}, \param{const wxString\& }{name = "htmlWindow"}}
704a4b75 85
448af9a4 86Constructor. The parameters are the same as for the \helpref{wxScrolledWindow}{wxscrolledwindow} constructor.
704a4b75
VS
87
88\wxheading{Parameters}
89
a689b6d6 90\docparam{style}{Window style. See \helpref{wxHtmlWindow}{wxhtmlwindow}.}
704a4b75 91
559fe022 92\membersection{wxHtmlWindow::AddFilter}\label{wxhtmlwindowaddfilter}
704a4b75 93
559fe022 94\func{static void}{AddFilter}{\param{wxHtmlFilter }{*filter}}
704a4b75 95
559fe022
VS
96Adds \helpref{input filter}{filters} to the static list of available
97filters. These filters are present by default:
704a4b75 98
448af9a4 99\begin{itemize}\itemsep=0pt
559fe022
VS
100\item {\tt text/html} MIME type
101\item {\tt image/*} MIME types
102\item Plain Text filter (this filter is used if no other filter matches)
103\end{itemize}
704a4b75 104
39029898
VS
105\membersection{wxHtmlWindow::AppendToPage}\label{wxhtmlwindowappendtopage}
106
107\func{bool}{AppendToPage}{\param{const wxString\& }{source}}
108
109Appends HTML fragment to currently displayed text and refreshes the window.
110
111\wxheading{Parameters}
112
113\docparam{source}{HTML code fragment}
114
115\wxheading{Return value}
116
cc81d32f 117false if an error occurred, true otherwise.
39029898 118
559fe022 119\membersection{wxHtmlWindow::GetInternalRepresentation}\label{wxhtmlwindowgetinternalrepresentation}
704a4b75 120
559fe022 121\constfunc{wxHtmlContainerCell*}{GetInternalRepresentation}{\void}
704a4b75 122
559fe022 123Returns pointer to the top-level container.
704a4b75 124
559fe022
VS
125See also: \helpref{Cells Overview}{cells},
126\helpref{Printing Overview}{printing}
704a4b75 127
5656c6ef
VS
128\membersection{wxHtmlWindow::GetOpenedAnchor}\label{wxhtmlwindowgetopenedanchor}
129
130\func{wxString}{GetOpenedAnchor}{\void}
131
132Returns anchor within currently opened page
133(see \helpref{GetOpenedPage}{wxhtmlwindowgetopenedpage}).
134If no page is opened or if the displayed page wasn't
135produced by call to LoadPage, empty string is returned.
136
137
559fe022
VS
138\membersection{wxHtmlWindow::GetOpenedPage}\label{wxhtmlwindowgetopenedpage}
139
140\func{wxString}{GetOpenedPage}{\void}
141
142Returns full location of the opened page. If no page is opened or if the displayed page wasn't
143produced by call to LoadPage, empty string is returned.
144
d5db80c2
VS
145\membersection{wxHtmlWindow::GetOpenedPageTitle}\label{wxhtmlwindowgetopenedpagetitle}
146
147\func{wxString}{GetOpenedPageTitle}{\void}
148
149Returns title of the opened page or wxEmptyString if current page does not contain {\tt <TITLE>} tag.
150
559fe022
VS
151\membersection{wxHtmlWindow::GetRelatedFrame}\label{wxhtmlwindowgetrelatedframe}
152
153\constfunc{wxFrame*}{GetRelatedFrame}{\void}
154
155Returns the related frame.
156
157\membersection{wxHtmlWindow::HistoryBack}\label{wxhtmlwindowhistoryback}
158
159\func{bool}{HistoryBack}{\void}
160
161Moves back to the previous page. (each page displayed using
162\helpref{LoadPage}{wxhtmlwindowloadpage} is stored in history list.)
163
1b113a81
VS
164\membersection{wxHtmlWindow::HistoryCanBack}\label{wxhtmlwindowhistorycanback}
165
166\func{bool}{HistoryCanBack}{\void}
167
168Returns true if it is possible to go back in the history (i.e. HistoryBack()
169won't fail).
170
171\membersection{wxHtmlWindow::HistoryCanForward}\label{wxhtmlwindowhistorycanforward}
172
173\func{bool}{HistoryCanForward}{\void}
174
175Returns true if it is possible to go forward in the history (i.e. HistoryBack()
176won't fail).
177
178
559fe022
VS
179\membersection{wxHtmlWindow::HistoryClear}\label{wxhtmlwindowhistoryclear}
180
181\func{void}{HistoryClear}{\void}
182
183Clears history.
184
185\membersection{wxHtmlWindow::HistoryForward}\label{wxhtmlwindowhistoryforward}
186
187\func{bool}{HistoryForward}{\void}
188
189Moves to next page in history.
704a4b75 190
903972f9
VS
191\membersection{wxHtmlWindow::LoadFile}\label{wxhtmlwindowloadfile}
192
193\func{virtual bool}{LoadFile}{\param{const wxFileName\& }{filename}}
194
195Loads HTML page from file and displays it.
196
197\wxheading{Return value}
198
199false if an error occurred, true otherwise
200
201\wxheading{See also}
202
203\helpref{LoadPage}{wxhtmlwindowloadpage}
204
704a4b75
VS
205\membersection{wxHtmlWindow::LoadPage}\label{wxhtmlwindowloadpage}
206
298d8653 207\func{virtual bool}{LoadPage}{\param{const wxString\& }{location}}
704a4b75 208
448af9a4 209Unlike SetPage this function first loads HTML page from {\it location}
704a4b75
VS
210and then displays it. See example:
211
212\begin{verbatim}
903972f9 213htmlwin->LoadPage("help/myproject/index.htm");
704a4b75
VS
214\end{verbatim}
215
216\wxheading{Parameters}
217
218\docparam{location}{The address of document. See \helpref{wxFileSystem}{wxfilesystem} for details on address format and behaviour of "opener".}
219
220\wxheading{Return value}
221
cc81d32f 222false if an error occurred, true otherwise
704a4b75 223
903972f9
VS
224\wxheading{See also}
225
226\helpref{LoadFile}{wxhtmlwindowloadfile}
227
f6010d8f
VZ
228\membersection{wxHtmlWindow::OnCellClicked}\label{wxhtmlwindowoncellclicked}
229
bc55e31b 230\func{virtual bool}{OnCellClicked}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}, \param{const wxMouseEvent\& }{event}}
f6010d8f
VZ
231
232This method is called when a mouse button is clicked inside wxHtmlWindow.
a1c3cdc4
VS
233
234The default behaviour is to emit a \helpref{wxHtmlCellEvent}{wxhtmlcellevent}
235and, if the event was not processed or skipped, call
236\helpref{OnLinkClicked}{wxhtmlwindowonlinkclicked} if the cell contains an
f6010d8f
VZ
237hypertext link.
238
a1c3cdc4
VS
239Overloading this method is deprecated; intercept the event instead.
240
241
f6010d8f
VZ
242\wxheading{Parameters}
243
244\docparam{cell}{The cell inside which the mouse was clicked, always a simple
154b6b0f 245(i.e. non-container) cell}
f6010d8f
VZ
246
247\docparam{x, y}{The logical coordinates of the click point}
248
249\docparam{event}{The mouse event containing other information about the click}
250
bc55e31b
VS
251\wxheading{Return value}
252
253\true if a link was clicked, \false otherwise.
254
f6010d8f
VZ
255\membersection{wxHtmlWindow::OnCellMouseHover}\label{wxhtmlwindowoncellmousehover}
256
257\func{virtual void}{OnCellMouseHover}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}}
258
259This method is called when a mouse moves over an HTML cell.
a1c3cdc4
VS
260Default behaviour is to emit a \helpref{wxHtmlCellEvent}{wxhtmlcellevent}.
261Overloading this method is deprecated; intercept the event instead.
f6010d8f
VZ
262
263\wxheading{Parameters}
264
265\docparam{cell}{The cell inside which the mouse is currently, always a simple
154b6b0f 266(i.e. non-container) cell}
f6010d8f
VZ
267
268\docparam{x, y}{The logical coordinates of the click point}
269
559fe022 270\membersection{wxHtmlWindow::OnLinkClicked}\label{wxhtmlwindowonlinkclicked}
704a4b75 271
d17f05af 272\func{virtual void}{OnLinkClicked}{\param{const wxHtmlLinkInfo\& }{link}}
704a4b75 273
a1c3cdc4
VS
274Called when user clicks on hypertext link. Default behaviour is to emit a
275\helpref{wxHtmlLinkEvent}{wxhtmllinkevent} and, if the event was not processed
276or skipped, call \helpref{LoadPage}{wxhtmlwindowloadpage} and do nothing else.
277Overloading this method is deprecated; intercept the event instead.
704a4b75 278
846914d1
VS
279Also see \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.
280
e03ca426
VS
281\membersection{wxHtmlWindow::OnOpeningURL}\label{wxhtmlwindowonopeningurl}
282
6cc4e6b8 283\func{virtual wxHtmlOpeningStatus}{OnOpeningURL}{\param{wxHtmlURLType }{type},\param{const wxString\& }{url}, \param{wxString *}{redirect}}
e03ca426
VS
284
285Called when an URL is being opened (either when the user clicks on a link or
6cc4e6b8
VS
286an image is loaded). The URL will be opened only if OnOpeningURL returns
287{\tt wxHTML\_OPEN}. This method is called by
288\helpref{wxHtmlParser::OpenURL}{wxhtmlparseropenurl}.
289You can override OnOpeningURL to selectively block some
290URLs (e.g. for security reasons) or to redirect them elsewhere. Default
291behaviour is to always return {\tt wxHTML\_OPEN}.
e03ca426 292
6cc4e6b8
VS
293\wxheading{Parameters}
294
295\docparam{type}{Indicates type of the resource. Is one of
296\begin{twocollist}\itemsep=0pt
297\twocolitem{{\bf wxHTML\_URL\_PAGE}}{Opening a HTML page.}
298\twocolitem{{\bf wxHTML\_URL\_IMAGE}}{Opening an image.}
299\twocolitem{{\bf wxHTML\_URL\_OTHER}}{Opening a resource that doesn't fall into
300any other category.}
301\end{twocollist}}
302
303\docparam{url}{URL being opened.}
304
305\docparam{redirect}{Pointer to wxString variable that must be filled with an
306URL if OnOpeningURL returns {\tt wxHTML\_REDIRECT}.}
307
308\wxheading{Return value}
309\begin{twocollist}\itemsep=0pt
310\twocolitem{{\bf wxHTML\_OPEN}}{Open the URL.}
311\twocolitem{{\bf wxHTML\_BLOCK}}{Deny access to the URL, \helpref{wxHtmlParser::OpenURL}{wxhtmlparseropenurl} will return NULL.}
312\twocolitem{{\bf wxHTML\_REDIRECT}}{Don't open {\it url}, redirect to another
313URL. OnOpeningURL must fill {\it *redirect} with the new URL. OnOpeningURL will
314be called again on returned URL.}
315\end{twocollist}
d5db80c2
VS
316
317\membersection{wxHtmlWindow::OnSetTitle}\label{wxhtmlwindowonsettitle}
318
319\func{virtual void}{OnSetTitle}{\param{const wxString\& }{title}}
320
321Called on parsing {\tt <TITLE>} tag.
322
323
559fe022 324\membersection{wxHtmlWindow::ReadCustomization}\label{wxhtmlwindowreadcustomization}
704a4b75 325
559fe022 326\func{virtual void}{ReadCustomization}{\param{wxConfigBase }{*cfg}, \param{wxString }{path = wxEmptyString}}
704a4b75 327
559fe022
VS
328This reads custom settings from wxConfig. It uses the path 'path'
329if given, otherwise it saves info into currently selected path.
330The values are stored in sub-path {\tt wxHtmlWindow}
704a4b75 331
448af9a4 332Read values: all things set by SetFonts, SetBorders.
704a4b75 333
559fe022 334\wxheading{Parameters}
704a4b75 335
448af9a4 336\docparam{cfg}{wxConfig from which you want to read the configuration.}
704a4b75 337
559fe022 338\docparam{path}{Optional path in config tree. If not given current path is used.}
704a4b75 339
00ee93d7
VS
340\membersection{wxHtmlWindow::SelectAll}\label{wxhtmlwindowselectall}
341
342\func{void}{SelectAll}{\void}
343
344Selects all text in the window.
345
346\wxheading{See also}
347
348\helpref{SelectLine}{wxhtmlwindowselectline},
349\helpref{SelectWord}{wxhtmlwindowselectword}
350
b55bab15
VS
351\membersection{wxHtmlWindow::SelectionToText}\label{wxhtmlwindowselectiontotext}
352
353\func{wxString}{SelectionToText}{\void}
354
355Returns current selection as plain text. Returns empty string if no text
356is currently selected.
357
00ee93d7
VS
358\membersection{wxHtmlWindow::SelectLine}\label{wxhtmlwindowselectline}
359
360\func{void}{SelectLine}{\param{const wxPoint\& }{pos}}
361
362Selects the line of text that \arg{pos} points at. Note that \arg{pos}
363is relative to the top of displayed page, not to window's origin, use
364\helpref{CalcUnscrolledPosition}{wxscrolledwindowcalcunscrolledposition}
365to convert physical coordinate.
366
367\wxheading{See also}
368
369\helpref{SelectAll}{wxhtmlwindowselectall},
370\helpref{SelectWord}{wxhtmlwindowselectword}
371
372\membersection{wxHtmlWindow::SelectWord}\label{wxhtmlwindowselectword}
373
374\func{void}{SelectWord}{\param{const wxPoint\& }{pos}}
375
376Selects the word at position \arg{pos}. Note that \arg{pos}
377is relative to the top of displayed page, not to window's origin, use
378\helpref{CalcUnscrolledPosition}{wxscrolledwindowcalcunscrolledposition}
379to convert physical coordinate.
380
381\wxheading{See also}
382
383\helpref{SelectAll}{wxhtmlwindowselectall},
384\helpref{SelectLine}{wxhtmlwindowselectline}
385
559fe022 386\membersection{wxHtmlWindow::SetBorders}\label{wxhtmlwindowsetborders}
704a4b75 387
559fe022
VS
388\func{void}{SetBorders}{\param{int }{b}}
389
390This function sets the space between border of window and HTML contents. See image:
391
605d715d 392\helponly{\image{}{border.bmp}}
704a4b75
VS
393
394\wxheading{Parameters}
395
559fe022 396\docparam{b}{indentation from borders in pixels}
704a4b75
VS
397
398\membersection{wxHtmlWindow::SetFonts}\label{wxhtmlwindowsetfonts}
399
fbfb8bcc 400\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
704a4b75
VS
401
402This function sets font sizes and faces.
403
404\wxheading{Parameters}
405
448af9a4 406\docparam{normal\_face}{This is face name for normal (i.e. non-fixed) font.
2edb0bde 407It can be either empty string (then the default face is chosen) or
704a4b75
VS
408platform-specific face name. Examples are "helvetica" under Unix or
409"Times New Roman" under Windows.}
410
448af9a4 411\docparam{fixed\_face}{The same thing for fixed face ( <TT>..</TT> )}
704a4b75 412
704a4b75
VS
413\docparam{sizes}{This is an array of 7 items of {\it int} type.
414The values represent size of font with HTML size from -2 to +4
4eecf115
VS
415( <FONT SIZE=-2> to <FONT SIZE=+4> ). Default sizes are used if {\it sizes}
416is NULL.}
704a4b75
VS
417
418\wxheading{Defaults}
419
4eecf115
VS
420Default font sizes are defined by constants wxHTML\_FONT\_SIZE\_1,
421wxHTML\_FONT\_SIZE\_2, ..., wxHTML\_FONT\_SIZE\_7. Note that they differ among
422platforms. Default face names are empty strings.
704a4b75 423
559fe022 424\membersection{wxHtmlWindow::SetPage}\label{wxhtmlwindowsetpage}
704a4b75 425
559fe022 426\func{bool}{SetPage}{\param{const wxString\& }{source}}
704a4b75 427
559fe022
VS
428Sets HTML page and display it. This won't {\bf load} the page!!
429It will display the {\it source}. See example:
704a4b75 430
559fe022
VS
431\begin{verbatim}
432htmlwin -> SetPage("<html><body>Hello, world!</body></html>");
433\end{verbatim}
434
448af9a4 435If you want to load a document from some location use
559fe022 436\helpref{LoadPage}{wxhtmlwindowloadpage} instead.
704a4b75
VS
437
438\wxheading{Parameters}
439
559fe022 440\docparam{source}{The HTML document source to be displayed.}
704a4b75 441
559fe022 442\wxheading{Return value}
704a4b75 443
cc81d32f 444false if an error occurred, true otherwise.
704a4b75 445
559fe022 446\membersection{wxHtmlWindow::SetRelatedFrame}\label{wxhtmlwindowsetrelatedframe}
704a4b75 447
559fe022 448\func{void}{SetRelatedFrame}{\param{wxFrame* }{frame}, \param{const wxString\& }{format}}
704a4b75 449
448af9a4 450Sets the frame in which page title will be displayed. {\it format} is format of
559fe022
VS
451frame title, e.g. "HtmlHelp : \%s". It must contain exactly one \%s. This
452\%s is substituted with HTML page title.
704a4b75 453
559fe022 454\membersection{wxHtmlWindow::SetRelatedStatusBar}\label{wxhtmlwindowsetrelatedstatusbar}
704a4b75 455
559fe022
VS
456\func{void}{SetRelatedStatusBar}{\param{int }{bar}}
457
458{\bf After} calling \helpref{SetRelatedFrame}{wxhtmlwindowsetrelatedframe},
459this sets statusbar slot where messages will be displayed.
460(Default is -1 = no messages.)
461
462\wxheading{Parameters}
463
464\docparam{bar}{statusbar slot number (0..n)}
704a4b75 465
b55bab15
VS
466\membersection{wxHtmlWindow::ToText}\label{wxhtmlwindowtotext}
467
468\func{wxString}{ToText}{\void}
469
470Returns content of currently displayed page as plain text.
d5db80c2 471
704a4b75
VS
472\membersection{wxHtmlWindow::WriteCustomization}\label{wxhtmlwindowwritecustomization}
473
474\func{virtual void}{WriteCustomization}{\param{wxConfigBase }{*cfg}, \param{wxString }{path = wxEmptyString}}
475
476Saves custom settings into wxConfig. It uses the path 'path'
477if given, otherwise it saves info into currently selected path.
448af9a4
JS
478Regardless of whether the path is given or not, the function creates sub-path
479{\tt wxHtmlWindow}.
704a4b75 480
448af9a4 481Saved values: all things set by SetFonts, SetBorders.
704a4b75
VS
482
483\wxheading{Parameters}
484
448af9a4 485\docparam{cfg}{wxConfig to which you want to save the configuration.}
704a4b75 486
448af9a4 487\docparam{path}{Optional path in config tree. If not given, the current path is used.}
704a4b75 488
a1c3cdc4
VS
489
490
491
492
493
494
495\section{\class{wxHtmlLinkEvent}}\label{wxhtmllinkevent}
496
497This event class is used for the events generated by \helpref{wxHtmlWindow}{wxhtmlwindow}.
498
499\wxheading{Derived from}
500
501\helpref{wxCommandEvent}{wxcommandevent}\\
502\helpref{wxEvent}{wxevent}\\
503\helpref{wxObject}{wxobject}
504
505\wxheading{Include files}
506
507<wx/html/htmlwin.h>
508
a7af285d
VZ
509\wxheading{Library}
510
511\helpref{wxHtml}{librarieslist}
512
a1c3cdc4
VS
513\wxheading{Event handling}
514
515To process input from a wxHtmlLinkEvent, use one of these event handler macros to
516direct input to member function that take a \helpref{wxHtmlLinkEvent}{wxhtmllinkevent} argument:
517
518\twocolwidtha{7cm}
519\begin{twocollist}
97331b82 520\twocolitem{{\bf EVT\_HTML\_LINK\_CLICKED(id, func)}}{User clicked on an hyperlink.}
a1c3cdc4
VS
521\end{twocollist}
522
523
524\latexignore{\rtfignore{\wxheading{Members}}}
525
526\membersection{wxHtmlLinkEvent::wxHtmlLinkEvent}\label{wxhtmllinkeventctor}
527
528\func{}{wxHyperlinkEvent}{\param{int}{ id}, \param{const wxHtmlLinkInfo \&}{ linkinfo}}
529
530The constructor is not normally used by the user code.
531
532
533\membersection{wxHtmlLinkEvent::GetLinkInfo}\label{wxhtmllinkeventgetlinkinfo}
534
535\constfunc{const wxHtmlLinkInfo &}{GetLinkInfo}{\void}
536
537Returns the \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} which contains info about the cell clicked and the hyperlink it contains.
538
539
540
541
542
543
544\section{\class{wxHtmlCellEvent}}\label{wxhtmlcellevent}
545
546This event class is used for the events generated by \helpref{wxHtmlWindow}{wxhtmlwindow}.
547
548\wxheading{Derived from}
549
550\helpref{wxCommandEvent}{wxcommandevent}\\
551\helpref{wxEvent}{wxevent}\\
552\helpref{wxObject}{wxobject}
553
554\wxheading{Include files}
555
556<wx/html/htmlwin.h>
557
a7af285d
VZ
558\wxheading{Library}
559
560\helpref{wxHtml}{librarieslist}
561
a1c3cdc4
VS
562\wxheading{Event handling}
563
564To process input from a wxHtmlCellEvent, use one of these event handler macros to
565direct input to member function that take a \helpref{wxHtmlCellEvent}{wxhtmlcellevent} argument:
566
567\twocolwidtha{7cm}
568\begin{twocollist}
97331b82
RR
569\twocolitem{{\bf EVT\_HTML\_CELL\_HOVER(id, func)}}{User moved the mouse over a \helpref{wxHtmlCell}{wxhtmlcell}.}
570\twocolitem{{\bf EVT\_HTML\_CELL\_CLICKED(id, func)}}{User clicked on a \helpref{wxHtmlCell}{wxhtmlcell}. When handling this event, remember to use \helpref{wxHtmlCell::SetLinkClicked(true)}{wxhtmlcelleventsetlinkclicked} if the cell contains a link.}
a1c3cdc4
VS
571\end{twocollist}
572
573
574\latexignore{\rtfignore{\wxheading{Members}}}
575
576\membersection{wxHtmlCellEvent::wxHtmlCellEvent}\label{wxhtmlcelleventctor}
577
578\func{}{wxHtmlCellEvent}{\param{wxEventType}{ commandType}, \param{int}{ id}, \param{wxHtmlCell *}{ cell}, \param{const wxPoint \&}{ point}}
579
580The constructor is not normally used by the user code.
581
582
583\membersection{wxHtmlCellEvent::GetCell}\label{wxhtmlcelleventgetcell}
584
585\constfunc{wxHtmlCell *}{GetCell}{\void}
586
587Returns the \helpref{wxHtmlCellEvent}{wxhtmlcellevent} associated with the event.
588
589
590\membersection{wxHtmlCellEvent::GetPoint}\label{wxhtmlcelleventgetpoint}
591
592\constfunc{wxPoint}{GetPoint}{\void}
593
594Returns the \helpref{wxPoint}{wxpoint} associated with the event.
595
596
597\membersection{wxHtmlCellEvent::SetLinkClicked}\label{wxhtmlcelleventsetlinkclicked}
598
599\func{bool}{SetLinkClicked}{\param{bool}{ linkclicked}}
600
601Call this function with {\tt linkclicked} set to \true if the cell which has been clicked contained a link or
602\false otherwise (which is the default). With this function the event handler can return info to the
603wxHtmlWindow which sent the event.
604
605
606\membersection{wxHtmlCellEvent::GetLinkClicked}\label{wxhtmlcelleventgetlinkclicked}
607
608\constfunc{bool}{GetLinkClicked}{\void}
609
610Returns \true if \helpref{SetLinkClicked(true)}{wxhtmlcelleventsetlinkclicked} has previously been called;
611\false otherwise.
612