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 a special
11 \helpref{wxHtmlWinTagHandler
}{wxhtmlwintaghandler
}.
15 The product of parsing is a wxHtmlCell (resp. wxHtmlContainer) object.
17 \wxheading{Derived from
}
19 \helpref{wxHtmlParser
}{wxhtmlparser
}
21 \wxheading{Include files
}
27 \helpref{Handlers overview
}{handlers
}
29 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxHtmlWinParser::wxHtmlWinParser
}\label{wxhtmlwinparserwxhtmlwinparser
}
33 \func{}{wxHtmlWinParser
}{\void}
35 \func{}{wxHtmlWinParser
}{\param{wxHtmlWindow
}{*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::CanOpenURL
}\label{wxhtmlwinparsercanopenurl
}
48 \func{virtual bool
}{CanOpenURL
}{\param{const wxString\&
}{url
}}
50 Call this function to determine whether you are allowed to open given URL.
51 Default behaviour is to call
\helpref{wxHtmlWindow::OnOpeningURL
}{wxhtmlwindowonopeningurl
}
52 of the associated wxHtmlWindow object.
54 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
56 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
58 Closes the container, sets actual container to the parent one
59 and returns pointer to it (see
\helpref{Overview
}{cells
}).
61 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
63 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
65 Creates font based on current setting (see
66 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
67 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
68 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
69 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
70 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
71 and returns pointer to it.
72 If the font was already created only a pointer is returned.
75 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
77 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
79 Returns actual text colour.
81 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
83 \constfunc{int
}{GetAlign
}{\void}
85 Returns default horizontal alignment.
87 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
89 \constfunc{int
}{GetCharHeight
}{\void}
91 Returns (average) char height in standard font. It is used as DC-independent metrics.
93 {\bf Note:
} This function doesn't return the
{\it actual
} height. If you want to
94 know the height of the current font, call
{\tt GetDC -> GetCharHeight()
}.
96 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
98 \constfunc{int
}{GetCharWidth
}{\void}
100 Returns average char width in standard font. It is used as DC-independent metrics.
102 {\bf Note:
} This function doesn't return the
{\it actual
} width. If you want to
103 know the height of the current font, call
{\tt GetDC -> GetCharWidth()
}
105 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
107 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
109 Returns pointer to the currectly opened container (see
\helpref{Overview
}{cells
}).
113 m_WParser -> GetContainer() -> InsertCell(new ...);
116 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
118 \func{wxDC*
}{GetDC
}{\void}
120 Returns pointer to the DC used during parsing.
122 \membersection{wxHtmlWinParser::GetEncodingConverter
}\label{wxhtmlwinparsergetencodingconverter
}
124 \constfunc{wxEncodingConverter *
}{GetEncodingConverter
}{\void}
126 Returns
\helpref{wxEncodingConverter
}{wxencodingconverter
} class used
127 to do conversion between
\helpref{input encoding
}{wxhtmlwinparsergetinputencoding
}
128 and
\helpref{output encoding
}{wxhtmlwinparsergetoutputencoding
}.
130 \membersection{wxHtmlWinParser::GetFontBold
}\label{wxhtmlwinparsergetfontbold
}
132 \constfunc{int
}{GetFontBold
}{\void}
134 Returns TRUE if actual font is bold, FALSE otherwise.
136 \membersection{wxHtmlWinParser::GetFontFace
}\label{wxhtmlwinparsergetfontface
}
138 \constfunc{wxString
}{GetFontFace
}{\void}
140 Returns actual font face name.
142 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
144 \constfunc{int
}{GetFontFixed
}{\void}
146 Returns TRUE if actual font is fixed face, FALSE otherwise.
148 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
150 \constfunc{int
}{GetFontItalic
}{\void}
152 Returns TRUE if actual font is italic, FALSE otherwise.
154 \membersection{wxHtmlWinParser::GetFontSize
}\label{wxhtmlwinparsergetfontsize
}
156 \constfunc{int
}{GetFontSize
}{\void}
158 Returns actual font size (HTML size varies from -
2 to +
4)
160 \membersection{wxHtmlWinParser::GetFontUnderlined
}\label{wxhtmlwinparsergetfontunderlined
}
162 \constfunc{int
}{GetFontUnderlined
}{\void}
164 Returns TRUE if actual font is underlined, FALSE otherwise.
166 \membersection{wxHtmlWinParser::GetInputEncoding
}\label{wxhtmlwinparsergetinputencoding
}
168 \constfunc{wxFontEncoding
}{GetInputEncoding
}{\void}
170 Returns input encoding.
172 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
174 \constfunc{const wxHtmlLinkInfo\&
}{GetLink
}{\void}
176 Returns actual hypertext link. (This value has a non-empty
177 \helpref{Href
}{wxhtmllinkinfogethref
} string
178 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
179 wxEmptyString otherwise.)
181 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
183 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
185 Returns the colour of hypertext link text.
187 \membersection{wxHtmlWinParser::GetOutputEncoding
}\label{wxhtmlwinparsergetoutputencoding
}
189 \constfunc{wxFontEncoding
}{GetOutputEncoding
}{\void}
191 Returns output encoding, i.e. closest match to
document's input encoding
192 that is supported by operating system.
194 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
196 \func{wxHtmlWindow*
}{GetWindow
}{\void}
198 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
199 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
200 title only if some window is associated, otherwise it does nothing)
202 \membersection{wxHtmlWinParser::OpenContainer
}\label{wxhtmlwinparseropencontainer
}
204 \func{wxHtmlContainerCell*
}{OpenContainer
}{\void}
206 Opens new container and returns pointer to it (see
\helpref{Overview
}{cells
}).
208 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
210 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
212 Sets actual text colour. Note: this DOESN'T change the colour!
213 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
215 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
217 \func{void
}{SetAlign
}{\param{int
}{a
}}
219 Sets default horizontal alignment (see
220 \helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.)
221 Alignment of newly opened container is set to this value.
223 \membersection{wxHtmlWinParser::SetContainer
}\label{wxhtmlwinparsersetcontainer
}
225 \func{wxHtmlContainerCell*
}{SetContainer
}{\param{wxHtmlContainerCell *
}{c
}}
227 Allows you to directly set opened container. This is not recommended - you should use OpenContainer
230 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
232 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
},
\param{double
}{pixel
\_scale =
1.0}}
234 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
235 {\it pixel
\_scale} can be used when rendering to high-resolution
236 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
237 HTML are given in pixels -- e.g. image sizes.
300x300 image would be only one
238 inch wide on typical printer. With pixel
\_scale =
3.0 it would be
3 inches.)
240 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
242 \func{void
}{SetFontBold
}{\param{int
}{x
}}
244 Sets bold flag of actualfont.
{\it x
} is either TRUE of FALSE.
246 \membersection{wxHtmlWinParser::SetFontFace
}\label{wxhtmlwinparsersetfontface
}
248 \func{void
}{SetFontFace
}{\param{const wxString\&
}{face
}}
250 Sets current font face to
{\it face
}. This affects either fixed size
251 font or proportional, depending on context (whether the parser is
252 inside
{\tt <TT>
} tag or not).
254 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
256 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
258 Sets fixed face flag of actualfont.
{\it x
} is either TRUE of FALSE.
260 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
262 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
264 Sets italic flag of actualfont.
{\it x
} is either TRUE of FALSE.
266 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
268 \func{void
}{SetFontSize
}{\param{int
}{s
}}
270 Sets actual font size (HTML size varies from
1 to
7)
272 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
274 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
276 Sets underlined flag of actualfont.
{\it x
} is either TRUE of FALSE.
278 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
280 \func{void
}{SetFonts
}{\param{wxString
}{normal
\_face},
\param{wxString
}{fixed
\_face},
\param{const int
}{*sizes
}}
282 Sets fonts. This method is identical to
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
}
284 \membersection{wxHtmlWinParser::SetInputEncoding
}\label{wxhtmlwinparsersetinputencoding
}
286 \func{void
}{SetInputEncoding
}{\param{wxFontEncoding
}{enc
}}
288 Sets input encoding. The parser uses this information to build conversion
289 tables from
document's encoding to some encoding supported by operating
292 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
294 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
296 Sets actual hypertext link. Empty link is represented
297 by
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
} with
{\it Href
} equal
300 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
302 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
304 Sets colour of hypertext link.