X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e03ca426818f6c9fc2608644fc2c99a9acefb6bc..afbe906abdf9aa69a56571b8b20b095351dd8f34:/docs/latex/wx/htwindow.tex?ds=inline

diff --git a/docs/latex/wx/htwindow.tex b/docs/latex/wx/htwindow.tex
index ed1f0344d9..2a821551f8 100644
--- a/docs/latex/wx/htwindow.tex
+++ b/docs/latex/wx/htwindow.tex
@@ -17,6 +17,13 @@ Once the window is created you can set its content by calling
 \helpref{SetPage(text)}{wxhtmlwindowsetpage} or 
 \helpref{LoadPage(filename)}{wxhtmlwindowloadpage}. 
 
+\wxheading{Note}
+
+wxHtmlWindow uses the \helpref{wxImage}{wximage} class for displaying images.
+Don't forget to initialize all image formats you need before loading any page!
+(See \helpref{wxInitAllImageHandlers}{wxinitallimagehandlers} and
+\helpref{wxImage::AddHandler}{wximageaddhandler}.)
+
 \wxheading{Derived from}
 
 \helpref{wxScrolledWindow}{wxscrolledwindow}
@@ -200,13 +207,39 @@ Also see \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.
 
 \membersection{wxHtmlWindow::OnOpeningURL}\label{wxhtmlwindowonopeningurl}
 
-\func{virtual bool}{OnOpeningURL}{\param{const wxString\& }{url}}
+\func{virtual wxHtmlOpeningStatus}{OnOpeningURL}{\param{wxHtmlURLType }{type},\param{const wxString\& }{url}, \param{wxString *}{redirect}}
 
 Called when an URL is being opened (either when the user clicks on a link or
-an image is loaded). If the function returns FALSE, the URL won't be fetched.
-Default behaviour is to return TRUE.
+an image is loaded). The URL will be opened only if OnOpeningURL returns 
+{\tt wxHTML\_OPEN}. This method is called by
+\helpref{wxHtmlParser::OpenURL}{wxhtmlparseropenurl}.
+You can override OnOpeningURL to selectively block some
+URLs (e.g. for security reasons) or to redirect them elsewhere. Default
+behaviour is to always return {\tt wxHTML\_OPEN}.
+
+\wxheading{Parameters}
 
-Also see \helpref{wxHtmlWinParser::CanOpenURL}{wxhtmlwinparsercanopenurl}.
+\docparam{type}{Indicates type of the resource. Is one of
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxHTML\_URL\_PAGE}}{Opening a HTML page.}
+\twocolitem{{\bf wxHTML\_URL\_IMAGE}}{Opening an image.}
+\twocolitem{{\bf wxHTML\_URL\_OTHER}}{Opening a resource that doesn't fall into
+any other category.}
+\end{twocollist}}
+
+\docparam{url}{URL being opened.}
+
+\docparam{redirect}{Pointer to wxString variable that must be filled with an
+URL if OnOpeningURL returns {\tt wxHTML\_REDIRECT}.}
+
+\wxheading{Return value}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxHTML\_OPEN}}{Open the URL.}
+\twocolitem{{\bf wxHTML\_BLOCK}}{Deny access to the URL, \helpref{wxHtmlParser::OpenURL}{wxhtmlparseropenurl} will return NULL.}
+\twocolitem{{\bf wxHTML\_REDIRECT}}{Don't open {\it url}, redirect to another
+URL. OnOpeningURL must fill {\it *redirect} with the new URL. OnOpeningURL will
+be called again on returned URL.}
+\end{twocollist}
 
 \membersection{wxHtmlWindow::OnSetTitle}\label{wxhtmlwindowonsettitle}
 
