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