+ case kEventControlSetFocusPart :
+ {
+ Boolean focusEverything = false ;
+ ControlPartCode controlPart = cEvent.GetParameter<ControlPartCode>(kEventParamControlPart , typeControlPartCode );
+ if ( cEvent.GetParameter<Boolean>(kEventParamControlFocusEverything , &focusEverything ) == noErr )
+ {
+ }
+ if ( controlPart == kControlFocusNoPart )
+ {
+ #if wxUSE_CARET
+ if ( thisWindow->GetCaret() )
+ {
+ thisWindow->GetCaret()->OnKillFocus();
+ }
+ #endif // wxUSE_CARET
+ wxFocusEvent event(wxEVT_KILL_FOCUS, thisWindow->GetId());
+ event.SetEventObject(thisWindow);
+ thisWindow->GetEventHandler()->ProcessEvent(event) ;
+ }
+ else
+ {
+ // panel wants to track the window which was the last to have focus in it
+ wxChildFocusEvent eventFocus(thisWindow);
+ thisWindow->GetEventHandler()->ProcessEvent(eventFocus);
+
+ #if wxUSE_CARET
+ if ( thisWindow->GetCaret() )
+ {
+ thisWindow->GetCaret()->OnSetFocus();
+ }
+ #endif // wxUSE_CARET
+
+ wxFocusEvent event(wxEVT_SET_FOCUS, thisWindow->GetId());
+ event.SetEventObject(thisWindow);
+ thisWindow->GetEventHandler()->ProcessEvent(event) ;
+ }
+ }
+ break ;
+#endif
+ case kEventControlHit :
+ {
+ result = thisWindow->MacControlHit( handler , event ) ;
+ }
+ break ;