X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c551dc29e77df0a9842ab072eb5f1ba0ad45e66b..ec2df34e27ba41f202ecbf096cdfed082a9ddb8f:/include/wx/osx/cocoa/private.h diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index b759a862b3..118bad21ac 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -138,6 +138,8 @@ public : virtual void SetupKeyEvent(wxKeyEvent &wxevent, NSEvent * nsEvent, NSString* charString = NULL); virtual void SetupMouseEvent(wxMouseEvent &wxevent, NSEvent * nsEvent); + void SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent *nsEvent); + virtual bool SetupCursor(NSEvent* event); #if !wxOSX_USE_NATIVE_FLIPPED @@ -145,6 +147,8 @@ public : virtual bool IsFlipped() const { return m_isFlipped; } #endif + virtual double GetContentScaleFactor() const; + // cocoa thunk connected calls virtual unsigned int draggingEntered(void* sender, WXWidget slf, void* _cmd); @@ -256,6 +260,8 @@ public : CGWindowLevel GetWindowLevel() const { return m_macWindowLevel; } void RestoreWindowLevel(); + + static WX_NSResponder GetNextFirstResponder() ; protected : CGWindowLevel m_macWindowLevel; WXWindow m_macWindow; @@ -282,6 +288,11 @@ public: }; #ifdef __OBJC__ + typedef void (*wxOSX_TextEventHandlerPtr)(NSView* self, SEL _cmd, NSString *event); + typedef void (*wxOSX_EventHandlerPtr)(NSView* self, SEL _cmd, NSEvent *event); + typedef BOOL (*wxOSX_PerformKeyEventHandlerPtr)(NSView* self, SEL _cmd, NSEvent *event); + typedef BOOL (*wxOSX_FocusHandlerPtr)(NSView* self, SEL _cmd); + WXDLLIMPEXP_CORE NSScreen* wxOSXGetMenuScreen(); WXDLLIMPEXP_CORE NSRect wxToNSRect( NSView* parent, const wxRect& r ); @@ -292,6 +303,8 @@ public: NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ); + WXDLLIMPEXP_CORE NSView* wxOSXGetViewFromResponder( NSResponder* responder ); + // used for many wxControls @interface wxNSButton : NSButton @@ -339,6 +352,18 @@ public: @end + @interface wxNSComboBox : NSComboBox + { + wxNSTextFieldEditor* fieldEditor; + } + + - (wxNSTextFieldEditor*) fieldEditor; + - (void) setFieldEditor:(wxNSTextFieldEditor*) fieldEditor; + + @end + + + @interface wxNSMenu : NSMenu { wxMenuImpl* impl;