X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c4f71cc3d63fb7bdfbd6cec3e39c8a8679f3e60..507a6cd69a2097a415b81745b014b286ba3d451b:/docs/doxygen/overviews/html.h diff --git a/docs/doxygen/overviews/html.h b/docs/doxygen/overviews/html.h index 3a5027b2a7..9c3d8bcbb0 100644 --- a/docs/doxygen/overviews/html.h +++ b/docs/doxygen/overviews/html.h @@ -3,584 +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 . +@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 +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. - See wxHtmlHelpController. +wxHtmlWindow provides 2 methods in order to handle this: +wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar. +See the example: - @subsection overview_html_quickstart_settingup Setting up wxHtmlWindow +@code +html = new wxHtmlWindow(this); +html->SetRelatedFrame(this, "HTML : %%s"); +html->SetRelatedStatusBar(0); +@endcode - 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. +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. - wxHtmlWindow provides 2 methods in order to handle this: - wxHtmlWindow::SetRelatedFrame and wxHtmlWindow::SetRelatedStatusBar. - See the 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). - @code - html = new wxHtmlWindow(this); - html -> SetRelatedFrame(this, "HTML : %%s"); - html -> SetRelatedStatusBar(0); - @endcode +@subsection overview_html_quickstart_custom Customizing wxHtmlWindow - 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. +You can customize wxHtmlWindow by setting font size, font face and +borders (space between border of window and displayed HTML). Related functions: - 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). +@li wxHtmlWindow::SetFonts +@li wxHtmlWindow::SetBorders +@li wxHtmlWindow::ReadCustomization +@li wxHtmlWindow::WriteCustomization - @subsection overview_html_quickstart_custom Customizing wxHtmlWindow +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). - 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 - 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. +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. - @section overview_html_printing HTML Printing +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. - 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. - 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. +@section overview_html_helpformats Help Files Format - 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.) +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. +A @b book consists of three files: the header file, the contents file +and the index file. - @section overview_html_helpformats Help Files Format +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". - 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.) +@subsection overview_html_helpformats_hhp Header file (.hhp) - A @b book consists of three files: the header file, the contents file - and the index file. +The header file must contain these lines (and may contain additional lines +which are ignored): - 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. +@code +Contents file=filename.hhc +Index file=filename.hhk +Title=title of your book +Default topic=default page to be displayed.htm +@endcode - @subsection overview_html_helpformats_hhp Header file (.hhp) +All filenames (including the Default topic) are relative to the +location of the @c ".hhp" file. - 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 - - 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 -