- int x0,y0,x1,y1, dx, dy;
-
- // Calculate where the top of the visible area is:
- GetViewStart(&x0,&y0);
- GetScrollPixelsPerUnit(&dx, &dy);
- x0 *= dx; y0 *= dy;
-
- // Get the size of the visible window:
- GetClientSize(&x1,&y1);
- wxASSERT(x1 >= 0);
- wxASSERT(y1 >= 0);
-
- if(updateRect)
- {
- WXLO_DEBUG(("Update rect: %ld,%ld / %ld,%ld",
- updateRect->x, updateRect->y,
- updateRect->x+updateRect->width,
- updateRect->y+updateRect->height));
- }
-
- ResizeScrollbars(true);
-
- WXLO_TIMER_START(TmpTimer);
- /* Check whether the window has grown, if so, we need to reallocate
- the bitmap to be larger. */
- if(x1 > m_bitmapSize.x || y1 > m_bitmapSize.y)
- {
- wxASSERT(m_bitmapSize.x > 0);
- wxASSERT(m_bitmapSize.y > 0);
-
- m_memDC->SelectObject(wxNullBitmap);
- delete m_bitmap;
- m_bitmapSize = wxPoint(x1,y1);
- m_bitmap = new wxBitmap(x1,y1);
- m_memDC->SelectObject(*m_bitmap);
- }
-
- m_memDC->SetDeviceOrigin(0,0);
- m_memDC->SetBackground(wxBrush(m_llist->GetDefaultStyleInfo().GetBGColour(),wxSOLID));
- m_memDC->SetPen(wxPen(m_llist->GetDefaultStyleInfo().GetBGColour(),
- 0,wxTRANSPARENT));
- m_memDC->SetLogicalFunction(wxCOPY);
- m_memDC->Clear();
- WXLO_TIMER_STOP(TmpTimer);
-
- // fill the background with the background bitmap
- if(m_BGbitmap)
- {
- CoordType
- y, x,
- w = m_BGbitmap->GetWidth(),
- h = m_BGbitmap->GetHeight();
- for(y = 0; y < y1; y+=h)
- for(x = 0; x < x1; x+=w)
- m_memDC->DrawBitmap(*m_BGbitmap, x, y);
- m_memDC->SetBackgroundMode(wxTRANSPARENT);
- }
-
- // This is the important bit: we tell the list to draw itself
+ int x0,y0,x1,y1, dx, dy;
+
+ // Calculate where the top of the visible area is:
+ GetViewStart(&x0,&y0);
+ GetScrollPixelsPerUnit(&dx, &dy);
+ x0 *= dx; y0 *= dy;
+
+ // Get the size of the visible window:
+ GetClientSize(&x1,&y1);
+ wxASSERT(x1 >= 0);
+ wxASSERT(y1 >= 0);
+
+ if(updateRect)
+ {
+ WXLO_DEBUG(("Update rect: %ld,%ld / %ld,%ld",
+ updateRect->x, updateRect->y,
+ updateRect->x+updateRect->width,
+ updateRect->y+updateRect->height));
+ }
+
+ ResizeScrollbars(true);
+
+ WXLO_TIMER_START(TmpTimer);
+ /* Check whether the window has grown, if so, we need to reallocate
+ the bitmap to be larger. */
+ if(x1 > m_bitmapSize.x || y1 > m_bitmapSize.y)
+ {
+ wxASSERT(m_bitmapSize.x > 0);
+ wxASSERT(m_bitmapSize.y > 0);
+
+ m_memDC->SelectObject(wxNullBitmap);
+ delete m_bitmap;
+ m_bitmapSize = wxPoint(x1,y1);
+ m_bitmap = new wxBitmap(x1,y1);
+ m_memDC->SelectObject(*m_bitmap);
+ }
+
+ m_memDC->SetDeviceOrigin(0,0);
+ m_memDC->SetBackground(wxBrush(m_llist->GetDefaultStyleInfo().GetBGColour(),wxSOLID));
+ m_memDC->SetPen(wxPen(m_llist->GetDefaultStyleInfo().GetBGColour(),
+ 0,wxTRANSPARENT));
+ m_memDC->SetLogicalFunction(wxCOPY);
+ m_memDC->Clear();
+ WXLO_TIMER_STOP(TmpTimer);
+
+ // fill the background with the background bitmap
+ if(m_BGbitmap)
+ {
+ CoordType
+ y, x,
+ w = m_BGbitmap->GetWidth(),
+ h = m_BGbitmap->GetHeight();
+ for(y = 0; y < y1; y+=h)
+ {
+ for(x = 0; x < x1; x+=w)
+ {
+ m_memDC->DrawBitmap(*m_BGbitmap, x, y);
+ }
+ }
+
+ m_memDC->SetBackgroundMode(wxTRANSPARENT);
+ }
+
+ // This is the important bit: we tell the list to draw itself