X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/98ba1eee5d1b107e66c9fd28963b95f46fdefe89..507a6cd69a2097a415b81745b014b286ba3d451b:/docs/doxygen/overviews/html.h diff --git a/docs/doxygen/overviews/html.h b/docs/doxygen/overviews/html.h index 621054c4ae..9c3d8bcbb0 100644 --- a/docs/doxygen/overviews/html.h +++ b/docs/doxygen/overviews/html.h @@ -3,579 +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. +@tableofcontents - 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. +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 . - 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! +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. - See @c src/html/m_*.cpp files for details. +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! - There is a generic wxHtmlParser class, independent of wxHtmlWindow. +See @c src/html/m_*.cpp files for details. - @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 +There is a generic wxHtmlParser class, independent of wxHtmlWindow. -
+@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_settingup Setting up wxHtmlWindow - @subsection overview_html_quickstart_disphelp Displaying Help - - See wxHtmlHelpController. +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. - @subsection overview_html_quickstart_settingup Setting up wxHtmlWindow +wxHtmlWindow provides 2 methods in order to handle this: +wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar. +See the example: - 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. +@code +html = new wxHtmlWindow(this); +html->SetRelatedFrame(this, "HTML : %%s"); +html->SetRelatedStatusBar(0); +@endcode - wxHtmlWindow provides 2 methods in order to handle this: - wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar. - See the 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. - @code - html = new wxHtmlWindow(this); - html -> SetRelatedFrame(this, "HTML : %%s"); - html -> SetRelatedStatusBar(0); - @endcode +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 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. +@subsection overview_html_quickstart_custom Customizing wxHtmlWindow - 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). +You can customize wxHtmlWindow by setting font size, font face and +borders (space between border of window and displayed HTML). Related functions: - @subsection overview_html_quickstart_custom Customizing wxHtmlWindow +@li wxHtmlWindow::SetFonts +@li wxHtmlWindow::SetBorders +@li wxHtmlWindow::ReadCustomization +@li wxHtmlWindow::WriteCustomization - You can customize wxHtmlWindow by setting font size, font face and - borders (space between border of window and displayed HTML). Related functions: +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). - @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). +@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. - @section overview_html_printing HTML Printing +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. - The wxHTML library provides printing facilities with several levels of complexity. - The easiest way to print an HTML document is to use @ref overview_htmleasyprinting. +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 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. - 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 +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. - @section overview_html_helpformats Help Files Format +A @b book consists of three files: the header file, the contents file +and the index file. - 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.) +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". - A @b book consists of three files: the header file, the contents file - and the index file. +@subsection overview_html_helpformats_hhp Header file (.hhp) - 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. +The header file must contain these lines (and may contain additional lines +which are ignored): - @subsection overview_html_helpformats_hhp Header file (.hhp) +@code +Contents file=filename.hhc +Index file=filename.hhk +Title=title of your book +Default topic=default page to be displayed.htm +@endcode - The header file must contain these lines (and may contain additional lines - which are ignored): +All filenames (including the Default topic) are relative to the +location of the @c ".hhp" file. - @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. - - @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. - - @subsection overview_html_helpformats_hhc Contents file (.hhc) + @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. - Contents file has HTML syntax and it can be parsed by regular HTML parser. - It contains exactly one list (@c <ul>....@c </ul> statement): +@subsection overview_html_helpformats_hhc Contents file (.hhc) - @code -