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.
19 \wxheading{Derived from
}
21 \helpref{wxHtmlParser
}{wxhtmlparser
}
25 \helpref{Handlers overview
}{handlers
}
27 \latexignore{\rtfignore{\wxheading{Members
}}}
29 \membersection{wxHtmlWinParser::wxHtmlWinParser
}\label{wxhtmlwinparserwxhtmlwinparser
}
31 \func{}{wxHtmlWinParser
}{\void}
33 \func{}{wxHtmlWinParser
}{\param{wxWindow
}{*wnd
}}
35 Constructor. Don't use the default one, use constructor with
36 {\it wnd
} paremeter (
{\it wnd
} is pointer to associated
\helpref{wxHtmlWindow
}{wxhtmlwindow
})
38 \membersection{wxHtmlWinParser::AddModule
}\label{wxhtmlwinparseraddmodule
}
40 \func{static void
}{AddModule
}{\param{wxHtmlTagsModule
}{*module
}}
42 Adds
\helpref{module
}{handlers
} to the list of wxHtmlWinParser tag handler.
44 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
46 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
48 Closes the container, sets actual container to the parent one
49 and returns pointer to it (see
\helpref{Overview
}{cells
}).
51 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
53 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
55 Creates font based on current setting (see
56 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
57 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
58 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
59 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
60 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
61 and returns pointer to it.
62 (If the font was already created only a pointer is returned.)
65 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
67 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
69 Returns actual text
color.
71 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
73 \constfunc{int
}{GetAlign
}{\void}
75 Returns default horizontal alignment.
77 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
79 \constfunc{int
}{GetCharHeight
}{\void}
81 Returns (average) char height in standard font. It's used as DC-independent metrics.
83 {\bf Note:
} This function doesn't return
{\it actual
} height. If you want to
84 know the height of the current font, call
{\tt GetDC -> GetCharHeight()
}.
86 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
88 \constfunc{int
}{GetCharWidth
}{\void}
90 Returns average char width in standard font. It's used as DC-independent metrics.
92 {\bf Note:
} This function doesn't return
{\it actual
} width. If you want to
93 know the height of the current font, call
{\tt GetDC -> GetCharWidth()
}
95 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
97 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
99 Returns pointer to the currectly opened container (see
\helpref{Overview
}{cells
}).
103 m_WParser -> GetContainer() -> InsertCell(new ...);
106 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
108 \func{wxDC*
}{GetDC
}{\void}
110 Returns pointer to the DC used during parsing.
112 \membersection{wxHtmlWinParser::GetFontBold
}\label{wxhtmlwinparsergetfontbold
}
114 \constfunc{int
}{GetFontBold
}{\void}
116 Returns TRUE if actual font is bold, FALSE otherwise.
118 \membersection{wxHtmlWinParser::GetFontFace
}\label{wxhtmlwinparsergetfontface
}
120 \constfunc{wxString
}{GetFontFace
}{\void}
122 Returns actual font face name.
125 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
127 \constfunc{int
}{GetFontFixed
}{\void}
129 Returns TRUE if actual font is fixed face, FALSE otherwise.
131 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
133 \constfunc{int
}{GetFontItalic
}{\void}
135 Returns TRUE if actual font is italic, FALSE otherwise.
138 \membersection{wxHtmlWinParser::GetFontSize
}\label{wxhtmlwinparsergetfontsize
}
140 \constfunc{int
}{GetFontSize
}{\void}
142 Returns actual font size (HTML size varies from -
2 to +
4)
144 \membersection{wxHtmlWinParser::GetFontUnderlined
}\label{wxhtmlwinparsergetfontunderlined
}
146 \constfunc{int
}{GetFontUnderlined
}{\void}
148 Returns TRUE if actual font is underlined, FALSE otherwise.
150 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
152 \constfunc{const wxHtmlLinkInfo\&
}{GetLink
}{\void}
154 Returns actual hypertext link. (This value has non-empty
155 \helpref{Href
}{wxhtmllinkinfogethref
} string
156 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
157 wxEmptyString otherwise.)
160 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
162 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
164 Returns
color of hypertext link text.
166 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
168 \func{wxWindow*
}{GetWindow
}{\void}
170 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
171 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
172 title only if some window is associated, otherwise it does nothing)
175 \membersection{wxHtmlWinParser::OpenContainer
}\label{wxhtmlwinparseropencontainer
}
177 \func{wxHtmlContainerCell*
}{OpenContainer
}{\void}
179 Opens new container and returns pointer to it (see
\helpref{Overview
}{cells
}).
182 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
184 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
186 Sets actual text
color. Note: this DOESN'T change the
color!
187 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
189 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
191 \func{void
}{SetAlign
}{\param{int
}{a
}}
193 Sets default horizontal alignment (see
194 \helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.)
195 Alignment of newly opened container is set to this value.
198 \membersection{wxHtmlWinParser::SetContainer
}\label{wxhtmlwinparsersetcontainer
}
200 \func{wxHtmlContainerCell*
}{SetContainer
}{\param{wxHtmlContainerCell *
}{c
}}
202 Allows you to directly set opened container. This is not recommended - you should use OpenContainer
206 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
208 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
},
\param{double
}{pixel
\_scale =
1.0}}
210 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
211 {\it pixel
\_scale} can be used when rendering to high-resolution
212 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
213 HTML are given in pixels -- e.g. image sizes.
300x300 image would be only one
214 inch wide on typical printer. With pixel
\_scale =
3.0 it would be
3 inches.)
217 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
219 \func{void
}{SetFontBold
}{\param{int
}{x
}}
221 Sets bold flag of actualfont.
{\it x
} is either TRUE of FALSE.
223 \membersection{wxHtmlWinParser::SetFontFace
}\label{wxhtmlwinparsersetfontface
}
225 \func{void
}{SetFontFace
}{\param{const wxString\&
}{face
}}
227 Sets current font face to
{\it face
}. This affects either fixed size
228 font or proportional, depending on context (whether the parser is
229 inside
{\tt <TT>
} tag or not).
231 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
233 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
235 Sets fixed face flag of actualfont.
{\it x
} is either TRUE of FALSE.
237 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
239 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
241 Sets italic flag of actualfont.
{\it x
} is either TRUE of FALSE.
244 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
246 \func{void
}{SetFontSize
}{\param{int
}{s
}}
248 Sets actual font size (HTML size varies from
1 to
7)
250 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
252 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
254 Sets underlined flag of actualfont.
{\it x
} is either TRUE of FALSE.
256 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
258 \func{void
}{SetFonts
}{\param{wxString
}{normal
\_face},
\param{wxString
}{fixed
\_face},
\param{const int
}{*sizes
}}
260 Sets fonts. This method is identical to
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
}
262 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
264 \func{void
}{SetLink
}{\param{const wxHtmlLinkInfo\&
}{link
}}
266 Sets actual hypertext link. Empty link is represented
267 by
\helpref{wxHtmlLinkInfo
}{wxhtmllinkinfo
} with
{\it Href
} equal
270 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
272 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
274 Sets
color of hypertext link.