- {
- button[0].x = x - (m_btnWidth2+1);
- button[0].y = y_mid - (m_btnHeight/3);
- button[1].x = x + (m_btnWidth2+1);
- button[1].y = button[0].y;
- button[2].x = x;
- button[2].y = button[0].y + (m_btnHeight2+1);
- }
- else
- {
- button[0].x = x - (m_btnWidth/3);
- button[0].y = y_mid - (m_btnHeight2+1);
- button[1].x = button[0].x;
- button[1].y = y_mid + (m_btnHeight2+1);
- button[2].x = button[0].x + (m_btnWidth2+1);
- button[2].y = y_mid;
- }
- dc.DrawPolygon(3, button);
-
- dc.SetPen(m_dottedPen);
- }
- else // if (HasFlag(wxTR_HAS_BUTTONS))
- {
- // draw the plus sign here
- dc.SetPen(*wxGREY_PEN);
- dc.SetBrush(*wxWHITE_BRUSH);
- dc.DrawRectangle (x-m_btnWidth2, y_mid-m_btnHeight2,
- m_btnWidth, m_btnHeight);
- dc.SetPen(*wxBLACK_PEN);
- dc.DrawLine (x-(m_btnWidth2-3), y_mid,
- x+(m_btnWidth2-2), y_mid);
- if (!item->IsExpanded())
- dc.DrawLine (x, y_mid-(m_btnHeight2-2),
- x, y_mid+(m_btnHeight2-1));
- dc.SetPen(m_dottedPen);
+ flag |= wxCONTROL_EXPANDED;
+ if (item == m_underMouse)
+ flag |= wxCONTROL_CURRENT;
+
+ wxRendererNative::Get().DrawTreeItemButton(
+ this, dc,
+ wxRect(x - wImage/2, y_mid - hImage/2, wImage, hImage),
+ flag);