X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4dd9fdf82749bb5f9e2bf9c2ad1bbd59e0eeb00e..cbeda384e51acb82e13994cb67ac1714669cae10:/include/wx/osx/cocoa/private.h?ds=sidebyside diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index 507816b182..82fa07ce17 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -98,7 +98,7 @@ public : void SetDefaultButton( bool isDefault ); void PerformClick(); - void SetLabel(const wxString& title, wxFontEncoding encoding); + virtual void SetLabel(const wxString& title, wxFontEncoding encoding); void SetCursor( const wxCursor & cursor ); void CaptureMouse(); @@ -124,10 +124,14 @@ public : void InstallEventHandler( WXWidget control = NULL ); virtual bool DoHandleMouseEvent(NSEvent *event); - virtual bool DoHandleKeyEvent(NSEvent *event); - virtual void DoNotifyFocusEvent(bool receivedFocus); + virtual bool DoHandleKeyEvent(NSEvent *event); + virtual bool DoHandleCharEvent(NSEvent *event, NSString *text); + virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow); void SetFlipped(bool flipped); + virtual bool IsFlipped() const { return m_isFlipped; } + + // cocoa thunk connected calls virtual unsigned int draggingEntered(void* sender, WXWidget slf, void* _cmd); virtual void draggingExited(void* sender, WXWidget slf, void* _cmd); @@ -135,18 +139,21 @@ public : virtual bool performDragOperation(void* sender, WXWidget slf, void* _cmd); virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void* _cmd); virtual void keyEvent(WX_NSEvent event, WXWidget slf, void* _cmd); + virtual void insertText(NSString* text, WXWidget slf, void* _cmd); virtual bool performKeyEquivalent(WX_NSEvent event, WXWidget slf, void* _cmd); + virtual bool acceptsFirstResponder(WXWidget slf, void* _cmd); virtual bool becomeFirstResponder(WXWidget slf, void* _cmd); virtual bool resignFirstResponder(WXWidget slf, void* _cmd); virtual void resetCursorRects(WXWidget slf, void* _cmd); virtual bool isFlipped(WXWidget slf, void* _cmd); virtual void drawRect(void* rect, WXWidget slf, void* _cmd); - virtual void clickedAction(WXWidget slf, void* _cmd, void* sender); - virtual void doubleClickedAction(WXWidget slf, void* _cmd, void *sender); + virtual void controlAction(WXWidget slf, void* _cmd, void* sender); + virtual void controlDoubleAction(WXWidget slf, void* _cmd, void *sender); protected: WXWidget m_osxView; + NSEvent* m_lastKeyDownEvent; bool m_isFlipped; DECLARE_DYNAMIC_CLASS_NO_COPY(wxWidgetCocoaImpl) @@ -240,7 +247,6 @@ protected : @interface wxNSTextField : NSTextField { } - @end @interface wxNSMenu : NSMenu @@ -266,7 +272,25 @@ protected : @end - void wxOSXCocoaClassAddWXMethods(Class c); + void WXDLLIMPEXP_CORE wxOSXCocoaClassAddWXMethods(Class c); + + /* + We need this for ShowModal, as the sheet just disables the parent window and + returns control to the app, whereas we don't want to return from ShowModal + until the sheet has been dismissed. + */ + @interface ModalDialogDelegate : NSObject + { + BOOL sheetFinished; + int resultCode; + } + + - (BOOL)finished; + - (int)code; + - (void)waitForSheetToFinish; + - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo; + @end + #endif // __OBJC__