diff options
| -rw-r--r-- | cocoa/ScintillaCocoa.h | 1 | ||||
| -rw-r--r-- | cocoa/ScintillaCocoa.mm | 10 | ||||
| -rw-r--r-- | cocoa/ScintillaView.h | 3 | ||||
| -rw-r--r-- | cocoa/ScintillaView.mm | 23 | ||||
| -rw-r--r-- | doc/ScintillaDoc.html | 2 | 
5 files changed, 2 insertions, 37 deletions
| diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h index c857fd21a..c9f8fde8a 100644 --- a/cocoa/ScintillaCocoa.h +++ b/cocoa/ScintillaCocoa.h @@ -87,7 +87,6 @@ private:    NSEvent* lastMouseEvent;    id<ScintillaNotificationProtocol> delegate; -  bool delegateHasCommand;    SciNotifyFunc	notifyProc;    intptr_t notifyObj; diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 79332eda6..beae1cace 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -385,7 +385,6 @@ ScintillaCocoa::ScintillaCocoa(InnerView* view, MarginView* viewMargin)    timerTarget = [[TimerTarget alloc] init: this];    lastMouseEvent = NULL;    delegate = NULL; -  delegateHasCommand = false;    notifyObj = NULL;    notifyProc = NULL;    capturedMouse = false; @@ -1664,11 +1663,6 @@ void ScintillaCocoa::UpdateForScroll() {  void ScintillaCocoa::SetDelegate(id<ScintillaNotificationProtocol> delegate_)  {    delegate = delegate_; -  delegateHasCommand = false; -  if (delegate) -  { -    delegateHasCommand = [(id)delegate respondsToSelector: @selector(command:ctrlID:)]; -  }  }  //-------------------------------------------------------------------------------------------------- @@ -1695,8 +1689,6 @@ void ScintillaCocoa::NotifyChange()    if (notifyProc != NULL)      notifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(GetCtrlID(), SCEN_CHANGE),  	       (uintptr_t) this); -  if (delegateHasCommand) -    [delegate command:SCEN_CHANGE idFrom:GetCtrlID()];  }  //-------------------------------------------------------------------------------------------------- @@ -1706,8 +1698,6 @@ void ScintillaCocoa::NotifyFocus(bool focus)    if (notifyProc != NULL)      notifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(GetCtrlID(), (focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS)),  	       (uintptr_t) this); -  if (delegateHasCommand) -    [delegate command:(focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS) idFrom:GetCtrlID()];    Editor::NotifyFocus(focus);  } diff --git a/cocoa/ScintillaView.h b/cocoa/ScintillaView.h index 653f111d3..63b5cf4e9 100644 --- a/cocoa/ScintillaView.h +++ b/cocoa/ScintillaView.h @@ -46,8 +46,6 @@ extern NSString *const SCIUpdateUINotification;  @protocol ScintillaNotificationProtocol  - (void)notification: (Scintilla::SCNotification*)notification; -@optional -- (void)command:(int)command idFrom:(int)idFrom;  @end  /** @@ -129,7 +127,6 @@ extern NSString *const SCIUpdateUINotification;  - (void) suspendDrawing: (BOOL) suspend;  - (void) notification: (Scintilla::SCNotification*) notification; -- (void) command:(int) command idFrom:(int) idFrom;  // Scroller handling  - (void) setMarginWidth: (int) width; diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index ce0123982..3bdc9646a 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -1014,29 +1014,10 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)        }        break;      } -  } -} - -//-------------------------------------------------------------------------------------------------- - -/** - * Method receives notifications from Scintilla for gaining and losing focus and for changes. - * A delegate can be set to receive all notifications. - */ -- (void) command:(int)command idFrom:(int)idFrom -{ -  if ((mDelegate != nil) && ([(id)mDelegate respondsToSelector:@selector(command:ctrlID:)])) -  { -    [mDelegate command:command idFrom:idFrom]; -  } -   -  // Notifications for the editor itself. -  switch (command) -  { -    case SCEN_KILLFOCUS: +    case SCN_FOCUSOUT:        [self sendNotification: NSTextDidEndEditingNotification];        break; -    case SCEN_SETFOCUS: // Nothing to do for now. +    case SCN_FOCUSIN: // Nothing to do for now.        break;    }  } diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 031fc0f72..faf438753 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -6542,8 +6542,6 @@ struct SCNotification {      16 bits of the control's ID is passed in these notifications.</p>      <p>On GTK+, the "command" signal is sent and the signal handler should have the signature      <code>handler(GtkWidget *, gint wParam, gpointer lParam, gpointer userData)</code>.</p> -    <p>On Cocoa, a delegate implementing the -    <code>ScintillaNotificationProtocol</code> with a <code>command:idFrom:</code> method may be set.</p>      <code><a class="message" href="#SCEN_CHANGE">SCEN_CHANGE</a><br />       <a class="message" href="#SCEN_SETFOCUS">SCEN_SETFOCUS</a><br />       <a class="message" href="#SCEN_KILLFOCUS">SCEN_KILLFOCUS</a><br /> | 
