moving all string conversions to private.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,6 +94,7 @@ public:
|
|||||||
bool IsExiting() { return !m_keepGoing ; }
|
bool IsExiting() { return !m_keepGoing ; }
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
|
WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
|
||||||
|
WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -102,21 +103,20 @@ public:
|
|||||||
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
|
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
|
||||||
static WXHRGN s_macCursorRgn ;
|
static WXHRGN s_macCursorRgn ;
|
||||||
static long s_lastModifiers ;
|
static long s_lastModifiers ;
|
||||||
WXEVENTREF m_macCurrentEvent ;
|
|
||||||
|
|
||||||
int m_nCmdShow;
|
int m_nCmdShow;
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
bool m_keepGoing ;
|
bool m_keepGoing ;
|
||||||
|
|
||||||
// mac specifics
|
// mac specifics
|
||||||
|
#if TARGET_CARBON
|
||||||
|
WXEVENTHANDLERREF m_macEventHandler ;
|
||||||
|
WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ;
|
||||||
|
#endif
|
||||||
|
WXEVENTREF m_macCurrentEvent ;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#if TARGET_CARBON
|
|
||||||
// public to avoid change in initialization order of handlers
|
|
||||||
// could be moved into a override of OnInitGui eventually
|
|
||||||
WXEVENTHANDLERREF m_macEventHandler ;
|
|
||||||
#endif
|
|
||||||
static bool s_macDefaultEncodingIsPC ;
|
static bool s_macDefaultEncodingIsPC ;
|
||||||
static bool s_macSupportPCMenuShortcuts ;
|
static bool s_macSupportPCMenuShortcuts ;
|
||||||
static long s_macAboutMenuItemId ;
|
static long s_macAboutMenuItemId ;
|
||||||
@@ -144,6 +144,9 @@ public:
|
|||||||
virtual void MacConvertPrivateToPublicScrap() ;
|
virtual void MacConvertPrivateToPublicScrap() ;
|
||||||
virtual void MacConvertPublicToPrivateScrap() ;
|
virtual void MacConvertPublicToPrivateScrap() ;
|
||||||
|
|
||||||
|
void MacDoOneEvent() ;
|
||||||
|
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
|
||||||
|
void MacHandleOneEvent( WXEVENTREF ev ) ;
|
||||||
#if !TARGET_CARBON
|
#if !TARGET_CARBON
|
||||||
virtual void MacHandleMenuSelect( int menuid , int menuitem ) ;
|
virtual void MacHandleMenuSelect( int menuid , int menuitem ) ;
|
||||||
virtual void MacHandleMouseUpEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleMouseUpEvent( WXEVENTREF ev ) ;
|
||||||
@@ -151,25 +154,19 @@ public:
|
|||||||
virtual void MacHandleDiskEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleDiskEvent( WXEVENTREF ev ) ;
|
||||||
virtual void MacHandleActivateEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleActivateEvent( WXEVENTREF ev ) ;
|
||||||
virtual void MacHandleUpdateEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleUpdateEvent( WXEVENTREF ev ) ;
|
||||||
#endif
|
|
||||||
virtual void MacHandleMouseDownEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleMouseDownEvent( WXEVENTREF ev ) ;
|
||||||
|
|
||||||
void MacHandleMenuCommand( wxUint32 command ) ;
|
|
||||||
// event main methods
|
|
||||||
|
|
||||||
void MacDoOneEvent() ;
|
|
||||||
void MacHandleOneEvent( WXEVENTREF ev ) ;
|
|
||||||
void MacHandleModifierEvents( WXEVENTREF ev ) ;
|
void MacHandleModifierEvents( WXEVENTREF ev ) ;
|
||||||
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
|
|
||||||
|
|
||||||
// primary events
|
|
||||||
|
|
||||||
virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ;
|
||||||
virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ;
|
||||||
virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ;
|
||||||
|
|
||||||
virtual bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
|
#endif
|
||||||
virtual 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 MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||||
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||||
@@ -205,39 +202,6 @@ private:
|
|||||||
int WXDLLEXPORT wxEntry( int argc, char *argv[] , bool enterLoop = TRUE);
|
int WXDLLEXPORT wxEntry( int argc, char *argv[] , bool enterLoop = TRUE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void wxMacConvertFromPCForControls( char * p ) ;
|
|
||||||
|
|
||||||
void wxMacConvertToPC( const char *from , char *to , int len ) ;
|
|
||||||
void wxMacConvertFromPC( const char *from , char *to , int len ) ;
|
|
||||||
void wxMacConvertToPC( const char *from , char *to , int len ) ;
|
|
||||||
void wxMacConvertFromPC( char * p ) ;
|
|
||||||
void wxMacConvertFromPC( unsigned char *p ) ;
|
|
||||||
wxString wxMacMakeMacStringFromPC( const char * p ) ;
|
|
||||||
void wxMacConvertToPC( char * p ) ;
|
|
||||||
void wxMacConvertToPC( unsigned char *p ) ;
|
|
||||||
wxString wxMacMakePCStringFromMac( const char * p ) ;
|
|
||||||
|
|
||||||
// converts this string into a pascal with optional pc 2 mac encoding
|
|
||||||
void wxMacStringToPascal( const char * from , unsigned char* to , bool pc2macEncoding ) ;
|
|
||||||
|
|
||||||
// converts this string into a pascal with pc 2 mac encoding if s_macDefaultEncodingIsPC
|
|
||||||
inline void wxMacStringToPascal( const char * from , unsigned char* to )
|
|
||||||
{ wxMacStringToPascal( from , to , wxApp::s_macDefaultEncodingIsPC ) ; }
|
|
||||||
|
|
||||||
// converts this string into a pascal with optional mac 2 pc encoding
|
|
||||||
wxString wxMacMakeStringFromPascal( unsigned char* from , bool mac2pcEncoding ) ;
|
|
||||||
|
|
||||||
// converts this pascal string into a wxString with pc 2 mac encoding if s_macDefaultEncodingIsPC
|
|
||||||
inline wxString wxMacMakeStringFromPascal( unsigned char* from )
|
|
||||||
{ return wxMacMakeStringFromPascal( from , wxApp::s_macDefaultEncodingIsPC ) ; }
|
|
||||||
|
|
||||||
// converts this c string into a wxString with optional mac 2 pc encoding
|
|
||||||
wxString wxMacMakeStringFromMacString( const char* from , bool mac2pcEncoding ) ;
|
|
||||||
|
|
||||||
// converts this c string into a wxString with pc 2 mac encoding if s_macDefaultEncodingIsPC
|
|
||||||
inline wxString wxMacMakeStringFromMacString( const char* from )
|
|
||||||
{ return wxMacMakeStringFromMacString( from , wxApp::s_macDefaultEncodingIsPC ) ; }
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_APP_H_
|
// _WX_APP_H_
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user