+ if (m_imageListButtons != NULL)
+ {
+ // draw the image button here
+ int image_h = 0, image_w = 0, image = wxTreeItemIcon_Normal;
+ if (item->IsExpanded()) image = wxTreeItemIcon_Expanded;
+ if (item->IsSelected())
+ image += wxTreeItemIcon_Selected - wxTreeItemIcon_Normal;
+ m_imageListButtons->GetSize(image, image_w, image_h);
+ int xx = x - (image_w>>1);
+ int yy = y_mid - (image_h>>1);
+ dc.SetClippingRegion(xx, yy, image_w, image_h);
+ m_imageListButtons->Draw(image, dc, xx, yy,
+ wxIMAGELIST_DRAW_TRANSPARENT);
+ dc.DestroyClippingRegion();
+ }
+ else if (HasFlag(wxTR_TWIST_BUTTONS))
+ {
+ // draw the twisty button here
+
+ if (HasFlag(wxTR_AQUA_BUTTONS))
+ {
+ if (item->IsExpanded())
+ dc.DrawBitmap( *m_arrowDown, x-5, y_mid-6, TRUE );
+ else
+ dc.DrawBitmap( *m_arrowRight, x-5, y_mid-6, TRUE );
+ }
+ else
+ {
+ dc.SetBrush(*m_hilightBrush);
+ dc.SetPen(*wxBLACK_PEN);
+ wxPoint button[3];