- x = 1;
- y = 1;
- int numColumns = m_owner->GetColumnCount();
- wxListItem item;
- for (int i = 0; i < numColumns; i++)
- {
- m_owner->GetColumn( i, item );
- int cw = item.m_width-2;
- if ((i+1 == numColumns) || (x+item.m_width > w-5)) cw = w-x-1;
- dc.SetPen( *wxWHITE_PEN );
-
- DoDrawRect( &dc, x, y, cw, h-2 );
- dc.SetClippingRegion( x, y, cw-5, h-4 );
- dc.DrawText( item.m_text, x+4, y+3 );
- dc.DestroyClippingRegion();
- x += item.m_width;
- if (x > w+5) break;
- };
- dc.EndDrawing();
-};
+ int w = 0;
+ int h = 0;
+ int x = 0;
+ int y = 0;
+ GetClientSize( &w, &h );
+
+ dc.SetBackgroundMode(wxTRANSPARENT);
+ dc.SetTextForeground( *wxBLACK );
+ if (m_foregroundColour.Ok()) dc.SetTextForeground( m_foregroundColour );
+
+ x = 1;
+ y = 1;
+ int numColumns = m_owner->GetColumnCount();
+ wxListItem item;
+ for (int i = 0; i < numColumns; i++)
+ {
+ m_owner->GetColumn( i, item );
+ int cw = item.m_width-2;
+ if ((i+1 == numColumns) || (x+item.m_width > w-5)) cw = w-x-1;
+ dc.SetPen( *wxWHITE_PEN );
+
+ DoDrawRect( &dc, x, y, cw, h-2 );
+ dc.SetClippingRegion( x, y, cw-5, h-4 );
+ dc.DrawText( item.m_text, x+4, y+3 );
+ dc.DestroyClippingRegion();
+ x += item.m_width;
+ if (x > w+5) break;
+ }
+ dc.EndDrawing();
+}
+
+void wxListHeaderWindow::DrawCurrent()
+{
+ int x1 = m_currentX;
+ int y1 = 0;
+ int x2 = m_currentX-1;
+ int y2 = 0;
+ int dummy;
+ m_owner->GetClientSize( &dummy, &y2 );
+ ClientToScreen( &x1, &y1 );
+ m_owner->ClientToScreen( &x2, &y2 );
+
+ wxScreenDC dc;
+ dc.SetLogicalFunction( wxXOR );
+ dc.SetPen( wxPen( *wxBLACK, 2, wxSOLID ) );
+ dc.SetBrush( *wxTRANSPARENT_BRUSH );
+
+ dc.DrawLine( x1, y1, x2, y2 );
+
+ dc.SetLogicalFunction( wxCOPY );
+
+ dc.SetPen( wxNullPen );
+ dc.SetBrush( wxNullBrush );
+}