#include "wx/docview.h"
#include "wx/filename.h"
#include "wx/link.h"
+#include "wx/thread.h"
#include <string.h>
{
wxWindow *win = menu->GetInvokingWindow();
if (win)
- win->GetEventHandler()->ProcessEvent(wxevent);
+ win->HandleWindowEvent(wxevent);
}
}
}
CFRelease( url ) ;
CFStringRef path = CFURLCopyFileSystemPath ( urlParent , kCFURLPOSIXPathStyle ) ;
CFRelease( urlParent ) ;
- wxString cwd = wxMacCFStringHolder(path).AsString(wxLocale::GetSystemEncoding());
+ wxString cwd = wxCFStringRef(path).AsString(wxLocale::GetSystemEncoding());
wxSetWorkingDirectory( cwd ) ;
}
wxKeyEvent event(wxEVT_KEY_DOWN) ;
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
- handled = focus->GetEventHandler()->ProcessEvent( event ) ;
+ handled = focus->HandleWindowEvent( event ) ;
if ( handled && event.GetSkipped() )
handled = false ;
bool handled;
wxKeyEvent event( wxEVT_KEY_UP ) ;
MacCreateKeyEvent( event, focus , keymessage , modifiers , when , wherex , wherey , uniChar ) ;
- handled = focus->GetEventHandler()->ProcessEvent( event ) ;
+ handled = focus->HandleWindowEvent( event ) ;
return handled ;
}
bool handled = false ;
- wxTopLevelWindowMac *tlw = focus->MacGetTopLevelWindow() ;
+ wxNonOwnedWindow *tlw = focus->MacGetTopLevelWindow() ;
if (tlw)
{
event.SetEventType( wxEVT_CHAR_HOOK );
- handled = tlw->GetEventHandler()->ProcessEvent( event );
+ handled = tlw->HandleWindowEvent( event );
if ( handled && event.GetSkipped() )
handled = false ;
}
{
event.SetEventType( wxEVT_CHAR );
event.Skip( false ) ;
- handled = focus->GetEventHandler()->ProcessEvent( event ) ;
+ handled = focus->HandleWindowEvent( event ) ;
}
if ( !handled && (keyval == WXK_TAB) )
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
new_event.SetWindowChange( event.ControlDown() );
new_event.SetCurrentFocus( focus );
- handled = focus->GetParent()->GetEventHandler()->ProcessEvent( new_event );
+ handled = focus->GetParent()->HandleWindowEvent( new_event );
if ( handled && new_event.GetSkipped() )
handled = false ;
}
// generate wxID_CANCEL if command-. or <esc> has been pressed (typically in dialogs)
wxCommandEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
new_event.SetEventObject( focus );
- handled = focus->GetEventHandler()->ProcessEvent( new_event );
+ handled = focus->HandleWindowEvent( new_event );
}
}
#endif
event.SetTimestamp(when);
event.SetEventObject(focus);
}
+
+
+void wxApp::MacHideApp()
+{
+ wxMacCarbonEvent event( kEventClassCommand , kEventCommandProcess );
+ HICommand command;
+ memset( &command, 0 , sizeof(command) );
+ command.commandID = kHICommandHide ;
+ event.SetParameter<HICommand>(kEventParamDirectObject, command );
+ SendEventToApplication( event );
+}