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 | 59b95105a1e71ad6b62a1970e88a0390850e5bfe (patch) | |
tree | b2b837ef548ae7550d9e0bafb68ad50dcddd3f3c /cocoa/ScintillaView.h | |
parent | c7eca832e818dbaa7180822fdea6f3aabcd83a32 (diff) | |
download | scintilla-mirror-59b95105a1e71ad6b62a1970e88a0390850e5bfe.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; |