+ 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
+
+ wxPoint button[3];
+ dc.SetBrush(*m_hilightBrush);
+
+ if (HasFlag(wxTR_AQUA_BUTTONS))
+ {
+ dc.SetPen(*wxTRANSPARENT_PEN);
+
+ if (item->IsExpanded())
+ {
+ button[0].x = x-6;
+ button[0].y = y_mid-2;
+ button[1].x = x+6;
+ button[1].y = y_mid-2;
+ button[2].x = x;
+ button[2].y = y_mid+7;
+ }
+ else
+ {
+ button[0].y = y_mid-6;
+ button[0].x = x-2;
+ button[1].y = y_mid+6;
+ button[1].x = x-2;
+ button[2].y = y_mid;
+ button[2].x = x+7;
+ }
+ }
+ else
+ {
+ dc.SetPen(*wxBLACK_PEN);