bool ButtonClickDidStateChange() { return true ;}
void SetMinimum( wxInt32 v );
void SetMaximum( wxInt32 v );
+ wxInt32 GetMinimum() const;
+ wxInt32 GetMaximum() const;
void PulseGauge();
void SetScrollThumb( wxInt32 value, wxInt32 thumbSize );
- (void)mouseExited:(NSEvent *)event;\
- (void)keyDown:(NSEvent *)event;\
- (void)keyUp:(NSEvent *)event;\
+ - (BOOL)performKeyEquivalent:(NSEvent *)event;\
- (void)flagsChanged:(NSEvent *)event;\
- - (BOOL) becomeFirstResponder;\
- - (BOOL) resignFirstResponder;
+ - (BOOL)becomeFirstResponder;\
+ - (BOOL)resignFirstResponder;\
+ - (void)resetCursorRects;
- #define WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION -(void)mouseDown:(NSEvent *)event \
- {\
- if ( !impl->DoHandleMouseEvent(event) )\
- [super mouseDown:event];\
- }\
- -(void)rightMouseDown:(NSEvent *)event\
+
+ #define WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION_NO_MOUSEDOWN -(void)rightMouseDown:(NSEvent *)event\
{\
if ( !impl->DoHandleMouseEvent(event) )\
[super rightMouseDown:event];\
if ( !impl->DoHandleMouseEvent(event) )\
[super mouseExited:event];\
}\
+ -(BOOL)performKeyEquivalent:(NSEvent *)event\
+ {\
+ if ( !impl->DoHandleKeyEvent(event) )\
+ return [super performKeyEquivalent:event];\
+ return YES;\
+ }\
-(void)keyDown:(NSEvent *)event\
{\
if ( !impl->DoHandleKeyEvent(event) )\
if ( r )\
impl->DoNotifyFocusEvent( false );\
return r;\
+ }\
+ - (void) resetCursorRects\
+ {\
+ if ( impl )\
+ {\
+ wxWindow* wxpeer = impl->GetWXPeer();\
+ if ( wxpeer )\
+ {\
+ NSCursor *cursor = (NSCursor*)wxpeer->GetCursor().GetHCURSOR();\
+ if (cursor == NULL)\
+ [super resetCursorRects];\
+ else\
+ [self addCursorRect: [self bounds]\
+ cursor: cursor];\
+ }\
+ }\
}
-
+
+ #define WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION -(void)mouseDown:(NSEvent *)event \
+ {\
+ if ( !impl->DoHandleMouseEvent(event) )\
+ [super mouseDown:event];\
+ }\
+ WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION_NO_MOUSEDOWN
+
#define WXCOCOAIMPL_COMMON_MEMBERS wxWidgetCocoaImpl* impl;
#define WXCOCOAIMPL_COMMON_INTERFACE \
- (BOOL) isFlipped;\
WXCOCOAIMPL_COMMON_EVENTS_INTERFACE
- #define WXCOCOAIMPL_COMMON_IMPLEMENTATION WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION \
- - (void)setImplementation: (wxWidgetCocoaImpl *) theImplementation\
+ #define WXCOCOAIMPL_COMMON_IMPLEMENTATION_BASE - (void)setImplementation: (wxWidgetCocoaImpl *) theImplementation\
{\
impl = theImplementation;\
}\
{\
return impl;\
}\
+
+ #define WXCOCOAIMPL_COMMON_IMPLEMENTATION WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION \
+ WXCOCOAIMPL_COMMON_IMPLEMENTATION_BASE \
- (BOOL) isFlipped\
{\
return YES;\
- }\
+ }
- #define WXCOCOAIMPL_COMMON_IMPLEMENTATION_NOT_FLIPPED WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION \
- - (void)setImplementation: (wxWidgetCocoaImpl *) theImplementation\
- {\
- impl = theImplementation;\
- }\
- - (wxWidgetCocoaImpl*) implementation\
+ #define WXCOCOAIMPL_COMMON_IMPLEMENTATION_NO_MOUSEDOWN WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION_NO_MOUSEDOWN \
+ WXCOCOAIMPL_COMMON_IMPLEMENTATION_BASE \
+ - (BOOL) isFlipped\
{\
- return impl;\
- }\
+ return YES;\
+ }
+
+
+ #define WXCOCOAIMPL_COMMON_IMPLEMENTATION_NOT_FLIPPED WXCOCOAIMPL_COMMON_EVENTS_IMPLEMENTATION \
+ WXCOCOAIMPL_COMMON_IMPLEMENTATION_BASE \
- (BOOL) isFlipped\
{\
return NO;\
- }\
+ }
// used for many wxControls