// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_APP_H_
#define _WX_APP_H_
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_APP_H_
#define _WX_APP_H_
virtual void SetPrintMode(int mode) { m_printMode = mode; }
virtual int GetPrintMode() const { return m_printMode; }
virtual void SetPrintMode(int mode) { m_printMode = mode; }
virtual int GetPrintMode() const { return m_printMode; }
void OnIdle(wxIdleEvent& event);
void OnEndSession(wxCloseEvent& event);
void OnQueryEndSession(wxCloseEvent& event);
void OnIdle(wxIdleEvent& event);
void OnEndSession(wxCloseEvent& event);
void OnQueryEndSession(wxCloseEvent& event);
-
- // Send idle event to all top-level windows.
- // Returns TRUE if more idle time is requested.
- bool SendIdleEvents();
-
- // Send idle event to window and all subwindows
- // Returns TRUE if more idle time is requested.
- bool SendIdleEvents(wxWindowMac* win);
-
// Windows only, but for compatibility...
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
inline bool GetAuto3D() const { return m_auto3D; }
// Windows only, but for compatibility...
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
inline bool GetAuto3D() const { return m_auto3D; }
- static bool Initialize();
- static void CleanUp();
-
- void DeletePendingObjects();
+ virtual bool Initialize(int& argc, wxChar **argv);
+ virtual void CleanUp();
+
- WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
- WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; }
+ // the installed application event handler
+ WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
+ WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; }
+ void MacSetCurrentEvent( WXEVENTREF event , WXEVENTHANDLERCALLREF handler )
+ { m_macCurrentEvent = event ; m_macCurrentEventHandlerCallRef = handler ; }
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
static WXHRGN s_macCursorRgn ;
static long s_lastModifiers ;
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
static WXHRGN s_macCursorRgn ;
static long s_lastModifiers ;
static bool s_macSupportPCMenuShortcuts ;
static long s_macAboutMenuItemId ;
static long s_macPreferencesMenuItemId ;
static bool s_macSupportPCMenuShortcuts ;
static long s_macAboutMenuItemId ;
static long s_macPreferencesMenuItemId ;
virtual void MacSuspend( bool convertClipboard ) ;
virtual void MacResume( bool convertClipboard ) ;
virtual void MacConvertPrivateToPublicScrap() ;
virtual void MacConvertPublicToPrivateScrap() ;
virtual void MacSuspend( bool convertClipboard ) ;
virtual void MacResume( bool convertClipboard ) ;
virtual void MacConvertPrivateToPublicScrap() ;
virtual void MacConvertPublicToPrivateScrap() ;
void MacDoOneEvent() ;
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
void MacHandleOneEvent( WXEVENTREF ev ) ;
void MacDoOneEvent() ;
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
void MacHandleOneEvent( WXEVENTREF ev ) ;
#if !TARGET_CARBON
virtual void MacHandleMenuSelect( int menuid , int menuitem ) ;
virtual void MacHandleMouseUpEvent( WXEVENTREF ev ) ;
#if !TARGET_CARBON
virtual void MacHandleMenuSelect( int menuid , int menuitem ) ;
virtual void MacHandleMouseUpEvent( WXEVENTREF ev ) ;
virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ;
virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ;
virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ;
virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ;
virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ;
virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ;
- void MacHandleMenuCommand( wxUint32 command ) ;
- bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
- bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
-
+ void MacHandleMenuCommand( wxUint32 command ) ;
+ bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
+ bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
+
virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
// opaque pointer for CFragInitBlock
static void OpenSharedLibraryResource(const void *) ;
static void CloseSharedLibraryResource() ;
// opaque pointer for CFragInitBlock
static void OpenSharedLibraryResource(const void *) ;
static void CloseSharedLibraryResource() ;