summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2ea24d9)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5091
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxASSERT_MSG(m_DC != NULL, _("no DC assigned to wxHtmlWinParser!!"));
m_FontBold = m_FontItalic = m_FontUnderlined = m_FontFixed = FALSE;
wxASSERT_MSG(m_DC != NULL, _("no DC assigned to wxHtmlWinParser!!"));
m_FontBold = m_FontItalic = m_FontUnderlined = m_FontFixed = FALSE;
+ m_FontSize = 3; //default one
CreateCurrentFont(); // we're selecting default font into
m_DC -> GetTextExtent("H", &m_CharWidth, &m_CharHeight);
/* NOTE : we're not using GetCharWidth/Height() because
of differences under X and win
*/
CreateCurrentFont(); // we're selecting default font into
m_DC -> GetTextExtent("H", &m_CharWidth, &m_CharHeight);
/* NOTE : we're not using GetCharWidth/Height() because
of differences under X and win
*/
+ m_UseLink = FALSE;
+ m_Link = wxHtmlLinkInfo("", "");
m_LinkColor.Set(0, 0, 0xFF);
m_ActualColor.Set(0, 0, 0);
m_Align = wxHTML_ALIGN_LEFT;
m_LinkColor.Set(0, 0, 0xFF);
m_ActualColor.Set(0, 0, 0);
m_Align = wxHTML_ALIGN_LEFT;
+void wxHtmlWinParser::SetFontSize(int s)
+{
+ if (s < 1) s = 1;
+ else if (s > 7) s = 7;
+ m_FontSize = s;
+}
+
+
+
wxFont* wxHtmlWinParser::CreateCurrentFont()
{
int fb = GetFontBold(),
fi = GetFontItalic(),
fu = GetFontUnderlined(),
ff = GetFontFixed(),
wxFont* wxHtmlWinParser::CreateCurrentFont()
{
int fb = GetFontBold(),
fi = GetFontItalic(),
fu = GetFontUnderlined(),
ff = GetFontFixed(),
- fs = GetFontSize() + 2 /*remap from <-2;4> to <0;7>*/ ;
+ fs = GetFontSize() - 1 /*remap from <1;7> to <0;6>*/ ;
if (m_FontsTable[fb][fi][fu][ff][fs] == NULL) {
m_FontsTable[fb][fi][fu][ff][fs] =
if (m_FontsTable[fb][fi][fu][ff][fs] == NULL) {
m_FontsTable[fb][fi][fu][ff][fs] =
+void wxHtmlWinParser::SetLink(const wxHtmlLinkInfo& link)
+{
+ m_Link = link;
+ m_UseLink = (link.GetHref() != wxEmptyString);
+}
+
+
+
//-----------------------------------------------------------------------------
// wxHtmlWinTagHandler
//-----------------------------------------------------------------------------
// wxHtmlWinTagHandler