+
+ wxWindowDCImpl::SetBrush( brush );
+}
+
+void wxMemoryDCImpl::SetBackground( const wxBrush& brushOrig )
+{
+ wxBrush brush(brushOrig);
+
+ if ( m_selected.IsOk() &&
+ m_selected.GetDepth() == 1 &&
+ (brush != *wxTRANSPARENT_BRUSH) )
+ {
+ brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE );
+ }
+
+ wxWindowDCImpl::SetBackground( brush );
+}
+
+void wxMemoryDCImpl::SetTextForeground( const wxColour& col )
+{
+ if ( m_selected.IsOk() && m_selected.GetDepth() == 1 )
+ wxWindowDCImpl::SetTextForeground( col == *wxWHITE ? *wxBLACK : *wxWHITE);
+ else
+ wxWindowDCImpl::SetTextForeground( col );
+}
+
+void wxMemoryDCImpl::SetTextBackground( const wxColour &col )
+{
+ if (m_selected.IsOk() && m_selected.GetDepth() == 1)
+ wxWindowDCImpl::SetTextBackground( col == *wxWHITE ? *wxBLACK : *wxWHITE );
+ else
+ wxWindowDCImpl::SetTextBackground( col );