+void wxGTKMemoryImplDC::SetPen( const wxPen& penOrig )
+{
+ wxPen pen( penOrig );
+ if ( m_selected.Ok() &&
+ m_selected.GetDepth() == 1 &&
+ (pen != *wxTRANSPARENT_PEN) )
+ {
+ pen.SetColour( pen.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE );
+ }
+
+ wxGTKWindowImplDC::SetPen( pen );
+}
+
+void wxGTKMemoryImplDC::SetBrush( const wxBrush& brushOrig )
+{
+ wxBrush brush( brushOrig );
+ if ( m_selected.Ok() &&
+ m_selected.GetDepth() == 1 &&
+ (brush != *wxTRANSPARENT_BRUSH) )
+ {
+ brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE);
+ }
+
+ wxGTKWindowImplDC::SetBrush( brush );
+}
+
+void wxGTKMemoryImplDC::SetBackground( const wxBrush& brushOrig )
+{
+ wxBrush brush(brushOrig);
+
+ if ( m_selected.Ok() &&
+ m_selected.GetDepth() == 1 &&
+ (brush != *wxTRANSPARENT_BRUSH) )
+ {
+ brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE );
+ }
+
+ wxGTKWindowImplDC::SetBackground( brush );
+}
+
+void wxGTKMemoryImplDC::SetTextForeground( const wxColour& col )
+{
+ if ( m_selected.Ok() && m_selected.GetDepth() == 1 )
+ {
+ wxGTKWindowImplDC::SetTextForeground( col == *wxWHITE ? *wxBLACK : *wxWHITE);
+ }
+ else
+ {
+ wxGTKWindowImplDC::SetTextForeground( col );
+ }
+}
+
+void wxGTKMemoryImplDC::SetTextBackground( const wxColour &col )
+{
+ if (m_selected.Ok() && m_selected.GetDepth() == 1)
+ {
+ wxGTKWindowImplDC::SetTextBackground( col == *wxWHITE ? *wxBLACK : *wxWHITE );
+ }
+ else
+ {
+ wxGTKWindowImplDC::SetTextBackground( col );
+ }
+}
+
+void wxGTKMemoryImplDC::DoGetSize( int *width, int *height ) const