diff options
author | nyamatongwe <nyamatongwe@gmail.com> | 2013-09-18 10:40:53 +1000 |
---|---|---|
committer | nyamatongwe <nyamatongwe@gmail.com> | 2013-09-18 10:40:53 +1000 |
commit | 7e624907cde7c97d9f97e14584655c1350ac6078 (patch) | |
tree | dde2a8d4cb31218affd4ac8dc948f60b35bbb1b0 /cocoa/ScintillaView.h | |
parent | b42849c8550deaef4bac5f73fa2329741b3309c3 (diff) | |
download | scintilla-mirror-7e624907cde7c97d9f97e14584655c1350ac6078.tar.gz |
Reimplement notifications from ScintillaCocoa to ScintillaView as a delegate relationship
using ScintillaNotificationProtocol.
Add optional command:idFrom: method to ScintillaNotificationProtocol for command
notifications.
In a future version registerNotifyCallback: and ScintillaCocoa::RegisterNotifyCallback
will be deprecated.
Diffstat (limited to 'cocoa/ScintillaView.h')
-rw-r--r-- | cocoa/ScintillaView.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cocoa/ScintillaView.h b/cocoa/ScintillaView.h index 02bdfac90..653f111d3 100644 --- a/cocoa/ScintillaView.h +++ b/cocoa/ScintillaView.h @@ -46,6 +46,8 @@ extern NSString *const SCIUpdateUINotification; @protocol ScintillaNotificationProtocol - (void)notification: (Scintilla::SCNotification*)notification; +@optional +- (void)command:(int)command idFrom:(int)idFrom; @end /** @@ -92,7 +94,7 @@ extern NSString *const SCIUpdateUINotification; @end -@interface ScintillaView : NSView <InfoBarCommunicator> +@interface ScintillaView : NSView <InfoBarCommunicator, ScintillaNotificationProtocol> { @private // The back end is kind of a controller and model in one. @@ -126,6 +128,8 @@ extern NSString *const SCIUpdateUINotification; - (void) setCallback: (id <InfoBarCommunicator>) callback; - (void) suspendDrawing: (BOOL) suspend; +- (void) notification: (Scintilla::SCNotification*) notification; +- (void) command:(int) command idFrom:(int) idFrom; // Scroller handling - (void) setMarginWidth: (int) width; @@ -172,6 +176,7 @@ extern NSString *const SCIUpdateUINotification; - (void) setLexerProperty: (NSString*) name value: (NSString*) value; - (NSString*) getLexerProperty: (NSString*) name; +// The delegate property should be used instead of registerNotifyCallback which will be deprecated. - (void) registerNotifyCallback: (intptr_t) windowid value: (Scintilla::SciNotifyFunc) callback; - (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top; |