switching to CreateXXX methods for Controls and to Hit Event Processing, thus supporting full keyboard access mode

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-04-13 05:14:14 +00:00
parent 9b58bfecd8
commit 4c37f1248b
18 changed files with 201 additions and 303 deletions

View File

@@ -41,8 +41,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
if ( label.Find('\n' ) == wxNOT_FOUND && label.Find('\r' ) == wxNOT_FOUND)
{
m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , "\p" , true , 0 , 0 , 1,
kControlPushButtonProc , (long) this ) ;
verify_noerr ( CreatePushButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , (ControlRef*) &m_macControl ) ) ;
}
else
{
@@ -132,13 +131,11 @@ void wxButton::Command (wxCommandEvent & event)
ProcessCommand (event);
}
void wxButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 controlpart , bool WXUNUSED(mouseStillDown) )
wxInt32 wxButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) )
{
if ( controlpart != kControlNoPart )
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
event.SetEventObject(this);
ProcessCommand(event);
}
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId );
event.SetEventObject(this);
ProcessCommand(event);
return noErr ;
}