2 % automatically generated by HelpGen from
3 % htmlwinparser.tex at 14/Mar/99 20:13:37
7 \section{\class{wxHtmlWinParser
}}\label{wxhtmlwinparser
}
10 This class is derived from
\helpref{wxHtmlParser
}{wxhtmlparser
} and
11 its mail goal is to parse HTML input so that it can be displayed in
12 \helpref{wxHtmlWindow
}{wxhtmlwindow
}. It uses special
13 \helpref{wxHtmlWinTagHandler
}{wxhtmlwintaghandler
}.
18 \item Product of parsing is wxHtmlCell (resp. wxHtmlContainer) object.
19 \item This parser produces temporary data! You should call
20 \helpref{delete GetTempData()
}{wxhtmlparsergettempdata
}!
24 \wxheading{Derived from
}
26 \helpref{wxHtmlParser
}{wxhtmlparser
}
30 \helpref{Handlers overview
}{handlers
}
32 \latexignore{\rtfignore{\wxheading{Members
}}}
34 \membersection{wxHtmlWinParser::wxHtmlWinParser
}\label{wxhtmlwinparserwxhtmlwinparser
}
36 \func{}{wxHtmlWinParser
}{\void}
38 \func{}{wxHtmlWinParser
}{\param{wxWindow
}{*wnd
}}
40 Constructor. Don't use the default one, use constructor with
41 {\it wnd
} paremeter (
{\it wnd
} is pointer to associated
\helpref{wxHtmlWindow
}{wxhtmlwindow
})
44 \membersection{wxHtmlWinParser::SetDC
}\label{wxhtmlwinparsersetdc
}
46 \func{virtual void
}{SetDC
}{\param{wxDC
}{*dc
}}
48 Sets the DC. This must be called before
\helpref{Parse
}{wxhtmlparserparse
}!
50 \membersection{wxHtmlWinParser::GetDC
}\label{wxhtmlwinparsergetdc
}
52 \func{wxDC*
}{GetDC
}{\void}
54 Returns pointer to the DC used during parsing.
56 \membersection{wxHtmlWinParser::GetCharHeight
}\label{wxhtmlwinparsergetcharheight
}
58 \constfunc{int
}{GetCharHeight
}{\void}
60 Returns (average) char height in standard font. It's used as DC-independent metrics.
62 {\bf Note:
} This function doesn't return
{\it actual
} height. If you wanna
63 know height of current font, call
{\tt GetDC -> GetCharHeight()
}
65 \membersection{wxHtmlWinParser::GetCharWidth
}\label{wxhtmlwinparsergetcharwidth
}
67 \constfunc{int
}{GetCharWidth
}{\void}
69 Returns average char width in standard font. It's used as DC-independent metrics.
71 {\bf Note:
} This function doesn't return
{\it actual
} width. If you wanna
72 know height of current font, call
{\tt GetDC -> GetCharWidth()
}
74 \membersection{wxHtmlWinParser::GetWindow
}\label{wxhtmlwinparsergetwindow
}
76 \func{wxWindow*
}{GetWindow
}{\void}
78 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
79 test if it is non-NULL. For example
{\tt TITLE
} handler sets window
80 title only if some window is associated, otherwise it does nothing)
83 \membersection{wxHtmlWinParser::SetFonts
}\label{wxhtmlwinparsersetfonts
}
85 \func{void
}{SetFonts
}{\param{wxString
}{normal
\_face},
\param{int
}{normal
\_italic\_mode},
\param{wxString
}{fixed
\_face},
\param{int
}{fixed
\_italic\_mode},
\param{int
}{*sizes
}}
87 Sets fonts. This method is identical to
\helpref{wxHtmlWindow::SetFonts
}{wxhtmlwindowsetfonts
}
90 \membersection{wxHtmlWinParser::AddModule
}\label{wxhtmlwinparseraddmodule
}
92 \func{static void
}{AddModule
}{\param{wxHtmlTagsModule
}{*module
}}
94 Adds
\helpref{module
}{handlers
} to the list of wxHtmlWinParser tag handler.
97 \membersection{wxHtmlWinParser::GetContainer
}\label{wxhtmlwinparsergetcontainer
}
99 \constfunc{wxHtmlContainerCell*
}{GetContainer
}{\void}
101 Returns pointer to the currectly opened container (see
\helpref{Overview
}{cells
}).
105 m_WParser -> GetContainer() -> InsertCell(new ...);
108 \membersection{wxHtmlWinParser::OpenContainer
}\label{wxhtmlwinparseropencontainer
}
110 \func{wxHtmlContainerCell*
}{OpenContainer
}{\void}
112 Opens new container and returns pointer to it (see
\helpref{Overview
}{cells
}).
115 %\membersection{wxHtmlWinParser::SetContainer}\label{wxhtmlwinparsersetcontainer}
117 %\func{wxHtmlContainerCell*}{SetContainer}{\param{wxHtmlContainerCell *}{c}}
119 %Allows you to directly set opened container. This is not recommended - you should use OpenContainer
123 \membersection{wxHtmlWinParser::CloseContainer
}\label{wxhtmlwinparserclosecontainer
}
125 \func{wxHtmlContainerCell*
}{CloseContainer
}{\void}
127 Closes the container, sets actual container to the parent one
128 and returns pointer to it (see
\helpref{Overview
}{cells
}).
132 \membersection{wxHtmlWinParser::GetFontSize
}\label{wxhtmlwinparsergetfontsize
}
134 \constfunc{int
}{GetFontSize
}{\void}
136 Returns actual font size (HTML size varies from -
2 to +
4)
138 \membersection{wxHtmlWinParser::SetFontSize
}\label{wxhtmlwinparsersetfontsize
}
140 \func{void
}{SetFontSize
}{\param{int
}{s
}}
142 Sets actual font size (HTML size varies from -
2 to +
4)
144 \membersection{wxHtmlWinParser::GetFontBold
}\label{wxhtmlwinparsergetfontbold
}
146 \constfunc{int
}{GetFontBold
}{\void}
148 Returns TRUE if actual font is bold, FALSE otherwise.
150 \membersection{wxHtmlWinParser::SetFontBold
}\label{wxhtmlwinparsersetfontbold
}
152 \func{void
}{SetFontBold
}{\param{int
}{x
}}
154 Sets bold flag of actualfont.
{\it x
} is either TRUE of FALSE.
156 \membersection{wxHtmlWinParser::GetFontItalic
}\label{wxhtmlwinparsergetfontitalic
}
158 \constfunc{int
}{GetFontItalic
}{\void}
160 Returns TRUE if actual font is italic, FALSE otherwise.
163 \membersection{wxHtmlWinParser::SetFontItalic
}\label{wxhtmlwinparsersetfontitalic
}
165 \func{void
}{SetFontItalic
}{\param{int
}{x
}}
167 Sets italic flag of actualfont.
{\it x
} is either TRUE of FALSE.
169 \membersection{wxHtmlWinParser::GetFontUnderlined
}\label{wxhtmlwinparsergetfontunderlined
}
171 \constfunc{int
}{GetFontUnderlined
}{\void}
173 Returns TRUE if actual font is underlined, FALSE otherwise.
175 \membersection{wxHtmlWinParser::SetFontUnderlined
}\label{wxhtmlwinparsersetfontunderlined
}
177 \func{void
}{SetFontUnderlined
}{\param{int
}{x
}}
179 Sets underlined flag of actualfont.
{\it x
} is either TRUE of FALSE.
181 \membersection{wxHtmlWinParser::GetFontFixed
}\label{wxhtmlwinparsergetfontfixed
}
183 \constfunc{int
}{GetFontFixed
}{\void}
185 Returns TRUE if actual font is fixed face, FALSE otherwise.
187 \membersection{wxHtmlWinParser::SetFontFixed
}\label{wxhtmlwinparsersetfontfixed
}
189 \func{void
}{SetFontFixed
}{\param{int
}{x
}}
191 Sets fixed face flag of actualfont.
{\it x
} is either TRUE of FALSE.
193 \membersection{wxHtmlWinParser::GetAlign
}\label{wxhtmlwinparsergetalign
}
195 \constfunc{int
}{GetAlign
}{\void}
197 Returns default horizontal alignment.
199 \membersection{wxHtmlWinParser::SetAlign
}\label{wxhtmlwinparsersetalign
}
201 \func{void
}{SetAlign
}{\param{int
}{a
}}
203 Sets default horizontal alignment (see
\helpref{wxHtmlContainerCell::SetAlignHor
}{wxhtmlcontainercellsetalignhor
}.
204 Alignment of newly opened container is set to this value.
206 \membersection{wxHtmlWinParser::GetLinkColor
}\label{wxhtmlwinparsergetlinkcolor
}
208 \constfunc{const wxColour\&
}{GetLinkColor
}{\void}
210 Returns
color of hypertext link text.
212 \membersection{wxHtmlWinParser::SetLinkColor
}\label{wxhtmlwinparsersetlinkcolor
}
214 \func{void
}{SetLinkColor
}{\param{const wxColour\&
}{clr
}}
216 Sets
color of hypertext link.
218 \membersection{wxHtmlWinParser::GetActualColor
}\label{wxhtmlwinparsergetactualcolor
}
220 \constfunc{const wxColour\&
}{GetActualColor
}{\void}
222 Returns actual text
color.
224 \membersection{wxHtmlWinParser::SetActualColor
}\label{wxhtmlwinparsersetactualcolor
}
226 \func{void
}{SetActualColor
}{\param{const wxColour\&
}{clr
}}
228 Sets actual text
color. Note: this DOESN'T change the
color!
229 You must create
\helpref{wxHtmlColourCell
}{wxhtmlcolourcell
} yourself.
231 \membersection{wxHtmlWinParser::GetLink
}\label{wxhtmlwinparsergetlink
}
233 \constfunc{const wxString\&
}{GetLink
}{\void}
235 Returns actual hypertext link. (This value is non-empty string
236 if the parser is between
{\tt <A>
} and
{\tt </A>
} tags,
237 wxEmptyString otherwise.
240 \membersection{wxHtmlWinParser::SetLink
}\label{wxhtmlwinparsersetlink
}
242 \func{void
}{SetLink
}{\param{const wxString\&
}{link
}}
244 Sets actual hypertext link. wxEmptyString means no link.
246 \membersection{wxHtmlWinParser::CreateCurrentFont
}\label{wxhtmlwinparsercreatecurrentfont
}
248 \func{virtual wxFont*
}{CreateCurrentFont
}{\void}
250 Creates font based on current setting (see
251 \helpref{SetFontSize
}{wxhtmlwinparsersetfontsize
},
252 \helpref{SetFontBold
}{wxhtmlwinparsersetfontbold
},
253 \helpref{SetFontItalic
}{wxhtmlwinparsersetfontitalic
},
254 \helpref{SetFontFixed
}{wxhtmlwinparsersetfontfixed
},
255 \helpref{SetFontUnderlined
}{wxhtmlwinparsersetfontunderlined
})
256 and returns pointer to it.
257 (If the font was already created only a pointer is returned.)
259 Fonts created during parsing are temporary data and are not freed on DoneParser.
260 You must call
\helpref{delete myparser->GetTempData();
}{wxhtmlparsergettempdata
}