1 \membersection{wxHTML quick start
}\label{wxhtmlquickstart
}
3 \wxheading{Displaying HMTL
}
5 First of all, you must include <wx/wxhtml.h>.
7 Class
\helpref{wxHtmlWindow
}{wxhtmlwindow
} (derived from wxScrolledWindow)
8 is used to display HTML documents.
9 It has two important methods:
\helpref{LoadPage
}{wxhtmlwindowloadpage
}
10 and
\helpref{SetPage
}{wxhtmlwindowsetpage
}.
11 LoadPage loads and displays HTML file while SetPage displays directly the
12 passed
{\bf string
}. See the example:
15 mywin -> LoadPage("test.htm");
16 mywin -> SetPage("<html><body>"
18 "Some error occured :-H)"
22 I think the difference is quite clear.
24 \wxheading{Displaying Help
}
26 See
\helpref{wxHtmlHelpController
}{wxhtmlhelpcontroller
}.
28 \wxheading{Setting up wxHtmlWindow
}
30 Because wxHtmlWindow is derived from wxScrolledWindow and not from
31 wxFrame, it doesn't have visible frame. But the user usually want to see
32 the title of HTML page displayed somewhere and frame's titlebar is
35 wxHtmlWindow provides
2 methods in order to handle this:
36 \helpref{SetRelatedFrame
}{wxhtmlwindowsetrelatedframe
} and
37 \helpref{SetRelatedStatusBar
}{wxhtmlwindowsetrelatedstatusbar
}.
41 html = new wxHtmlWindow(this);
42 html -> SetRelatedFrame(this, "HTML :
%%s");
43 html -> SetRelatedStatusBar(
0);
46 The first command associates html object with it's parent frame
47 (this points to wxFrame object there) and sets format of title.
48 Page title "Hello, world!" will be displayed as "HTML : Hello, world!"
51 The second command sets which frame's status bar should be used to display
52 browser's messages (such as "Loading..." or "Done" or hypertext links).
54 \wxheading{Customizing wxHtmlWindow
}
56 You can customize wxHtmlWindow by setting font size, font face and
57 borders (space between border of window and displayed HTML). Related functions:
59 \begin{itemize
}\itemsep=
0pt
60 \item \helpref{SetFonts
}{wxhtmlwindowsetfonts
}
61 \item \helpref{SetBorders
}{wxhtmlwindowsetborders
}
62 \item \helpref{ReadCustomization
}{wxhtmlwindowreadcustomization
}
63 \item \helpref{WriteCustomization
}{wxhtmlwindowwritecustomization
}
66 The last two functions are used to store user customization info wxConfig stuff
67 (for example registry under Windows or dotfile under Unix).