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