partially backported wxHTML SetFonts improvements

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-04-07 22:19:19 +00:00
parent 3d20fa7032
commit c44ad973b9
10 changed files with 133 additions and 37 deletions

View File

@@ -44,8 +44,19 @@ in pixels (you should set it to page width minus margins).
the screen width is always 800 pixels: it gives best results and ensures (almost) same printed outputs
across platforms and differently configured desktops.}
\membersection{wxHtmlDCRenderer::SetFonts}\label{wxhtmldcrenderersetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
detailed description.
See also \helpref{SetSize}{wxhtmldcrenderersetsize}.
\wxheading{Note}
This method was added in wxWindows 2.4.1.
\membersection{wxHtmlDCRenderer::SetSize}\label{wxhtmldcrenderersetsize}
\func{void}{SetSize}{\param{int }{width}, \param{int }{height}}

View File

@@ -27,6 +27,16 @@ This class serves as printout class for HTML documents.
Constructor.
\membersection{wxHtmlPrintout::SetFonts}\label{wxhtmlprintoutsetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
detailed description.
\wxheading{Note}
This method was added in wxWindows 2.4.1.
\membersection{wxHtmlPrintout::SetFooter}\label{wxhtmlprintoutsetfooter}

View File

@@ -14,8 +14,9 @@ file or downloaded via HTTP protocol) in a window. The width
of the window is constant - given in the constructor - and virtual height
is changed dynamically depending on page size.
Once the window is created you can set its content by calling
\helpref{SetPage(text)}{wxhtmlwindowsetpage} or
\helpref{LoadPage(filename)}{wxhtmlwindowloadpage}.
\helpref{SetPage(text)}{wxhtmlwindowsetpage},
\helpref{LoadPage(filename)}{wxhtmlwindowloadpage} or
\helpref{LoadFile}{wxhtmlwindowloadfile}.
\wxheading{Note}
@@ -146,6 +147,24 @@ Clears history.
Moves to next page in history.
\membersection{wxHtmlWindow::LoadFile}\label{wxhtmlwindowloadfile}
\func{virtual bool}{LoadFile}{\param{const wxFileName\& }{filename}}
Loads HTML page from file and displays it.
\wxheading{Return value}
FALSE if an error occurred, TRUE otherwise
\wxheading{Note}
This method was added in wxWindows 2.4.1.
\wxheading{See also}
\helpref{LoadPage}{wxhtmlwindowloadpage}
\membersection{wxHtmlWindow::LoadPage}\label{wxhtmlwindowloadpage}
\func{virtual bool}{LoadPage}{\param{const wxString\& }{location}}
@@ -154,7 +173,7 @@ Unlike SetPage this function first loads HTML page from {\it location}
and then displays it. See example:
\begin{verbatim}
htmlwin -> SetPage("help/myproject/index.htm");
htmlwin->LoadPage("help/myproject/index.htm");
\end{verbatim}
\wxheading{Parameters}
@@ -165,6 +184,10 @@ htmlwin -> SetPage("help/myproject/index.htm");
FALSE if an error occurred, TRUE otherwise
\wxheading{See also}
\helpref{LoadFile}{wxhtmlwindowloadfile}
\membersection{wxHtmlWindow::OnCellClicked}\label{wxhtmlwindowoncellclicked}
\func{virtual void}{OnCellClicked}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}, \param{const wxMouseEvent\& }{event}}
@@ -278,7 +301,7 @@ This function sets the space between border of window and HTML contents. See ima
\membersection{wxHtmlWindow::SetFonts}\label{wxhtmlwindowsetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes}}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
This function sets font sizes and faces.
@@ -293,24 +316,20 @@ platform-specific face name. Examples are "helvetica" under Unix or
\docparam{sizes}{This is an array of 7 items of {\it int} type.
The values represent size of font with HTML size from -2 to +4
( <FONT SIZE=-2> to <FONT SIZE=+4> )}
( <FONT SIZE=-2> to <FONT SIZE=+4> ). Default sizes are used if {\it sizes}
is NULL.}
\wxheading{Defaults}
Under wxGTK:
Default font sizes are defined by constants wxHTML\_FONT\_SIZE\_1,
wxHTML\_FONT\_SIZE\_2, ..., wxHTML\_FONT\_SIZE\_7. Note that they differ among
platforms. Default face names are empty strings.
\begin{verbatim}
SetFonts("", "", {10, 12, 14, 16, 19, 24, 32});
\end{verbatim}
\wxheading{Note}
Under Windows:
\begin{verbatim}
SetFonts("", "", {7, 8, 10, 12, 16, 22, 30});
\end{verbatim}
Although it seems different the fact is that the fonts are of approximately
same size under both platforms (due to wxMSW / wxGTK inconsistency)
{\tt NULL} is valid value of {\it sizes} since wxWindows 2.4.1. Older
versions did not accept {\tt NULL} value. wxHTML\_FONT\_SIZE\_n constants
were added in wxWindows 2.4.1.
\membersection{wxHtmlWindow::SetPage}\label{wxhtmlwindowsetpage}

View File

@@ -269,9 +269,10 @@ Sets underlined flag of actualfont. {\it x} is either TRUE of FALSE.
\membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes}}
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
Sets fonts. This method is identical to \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts}
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
detailed description.
\membersection{wxHtmlWinParser::SetInputEncoding}\label{wxhtmlwinparsersetinputencoding}