2 % automatically generated by HelpGen from
3 % htmlwinparser.tex at 14/Mar/99 20:13:37
6 \section{\class{wxHtmlWinParser
}}\label{wxhtmlwinparser
}
8 This class is derived from
\helpref{wxHtmlParser
}{wxhtmlparser
} and
9 its mail goal is to parse HTML input so that it can be displayed in
10 \helpref{wxHtmlWindow
}{wxhtmlwindow
}. It uses special
11 \helpref{wxHtmlWinTagHandler
}{wxhtmlwintaghandler
}.
16 \item Product of parsing is wxHtmlCell (resp. wxHtmlContainer) object.
17 \item This parser produces temporary data! You should call
18 \helpref{delete GetTempData()
}{wxhtmlparsergettempdata
}!
21 \wxheading{Derived from
}
23 \helpref{wxHtmlParser
}{wxhtmlparser
}
27 \helpref{Handlers overview
}{handlers
}
29 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxHtmlWinParser::wxHtmlWinParser
}\label{wxhtmlwinparserwxhtmlwinparser
}
33 \func{}{wxHtmlWinParser
}{\void}
35 \func{}{wxHtmlWinParser
}{\param{wxWindow
}{*wnd
}}
37 Constructor. Don't use the default one, use constructor with
38 {\it wnd
} paremeter (
{\it wnd
} is pointer to associated
\helpref{wxHtmlWindow
}{wxhtmlwindow
})
40 \membersection{wxHtmlWinParser::AddModule
}\label{wxhtmlwinparseraddmodule
}
42 \func{static void
}{AddModule
}{\param{wxHtmlTagsModule
}{*module
}}
44 Adds
\helpref{module
}{handlers
} to the list of wxHtmlWinParser tag handler.
46 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
48 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
50 Closes the container, sets actual container to the parent one
51 and returns pointer to it (see
\helpref{Overview
}{cells
}).
53 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
55 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
57 Creates font based on current setting (see
58 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
59 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
60 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
61 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
62 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
63 and returns pointer to it.
64 (If the font was already created only a pointer is returned.)
66 Fonts created during parsing are temporary data and are not freed on DoneParser.
67 You must call
\helpref{delete myparser->GetTempData();
}{wxhtmlparsergettempdata
}
70 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
72 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
74 Returns actual text
color.
76 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
78 \constfunc{int
}{GetAlign
}{\void}
80 Returns default horizontal alignment.
82 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
84 \constfunc{int
}{GetCharHeight
}{\void}
86 Returns (average) char height in standard font. It's used as DC-independent metrics.
88 {\bf Note:
} This function doesn't return
{\it actual
} height. If you want to
89 know the height of the current font, call
{\tt GetDC -> GetCharHeight()
}.
91 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
93 \constfunc{int
}{GetCharWidth
}{\void}
95 Returns average char width in standard font. It's used as DC-independent metrics.
97 {\bf Note:
} This function doesn't return
{\it actual
} width. If you want to
98 know the height of the current font, call
{\tt GetDC -> GetCharWidth()
}
100 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
102 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
104 Returns pointer to the currectly opened container (see
\helpref{Overview
}{cells
}).
108 m_WParser -> GetContainer() -> InsertCell(new ...);
111 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
113 \func{wxDC*
}{GetDC
}{\void}
115 Returns pointer to the DC used during parsing.
117 \membersection{wxHtmlWinParser::GetFontBold
}\label{wxhtmlwinparsergetfontbold
}
119 \constfunc{int
}{GetFontBold
}{\void}
121 Returns TRUE if actual font is bold, FALSE otherwise.
123 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
125 \constfunc{int
}{GetFontFixed
}{\void}
127 Returns TRUE if actual font is fixed face, FALSE otherwise.
129 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
131 \constfunc{int
}{GetFontItalic
}{\void}
133 Returns TRUE if actual font is italic, FALSE otherwise.
136 \membersection{wxHtmlWinParser::GetFontSize
}\label{wxhtmlwinparsergetfontsize
}
138 \constfunc{int
}{GetFontSize
}{\void}
140 Returns actual font size (HTML size varies from -
2 to +
4)
142 \membersection{wxHtmlWinParser::GetFontUnderlined
}\label{wxhtmlwinparsergetfontunderlined
}
144 \constfunc{int
}{GetFontUnderlined
}{\void}
146 Returns TRUE if actual font is underlined, FALSE otherwise.
148 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
150 \constfunc{const wxString\&
}{GetLink
}{\void}
152 Returns actual hypertext link. (This value is non-empty string
153 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
154 wxEmptyString otherwise.
157 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
159 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
161 Returns
color of hypertext link text.
163 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
165 \func{wxWindow*
}{GetWindow
}{\void}
167 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
168 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
169 title only if some window is associated, otherwise it does nothing)
172 \membersection{wxHtmlWinParser::OpenContainer
}\label{wxhtmlwinparseropencontainer
}
174 \func{wxHtmlContainerCell*
}{OpenContainer
}{\void}
176 Opens new container and returns pointer to it (see
\helpref{Overview
}{cells
}).
179 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
181 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
183 Sets actual text
color. Note: this DOESN'T change the
color!
184 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
186 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
188 \func{void
}{SetAlign
}{\param{int
}{a
}}
190 Sets default horizontal alignment (see
\helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.
191 Alignment of newly opened container is set to this value.
193 %\membersection{wxHtmlWinParser::SetContainer}\label{wxhtmlwinparsersetcontainer}
195 %\func{wxHtmlContainerCell*}{SetContainer}{\param{wxHtmlContainerCell *}{c}}
197 %Allows you to directly set opened container. This is not recommended - you should use OpenContainer
201 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
203 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
},
\param{double
}{pixel_scale =
1.0}
205 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
{\it pixel_scale
}
206 can be used when rendering to high-resolution DCs (e.g. printer) to adjust size of pixel metrics.
207 (Many dimensions in HTML are given in pixels - e.g. image sizes.
300x300 image would be only one
208 inch wide on typical printer. With pixel_scale =
3.0 it would be
3 inches.)
210 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
212 \func{void
}{SetFontBold
}{\param{int
}{x
}}
214 Sets bold flag of actualfont.
{\it x
} is either TRUE of FALSE.
216 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
218 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
220 Sets fixed face flag of actualfont.
{\it x
} is either TRUE of FALSE.
222 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
224 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
226 Sets italic flag of actualfont.
{\it x
} is either TRUE of FALSE.
228 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
230 \func{void
}{SetFontSize
}{\param{int
}{s
}}
232 Sets actual font size (HTML size varies from -
2 to +
4)
234 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
236 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
238 Sets underlined flag of actualfont.
{\it x
} is either TRUE of FALSE.
240 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
242 \func{void
}{SetFonts
}{\param{wxString
}{normal
\_face},
\param{wxString
}{fixed
\_face},
\param{const int
}{*sizes
}}
244 Sets fonts. This method is identical to
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
}
246 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
248 \func{void
}{SetLink
}{\param{const wxString\&
}{link
}}
250 Sets actual hypertext link. wxEmptyString means no link.
252 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
254 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
256 Sets
color of hypertext link.