From 4215a4386e7bc781155d6809f052753c1f9a72b2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 13 Mar 2007 15:08:30 +0000 Subject: [PATCH] corrected example; minor fixes to the text; uncommented insertion of the bitmaps git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/htmlcell.tex | 31 ++++++++++++------------------- docs/latex/wx/htmlstrt.tex | 6 ++---- docs/latex/wx/wxhtml.tex | 2 -- 3 files changed, 14 insertions(+), 25 deletions(-) diff --git a/docs/latex/wx/htmlcell.tex b/docs/latex/wx/htmlcell.tex index fbf7777125..6b3696ecd6 100644 --- a/docs/latex/wx/htmlcell.tex +++ b/docs/latex/wx/htmlcell.tex @@ -21,12 +21,9 @@ on number and sizes of its sub-cells (and also depends on width of window). See \helpref{wxHtmlContainerCell}{wxhtmlcontainercell}, \helpref{wxHtmlCell::Layout}{wxhtmlcelllayout}. -\begin{comment} -% Bitmap is corrupt! -This image shows you cells and containers: - +This image shows the cells and containers: \helponly{\image{}{contbox.bmp}} -\end{comment} + \wxheading{Using Containers in Tag Handler} \helpref{wxHtmlWinParser}{wxhtmlwinparser} provides a user-friendly way @@ -41,14 +38,11 @@ Use \helpref{CloseContainer}{wxhtmlwinparserclosecontainer} to close the container. This doesn't create a new container with same depth level but it returns "control" to the parent container. -\begin{comment} -% Bitmap corrupt! See explanation: - \helponly{\image{}{cont.bmp}} -\end{comment} -It is clear there must be same number of calls to -OpenContainer as to CloseContainer... + +There clearly must be same number of calls to OpenContainer as to +CloseContainer. \wxheading{Example} @@ -59,24 +53,23 @@ with "Hello, world!": m_WParser -> CloseContainer(); c = m_WParser -> OpenContainer(); -m_WParser -> AddWord("Hello, "); -m_WParser -> AddWord("world!"); +m_WParser -> AddText("Hello, "); +m_WParser -> AddText("world!"); m_WParser -> CloseContainer(); m_WParser -> OpenContainer(); \end{verbatim} -\begin{comment} -% Bitmap corrupt! and here is image of the situation: - \helponly{\image{}{hello.bmp}} -\end{comment} -You can see that there was opened container before running the code. We closed -it, created our own container, then closed our container and opened +You can see that there was an opened container before the code was executed. +We closed it, created our own container, then closed our container and opened new container. The result was that we had {\it same depth level} after executing. This is general rule that should be followed by tag handlers: leave depth level of containers unmodified (in other words, number of OpenContainer and CloseContainer calls should be same within \helpref{HandleTag}{wxhtmltaghandlerhandletag}'s body). +Notice that it would be usually better to use +\helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell} instead +of adding text to the parser directly. diff --git a/docs/latex/wx/htmlstrt.tex b/docs/latex/wx/htmlstrt.tex index 988df7d19c..5708f5daf2 100644 --- a/docs/latex/wx/htmlstrt.tex +++ b/docs/latex/wx/htmlstrt.tex @@ -15,12 +15,10 @@ passed {\bf string}. See the example: mywin -> LoadPage("test.htm"); mywin -> SetPage("" "

Error

" - "Some error occurred :-H)" - ""); + "Some error occurred :-H)" + ""); \end{verbatim} -I think the difference is quite clear. - \wxheading{Displaying Help} See \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}. diff --git a/docs/latex/wx/wxhtml.tex b/docs/latex/wx/wxhtml.tex index 1eaf9cbe6b..1b27b708ee 100644 --- a/docs/latex/wx/wxhtml.tex +++ b/docs/latex/wx/wxhtml.tex @@ -1,7 +1,5 @@ \section{wxHTML overview}\label{wxhtml} -This topic was written by Vaclav Slavik, the author of the wxHTML library. - The wxHTML library provides classes for parsing and displaying HTML. It is not intended to be a high-end HTML browser. If you are looking for -- 2.47.2