- if (GetWindowStyle() & wxSP_NOSASH)
- return;
-
- int w, h;
- GetClientSize(&w, &h);
-
- if ( GetWindowStyleFlag() & wxSP_3DSASH )
- {
- if ( m_splitMode == wxSPLIT_VERTICAL )
- {
- dc.SetPen(*m_facePen);
-
- if (HasFlag( wxSP_SASH_AQUA ))
- dc.SetBrush(*wxWHITE_BRUSH);
- else
- dc.SetBrush(*m_faceBrush);
- dc.DrawRectangle(m_sashPosition + 2, 0 , m_sashSize - 4, h );
-
- dc.SetBrush(*wxTRANSPARENT_BRUSH);
-
- dc.SetPen(*m_lightShadowPen);
- int xShadow = m_borderSize ? m_borderSize - 1 : 0 ;
- dc.DrawLine(m_sashPosition, xShadow , m_sashPosition, h-m_borderSize);
-
- dc.SetPen(*m_hilightPen);
- dc.DrawLine(m_sashPosition+1, m_borderSize - 2, m_sashPosition+1, h - m_borderSize+2);
-
- if (!HasFlag( wxSP_SASH_AQUA ))
- dc.SetPen(*m_mediumShadowPen);
-
- int yMedium = m_borderSize ? h-m_borderSize+1 : h ;
- dc.DrawLine(m_sashPosition+m_sashSize-2, xShadow, m_sashPosition+m_sashSize-2, yMedium);
-
- if (HasFlag( wxSP_SASH_AQUA ))
- dc.SetPen(*m_lightShadowPen);
- else
- dc.SetPen(*m_darkShadowPen);
- dc.DrawLine(m_sashPosition+m_sashSize-1, m_borderSize, m_sashPosition+m_sashSize-1, h-m_borderSize );
-
- // Draw the top and bottom edges of the sash, if requested
- if (GetWindowStyle() & wxSP_FULLSASH)
- {
- // Top
- dc.SetPen(*m_hilightPen);
- dc.DrawLine(m_sashPosition+1, m_borderSize, m_sashPosition+m_sashSize-1, m_borderSize);
-
- // Bottom
- dc.SetPen(*m_darkShadowPen);
- dc.DrawLine(m_sashPosition+1, h-m_borderSize-1, m_sashPosition+m_sashSize-1, h-m_borderSize-1);
- }
- }
- else // wxSPLIT_HORIZONTAL
- {
- dc.SetPen(*m_facePen);
- if (HasFlag( wxSP_SASH_AQUA ))
- dc.SetBrush(*wxWHITE_BRUSH);
- else
- dc.SetBrush(*m_faceBrush);
- dc.DrawRectangle( m_borderSize-2, m_sashPosition + 2, w-m_borderSize+2, m_sashSize - 4);
-
- dc.SetBrush(*wxTRANSPARENT_BRUSH);
-
- dc.SetPen(*m_lightShadowPen);
- dc.DrawLine(m_borderSize-1, m_sashPosition, w-m_borderSize, m_sashPosition);
-
- dc.SetPen(*m_hilightPen);
- dc.DrawLine(m_borderSize-2, m_sashPosition+1, w-m_borderSize+1, m_sashPosition+1);
-
- if (!HasFlag( wxSP_SASH_AQUA ))
- dc.SetPen(*m_mediumShadowPen);
- dc.DrawLine(m_borderSize-1, m_sashPosition+m_sashSize-2, w-m_borderSize+1, m_sashPosition+m_sashSize-2);