#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);
}
}
}
wxTheApp->ProcessPendingEvents();
}
-ProcessSerialNumber gAppProcess ;
-
bool wxApp::Initialize(int& argc, wxChar **argv)
{
// Mac-specific
UMAInitToolbox( 4, sm_isEmbedded ) ;
// TODO CHECK Can Be Removed SetEventMask( everyEvent ) ;
- UMAShowWatchCursor() ;
// Mac OS X passes a process serial number command line argument when
// the application is launched from the Finder. This argument must be
if ( !wxAppBase::Initialize(argc, argv) )
return false;
- GetCurrentProcess(&gAppProcess);
-
#if wxUSE_INTL
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
#endif
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 ) ;
}
// run loop takes ownership
CFRelease(m_macEventPosted);
- UMAShowArrowCursor() ;
-
return true;
}
// One last chance for pending objects to be cleaned up
wxTheApp->DeletePendingObjects();
- UMACleanupToolbox() ;
-
if (!sm_isEmbedded)
RemoveEventHandler( (EventHandlerRef)(wxTheApp->m_macEventHandler) );
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 ;
}
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