Ejemplo n.º 1
0
void wxBitmapButton::DrawButtonFocus (
  wxClientDC&                       rDC
)
{
    wxPen                           vBlackPen(wxColour(0, 0, 0), 2, wxSOLID);

    //
    // Draw a thick black line around the outside of the button
    //
    rDC.SetPen(vBlackPen);
    rDC.DrawLine( rDC.m_vRclPaint.xLeft
                 ,rDC.m_vRclPaint.yTop
                 ,rDC.m_vRclPaint.xRight
                 ,rDC.m_vRclPaint.yTop
                );
    rDC.DrawLine( rDC.m_vRclPaint.xRight
                 ,rDC.m_vRclPaint.yTop
                 ,rDC.m_vRclPaint.xRight
                 ,rDC.m_vRclPaint.yBottom
                );
    rDC.DrawLine( rDC.m_vRclPaint.xRight
                 ,rDC.m_vRclPaint.yBottom
                 ,rDC.m_vRclPaint.xLeft
                 ,rDC.m_vRclPaint.yBottom
                );
    rDC.DrawLine( rDC.m_vRclPaint.xLeft
                 ,rDC.m_vRclPaint.yBottom
                 ,rDC.m_vRclPaint.xLeft
                 ,rDC.m_vRclPaint.yTop
                );
} // end of wxBitmapButton::DrawButtonFocus
Ejemplo n.º 2
0
void wxBitmapButton::DrawButtonFocus (
  wxClientDC&                       rDC
)
{
    wxPen vBlackPen(*wxBLACK, 2, wxSOLID);

    //
    // Draw a thick black line around the outside of the button
    // Note: DrawLine expects wxWidgets coordinate system so swap
    //
    rDC.SetPen(vBlackPen);
    wxPMDCImpl                      *impl = (wxPMDCImpl*) rDC.GetImpl();
    // top
    rDC.DrawLine( impl->m_vRclPaint.xLeft
                 ,impl->m_vRclPaint.yBottom
                 ,impl->m_vRclPaint.xRight
                 ,impl->m_vRclPaint.yBottom
                );
    // right
    rDC.DrawLine( impl->m_vRclPaint.xRight
                 ,impl->m_vRclPaint.yBottom
                 ,impl->m_vRclPaint.xRight
                 ,impl->m_vRclPaint.yTop
                );
    // bottom
    rDC.DrawLine( impl->m_vRclPaint.xRight
                 ,impl->m_vRclPaint.yTop
                 ,impl->m_vRclPaint.xLeft
                 ,impl->m_vRclPaint.yTop
                );
    // left
    rDC.DrawLine( impl->m_vRclPaint.xLeft
                 ,impl->m_vRclPaint.yTop
                 ,impl->m_vRclPaint.xLeft
                 ,impl->m_vRclPaint.yBottom
                );
} // end of wxBitmapButton::DrawButtonFocus