X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c33e257b7ad0a79d2666942fc261f17defe71a57..a17305ea876e64131467348b24f25929f98986d7:/docs/doxygen/overviews/html.h diff --git a/docs/doxygen/overviews/html.h b/docs/doxygen/overviews/html.h index d997e44c84..00320585d7 100644 --- a/docs/doxygen/overviews/html.h +++ b/docs/doxygen/overviews/html.h @@ -3,576 +3,586 @@ // Purpose: topic overview // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -/*! +/** - @page overview_html wxHTML overview +@page overview_html wxHTML Overview - 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 - something like that try http://www.mozilla.org. +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 +something like that try . - wxHTML can be used as a generic rich text viewer - for example to display - a nice About Box (like those of GNOME apps) or to display the result of - database searching. There is a #wxFileSystem class which allows you to use - your own virtual file systems. +wxHTML can be used as a generic rich text viewer - for example to display +a nice About Box (like those of GNOME apps) or to display the result of +database searching. There is a wxFileSystem class which allows you to use +your own virtual file systems. - wxHtmlWindow supports tag handlers. This means that you can easily - extend wxHtml library with new, unsupported tags. Not only that, - you can even use your own application-specific tags! +wxHtmlWindow supports tag handlers. This means that you can easily +extend wxHtml library with new, unsupported tags. Not only that, +you can even use your own application-specific tags! - See @c src/html/m_*.cpp files for details. +See @c src/html/m_*.cpp files for details. - There is a generic wxHtmlParser class, independent of wxHtmlWindow. +There is a generic wxHtmlParser class, independent of wxHtmlWindow. - @li @ref overview_html_quickstart - @li @ref overview_html_printing - @li @ref overview_html_helpformats - @li @ref overview_html_filters - @li @ref overview_html_cells - @li @ref overview_html_handlers - @li @ref overview_html_supptags +@li @ref overview_html_quickstart +@li @ref overview_html_printing +@li @ref overview_html_helpformats +@li @ref overview_html_filters +@li @ref overview_html_cells +@li @ref overview_html_handlers +@li @ref overview_html_supptags -
+
- @section overview_html_quickstart wxHTML quick start +@section overview_html_quickstart wxHTML quick start - @subsection overview_html_quickstart_disphtml Displaying HTML +@subsection overview_html_quickstart_disphtml Displaying HTML - First of all, you must include @c wx/wxhtml.h. +First of all, you must include @c wx/wxhtml.h. - Class #wxHtmlWindow (derived from wxScrolledWindow) is used to display HTML documents. +Class wxHtmlWindow (derived from ::wxScrolledWindow) is used to display HTML documents. - It has two important methods: wxHtmlWindow::LoadPage and wxHtmlWindow::SetPage. - LoadPage loads and displays HTML file while SetPage displays directly the - passed @b string. See the example: +It has two important methods: wxHtmlWindow::LoadPage and wxHtmlWindow::SetPage. +LoadPage loads and displays HTML file while SetPage displays directly the +passed @b string. See the example: - @code - mywin - LoadPage("test.htm"); - mywin - SetPage("htmlbody" - "h1Error/h1" - "Some error occurred :-H)" - "/body/hmtl"); - @endcode +@code + mywin -> LoadPage("test.htm"); + mywin -> SetPage("htmlbody" + "h1Error/h1" + "Some error occurred :-H)" + "/body/hmtl"); +@endcode - @subsection overview_html_quickstart_disphelp Displaying Help - - See #wxHtmlHelpController. +@subsection overview_html_quickstart_settingup Setting up wxHtmlWindow - @subsection overview_html_quickstart_settingup Setting up wxHtmlWindow +Because wxHtmlWindow is derived from ::wxScrolledWindow and not from +wxFrame, it doesn't have visible frame. But the user usually wants to see +the title of HTML page displayed somewhere and the frame's titlebar is +the ideal place for it. - Because wxHtmlWindow is derived from wxScrolledWindow and not from - wxFrame, it doesn't have visible frame. But the user usually wants to see - the title of HTML page displayed somewhere and the frame's titlebar is - the ideal place for it. +wxHtmlWindow provides 2 methods in order to handle this: +wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar. +See the example: - wxHtmlWindow provides 2 methods in order to handle this: - wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar. - See the example: +@code + html = new wxHtmlWindow(this); + html -> SetRelatedFrame(this, "HTML : %%s"); + html -> SetRelatedStatusBar(0); +@endcode - @code - html = new wxHtmlWindow(this); - html - SetRelatedFrame(this, "HTML : %%s"); - html - SetRelatedStatusBar(0); - @endcode +The first command associates the HTML object with its parent frame +(this points to wxFrame object there) and sets the format of the title. +Page title "Hello, world!" will be displayed as "HTML : Hello, world!" +in this example. - The first command associates the HTML object with its parent frame - (this points to wxFrame object there) and sets the format of the title. - Page title "Hello, world!" will be displayed as "HTML : Hello, world!" - in this example. +The second command sets which frame's status bar should be used to display +browser's messages (such as "Loading..." or "Done" or hypertext links). - The second command sets which frame's status bar should be used to display - browser's messages (such as "Loading..." or "Done" or hypertext links). +@subsection overview_html_quickstart_custom Customizing wxHtmlWindow - @subsection overview_html_quickstart_custom Customizing wxHtmlWindow +You can customize wxHtmlWindow by setting font size, font face and +borders (space between border of window and displayed HTML). Related functions: - You can customize wxHtmlWindow by setting font size, font face and - borders (space between border of window and displayed HTML). Related functions: +@li wxHtmlWindow::SetFonts +@li wxHtmlWindow::SetBorders +@li wxHtmlWindow::ReadCustomization +@li wxHtmlWindow::WriteCustomization - @li wxHtmlWindow::SetFonts - @li wxHtmlWindow::SetBorders - @li wxHtmlWindow::ReadCustomization - @li wxHtmlWindow::WriteCustomization +The last two functions are used to store user customization info wxConfig stuff +(for example in the registry under Windows, or in a dotfile under Unix). - The last two functions are used to store user customization info wxConfig stuff - (for example in the registry under Windows, or in a dotfile under Unix). +@section overview_html_printing HTML Printing - @section overview_html_printing HTML Printing +The wxHTML library provides printing facilities with several levels of complexity. +The easiest way to print an HTML document is to use the wxHtmlEasyPrinting class. - The wxHTML library provides printing facilities with several levels of complexity. - The easiest way to print an HTML document is to use @ref htmleasyprinting_overview. +It lets you print HTML documents with only one command and you don't have to worry +about deriving from the wxPrintout class at all. It is only a simple wrapper around the +wxHtmlPrintout, normal wxWidgets printout class. - It lets you print HTML documents with only one command and you don't have to worry - about deriving from the wxPrintout class at all. It is only a simple wrapper around the - #wxHtmlPrintout, normal wxWidgets printout class. +And finally there is the low level class wxHtmlDCRenderer which you can use to +render HTML into a rectangular area on any DC. - And finally there is the low level class #wxHtmlDCRenderer which you can use to - render HTML into a rectangular area on any DC. +It supports rendering into multiple rectangles with the same +width. (The most common use of this is placing one rectangle on each page or +printing into two columns.) - It supports rendering into multiple rectangles with the same - width. (The most common use of this is placing one rectangle on each page or - printing into two columns.) +@section overview_html_helpformats Help Files Format - @section overview_html_helpformats Help Files Format +wxHTML library can be used to show an help manual to the user; in fact, it supports +natively (through wxHtmlHelpController) a reduced version of MS HTML Workshop format. - wxHTML library uses a reduced version of MS HTML Workshop format. - Tex2RTF can produce these files when generating HTML, if you set - @b htmlWorkshopFiles to @true in your tex2rtf.ini file. - (See #wxHtmlHelpController for help controller description.) +A @b book consists of three files: the header file, the contents file +and the index file. - A @b book consists of three files: the header file, the contents file - and the index file. +You can make a regular zip archive of these files, plus the HTML and any +image files, for wxHTML (or helpview) to read; and the @c ".zip" file can +optionally be renamed to @c ".htb". - You can make a regular zip archive of these files, plus the HTML and any - image files, for wxHTML (or helpview) to read; and the @c .zip file can - optionally be renamed to @c .htb. +@subsection overview_html_helpformats_hhp Header file (.hhp) - @subsection overview_html_helpformats_hhp Header file (.hhp) +The header file must contain these lines (and may contain additional lines +which are ignored): - The header file must contain these lines (and may contain additional lines - which are ignored): +@code +Contents file=filename.hhc +Index file=filename.hhk +Title=title of your book +Default topic=default page to be displayed.htm +@endcode - @code - Contents file=filename.hhc - Index file=filename.hhk - Title=title of your book - Default topic=default page to be displayed.htm - @endcode +All filenames (including the Default topic) are relative to the +location of the @c ".hhp" file. - All filenames (including the Default topic) are relative to the - location of the @c .hhp file. - - @note For localization, in addition the @c .hhp file may contain the line - @code +@note For localization, in addition the @c ".hhp" file may contain the line + @code Charset=rfc_charset - @endcode - which specifies what charset (e.g. "iso8859_1") was used in contents - and index files. Please note that this line is incompatible with - MS HTML Help Workshop and it would either silently remove it or complain - with some error. See also @ref overview_nonenglish. + @endcode + which specifies what charset (e.g. "iso8859_1") was used in contents + and index files. Please note that this line is incompatible with + MS HTML Help Workshop and it would either silently remove it or complain + with some error. See also @ref overview_nonenglish. - @subsection overview_html_helpformats_hhc Contents file (.hhc) +@subsection overview_html_helpformats_hhc Contents file (.hhc) - Contents file has HTML syntax and it can be parsed by regular HTML parser. - It contains exactly one list (@c <ul>....@c </ul> statement): +Contents file has HTML syntax and it can be parsed by regular HTML parser. +It contains exactly one list (@c <ul>....@c </ul> statement): - @code -