#include "wx/dcclient.h"
#endif //WX_PRECOMP
+#if wxUSE_HTML
+
#include "wx/htmllbox.h"
#include "wx/html/htmlcell.h"
// implementation
// ============================================================================
+IMPLEMENT_ABSTRACT_CLASS(wxHtmlListBox, wxVListBox)
+
+
// ----------------------------------------------------------------------------
// wxHtmlListBox creation
// ----------------------------------------------------------------------------
self->m_htmlParser = new wxHtmlWinParser;
m_htmlParser->SetDC(new wxClientDC(self));
+ m_htmlParser->SetFS(&self->m_filesystem);
+
+ // use system's default GUI font by default:
+ m_htmlParser->SetStandardFonts();
}
wxHtmlContainerCell *cell = (wxHtmlContainerCell *)m_htmlParser->
// note that we can't stop drawing exactly at the window boundary as then
// even the visible cells part could be not drawn, so always draw the
// entire cell
- cell->Draw(dc, rect.x, rect.y, 0, INT_MAX, htmlRendInfo);
+ cell->Draw(dc, rect.x+2, rect.y+2, 0, INT_MAX, htmlRendInfo);
}
wxCoord wxHtmlListBox::OnMeasureItem(size_t n) const
wxHtmlCell *cell = m_cache->Get(n);
wxCHECK_MSG( cell, 0, _T("this cell should be cached!") );
- return cell->GetHeight() + cell->GetDescent();
+ return cell->GetHeight() + cell->GetDescent() + 4;
}
+#endif