@interface wxNSView : NSView
{
- wxWidgetCocoaImpl* impl;
+ WXCOCOAIMPL_COMMON_MEMBERS
}
- (void)drawRect: (NSRect) rect;
-WXCOCOAIMPL_COMMON_MOUSE_INTERFACE
-
- (void)keyDown:(NSEvent *)event;
- (void)keyUp:(NSEvent *)event;
- (void)flagsChanged:(NSEvent *)event;
- (void)handleKeyEvent:(NSEvent *)event;
-- (void)setImplementation: (wxWidgetCocoaImpl *) theImplementation;
-- (wxWidgetCocoaImpl*) implementation;
-- (BOOL) isFlipped;
+WXCOCOAIMPL_COMMON_INTERFACE
+
- (BOOL) becomeFirstResponder;
- (BOOL) resignFirstResponder;
- (BOOL) canBecomeKeyView;
}
}
-WXCOCOAIMPL_COMMON_MOUSE_IMPLEMENTATION
+WXCOCOAIMPL_COMMON_IMPLEMENTATION
- (void)keyDown:(NSEvent *)event
{
impl->GetWXPeer()->HandleWindowEvent(wxevent);
}
-
-- (void)setImplementation: (wxWidgetCocoaImpl *) theImplementation
-{
- impl = theImplementation;
-}
-
-- (wxWidgetCocoaImpl*) implementation
-{
- return impl;
-}
-
-- (BOOL) isFlipped
-{
- return YES;
-}
-
- (BOOL) becomeFirstResponder
{
BOOL r = [super becomeFirstResponder];
{
}
-void wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event)
+bool wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event)
{
NSPoint clickLocation;
clickLocation = [m_osxView convertPoint:[event locationInWindow] fromView:nil];
SetupMouseEvent( wxevent , event ) ;
wxevent.m_x = pt.x;
wxevent.m_y = pt.y;
- GetWXPeer()->HandleWindowEvent(wxevent);
+
+ return GetWXPeer()->HandleWindowEvent(wxevent);
}