2 % automatically generated by HelpGen from
3 % htmlwinparser.tex at 14/Mar/99 20:13:37
7 \section{\class{wxHtmlWinParser
}}\label{wxhtmlwinparser
}
9 This class is derived from
\helpref{wxHtmlParser
}{wxhtmlparser
} and
10 its mail goal is to parse HTML input so that it can be displayed in
11 \helpref{wxHtmlWindow
}{wxhtmlwindow
}. It uses special
12 \helpref{wxHtmlWinTagHandler
}{wxhtmlwintaghandler
}.
17 \item Product of parsing is wxHtmlCell (resp. wxHtmlContainer) object.
20 \wxheading{Derived from
}
22 \helpref{wxHtmlParser
}{wxhtmlparser
}
25 \wxheading{Include files
}
31 \helpref{Handlers overview
}{handlers
}
33 \latexignore{\rtfignore{\wxheading{Members
}}}
35 \membersection{wxHtmlWinParser::wxHtmlWinParser
}\label{wxhtmlwinparserwxhtmlwinparser
}
37 \func{}{wxHtmlWinParser
}{\void}
39 \func{}{wxHtmlWinParser
}{\param{wxWindow
}{*wnd
}}
41 Constructor. Don't use the default one, use constructor with
42 {\it wnd
} paremeter (
{\it wnd
} is pointer to associated
\helpref{wxHtmlWindow
}{wxhtmlwindow
})
44 \membersection{wxHtmlWinParser::AddModule
}\label{wxhtmlwinparseraddmodule
}
46 \func{static void
}{AddModule
}{\param{wxHtmlTagsModule
}{*module
}}
48 Adds
\helpref{module
}{handlers
} to the list of wxHtmlWinParser tag handler.
50 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
52 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
54 Closes the container, sets actual container to the parent one
55 and returns pointer to it (see
\helpref{Overview
}{cells
}).
57 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
59 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
61 Creates font based on current setting (see
62 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
63 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
64 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
65 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
66 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
67 and returns pointer to it.
68 (If the font was already created only a pointer is returned.)
71 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
73 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
75 Returns actual text
color.
77 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
79 \constfunc{int
}{GetAlign
}{\void}
81 Returns default horizontal alignment.
83 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
85 \constfunc{int
}{GetCharHeight
}{\void}
87 Returns (average) char height in standard font. It's used as DC-independent metrics.
89 {\bf Note:
} This function doesn't return
{\it actual
} height. If you want to
90 know the height of the current font, call
{\tt GetDC -> GetCharHeight()
}.
92 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
94 \constfunc{int
}{GetCharWidth
}{\void}
96 Returns average char width in standard font. It's used as DC-independent metrics.
98 {\bf Note:
} This function doesn't return
{\it actual
} width. If you want to
99 know the height of the current font, call
{\tt GetDC -> GetCharWidth()
}
101 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
103 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
105 Returns pointer to the currectly opened container (see
\helpref{Overview
}{cells
}).
109 m_WParser -> GetContainer() -> InsertCell(new ...);
112 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
114 \func{wxDC*
}{GetDC
}{\void}
116 Returns pointer to the DC used during parsing.
119 \membersection{wxHtmlWinParser::GetEncodingConverter
}\label{wxhtmlwinparsergetencodingconverter
}
121 \constfunc{wxEncodingConverter *
}{GetEncodingConverter
}{\void}
123 Returns
\helpref{wxEncodingConverter
}{wxencodingconverter
} class used
124 to do conversion between
\helpref{input encoding
}{wxhtmlwinparsergetinputencoding
}
125 and
\helpref{output encoding
}{wxhtmlwinparsergetoutputencoding
}.
127 \membersection{wxHtmlWinParser::GetFontBold
}\label{wxhtmlwinparsergetfontbold
}
129 \constfunc{int
}{GetFontBold
}{\void}
131 Returns TRUE if actual font is bold, FALSE otherwise.
133 \membersection{wxHtmlWinParser::GetFontFace
}\label{wxhtmlwinparsergetfontface
}
135 \constfunc{wxString
}{GetFontFace
}{\void}
137 Returns actual font face name.
140 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
142 \constfunc{int
}{GetFontFixed
}{\void}
144 Returns TRUE if actual font is fixed face, FALSE otherwise.
146 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
148 \constfunc{int
}{GetFontItalic
}{\void}
150 Returns TRUE if actual font is italic, FALSE otherwise.
153 \membersection{wxHtmlWinParser::GetFontSize
}\label{wxhtmlwinparsergetfontsize
}
155 \constfunc{int
}{GetFontSize
}{\void}
157 Returns actual font size (HTML size varies from -
2 to +
4)
159 \membersection{wxHtmlWinParser::GetFontUnderlined
}\label{wxhtmlwinparsergetfontunderlined
}
161 \constfunc{int
}{GetFontUnderlined
}{\void}
163 Returns TRUE if actual font is underlined, FALSE otherwise.
165 \membersection{wxHtmlWinParser::GetInputEncoding
}\label{wxhtmlwinparsergetinputencoding
}
167 \constfunc{wxFontEncoding
}{GetInputEncoding
}{\void}
169 Returns input encoding.
172 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
174 \constfunc{const wxHtmlLinkInfo\&
}{GetLink
}{\void}
176 Returns actual hypertext link. (This value has non-empty
177 \helpref{Href
}{wxhtmllinkinfogethref
} string
178 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
179 wxEmptyString otherwise.)
182 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
184 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
186 Returns
color of hypertext link text.
189 \membersection{wxHtmlWinParser::GetOutputEncoding
}\label{wxhtmlwinparsergetoutputencoding
}
191 \constfunc{wxFontEncoding
}{GetOutputEncoding
}{\void}
193 Returns output encoding, i.e. closest match to
document's input encoding
194 that is supported by operating system.
196 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
198 \func{wxWindow*
}{GetWindow
}{\void}
200 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
201 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
202 title only if some window is associated, otherwise it does nothing)
205 \membersection{wxHtmlWinParser::OpenContainer
}\label{wxhtmlwinparseropencontainer
}
207 \func{wxHtmlContainerCell*
}{OpenContainer
}{\void}
209 Opens new container and returns pointer to it (see
\helpref{Overview
}{cells
}).
212 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
214 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
216 Sets actual text
color. Note: this DOESN'T change the
color!
217 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
219 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
221 \func{void
}{SetAlign
}{\param{int
}{a
}}
223 Sets default horizontal alignment (see
224 \helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.)
225 Alignment of newly opened container is set to this value.
228 \membersection{wxHtmlWinParser::SetContainer
}\label{wxhtmlwinparsersetcontainer
}
230 \func{wxHtmlContainerCell*
}{SetContainer
}{\param{wxHtmlContainerCell *
}{c
}}
232 Allows you to directly set opened container. This is not recommended - you should use OpenContainer
236 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
238 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
},
\param{double
}{pixel
\_scale =
1.0}}
240 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
241 {\it pixel
\_scale} can be used when rendering to high-resolution
242 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
243 HTML are given in pixels -- e.g. image sizes.
300x300 image would be only one
244 inch wide on typical printer. With pixel
\_scale =
3.0 it would be
3 inches.)
247 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
249 \func{void
}{SetFontBold
}{\param{int
}{x
}}
251 Sets bold flag of actualfont.
{\it x
} is either TRUE of FALSE.
253 \membersection{wxHtmlWinParser::SetFontFace
}\label{wxhtmlwinparsersetfontface
}
255 \func{void
}{SetFontFace
}{\param{const wxString\&
}{face
}}
257 Sets current font face to
{\it face
}. This affects either fixed size
258 font or proportional, depending on context (whether the parser is
259 inside
{\tt <TT>
} tag or not).
261 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
263 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
265 Sets fixed face flag of actualfont.
{\it x
} is either TRUE of FALSE.
267 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
269 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
271 Sets italic flag of actualfont.
{\it x
} is either TRUE of FALSE.
274 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
276 \func{void
}{SetFontSize
}{\param{int
}{s
}}
278 Sets actual font size (HTML size varies from
1 to
7)
280 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
282 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
284 Sets underlined flag of actualfont.
{\it x
} is either TRUE of FALSE.
286 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
288 \func{void
}{SetFonts
}{\param{wxString
}{normal
\_face},
\param{wxString
}{fixed
\_face},
\param{const int
}{*sizes
}}
290 Sets fonts. This method is identical to
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
}
293 \membersection{wxHtmlWinParser::SetInputEncoding
}\label{wxhtmlwinparsersetinputencoding
}
295 \func{void
}{SetInputEncoding
}{\param{wxFontEncoding
}{enc
}}
297 Sets input encoding. The parser uses this information to build conversion
298 tables from
document's encoding to some encoding supported by operating
302 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
304 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
306 Sets actual hypertext link. Empty link is represented
307 by
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
} with
{\it Href
} equal
310 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
312 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
314 Sets
color of hypertext link.