]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/htmllbox.cpp
documented while event.Skip() is necessary so that nobody removes it
[wxWidgets.git] / src / generic / htmllbox.cpp
index 0970e8ef91fa7a6e1350f21ab79f95b2e0f3a9a5..5cc120f75c2c3ba2da1e53a838dea2ef89f4f470 100644 (file)
@@ -28,6 +28,8 @@
     #include "wx/dcclient.h"
 #endif //WX_PRECOMP
 
+#if wxUSE_HTML
+
 #include "wx/htmllbox.h"
 
 #include "wx/html/htmlcell.h"
@@ -240,6 +242,7 @@ void wxHtmlListBox::CacheItem(size_t n) const
 
             self->m_htmlParser = new wxHtmlWinParser;
             m_htmlParser->SetDC(new wxClientDC(self));
+            m_htmlParser->SetFS(&self->m_filesystem);
         }
 
         wxHtmlContainerCell *cell = (wxHtmlContainerCell *)m_htmlParser->
@@ -302,7 +305,7 @@ void wxHtmlListBox::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const
     // 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
@@ -312,6 +315,7 @@ 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