- dc.DestroyClippingRegion();
- }
- else if (HasFlag(wxTR_TWIST_BUTTONS))
- {
- // draw the twisty button here
-
- if (HasFlag(wxTR_AQUA_BUTTONS))
- {
- // This causes update problems, so disabling for now.
-#if 0 // def __WXMAC__
- wxMacPortSetter helper(&dc) ;
- wxMacWindowClipper clipper(this) ;
- wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
-
- int loc_x = x - 5 ;
- int loc_y = y_mid - 6 ;
- MacWindowToRootWindow( & loc_x , & loc_y ) ;
- Rect bounds = { loc_y , loc_x , loc_y + 18 , loc_x + 12 } ;
- ThemeButtonDrawInfo info = { kThemeStateActive , item->IsExpanded() ? kThemeDisclosureDown : kThemeDisclosureRight ,
- kThemeAdornmentNone };
- DrawThemeButton( &bounds, kThemeDisclosureButton ,
- &info , NULL , NULL , NULL , NULL ) ;
-#else
- if (item->IsExpanded())
- dc.DrawBitmap( *m_arrowDown, x-5, y_mid-6, TRUE );
- else
- dc.DrawBitmap( *m_arrowRight, x-5, y_mid-6, TRUE );
-#endif
- }
- else
- {
- dc.SetBrush(*m_hilightBrush);
- dc.SetPen(*wxBLACK_PEN);
- wxPoint button[3];
-
- if (item->IsExpanded())
- {
- button[0].x = x-5;
- button[0].y = y_mid-2;
- button[1].x = x+5;
- button[1].y = y_mid-2;
- button[2].x = x;
- button[2].y = y_mid+3;
- }
- else
- {
- button[0].y = y_mid-5;
- button[0].x = x-2;
- button[1].y = y_mid+5;
- button[1].x = x-2;
- button[2].y = y_mid;
- button[2].x = x+3;
- }
- dc.DrawPolygon(3, button);
- dc.SetPen(m_dottedPen);
- }