From aa992c594e2bc490ff2ccd34bd8b4963150c33ff Mon Sep 17 00:00:00 2001 From: David Elliott Date: Fri, 29 Aug 2003 14:59:04 +0000 Subject: [PATCH] Rename some of the Cocoa methods to reflect that they are implemented by the NSWindow delegate. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/cocoa/NSWindow.h | 6 +++--- include/wx/cocoa/toplevel.h | 6 +++--- src/cocoa/NSWindow.mm | 6 +++--- src/cocoa/toplevel.mm | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/wx/cocoa/NSWindow.h b/include/wx/cocoa/NSWindow.h index 927b80b70e..8f73ba3267 100644 --- a/include/wx/cocoa/NSWindow.h +++ b/include/wx/cocoa/NSWindow.h @@ -25,9 +25,9 @@ public: void AssociateNSWindow(WX_NSWindow cocoaNSWindow); void DisassociateNSWindow(WX_NSWindow cocoaNSWindow); virtual void Cocoa_close(void) = 0; - virtual bool Cocoa_windowShouldClose(void) = 0; - virtual void CocoaNotification_DidBecomeKey(void) { } - virtual void CocoaNotification_DidResignKey(void) { } + virtual bool CocoaDelegate_windowShouldClose(void) = 0; + virtual void CocoaDelegate_windowDidBecomeKey(void) { } + virtual void CocoaDelegate_windowDidResignKey(void) { } protected: static struct objc_object *sm_cocoaDelegate; }; diff --git a/include/wx/cocoa/toplevel.h b/include/wx/cocoa/toplevel.h index eb8996a4cd..8fb7a4623a 100644 --- a/include/wx/cocoa/toplevel.h +++ b/include/wx/cocoa/toplevel.h @@ -60,9 +60,9 @@ protected: public: inline WX_NSWindow GetNSWindow() { return m_cocoaNSWindow; } virtual void Cocoa_close(void); - virtual bool Cocoa_windowShouldClose(void); - virtual void CocoaNotification_DidBecomeKey(void); - virtual void CocoaNotification_DidResignKey(void); + virtual bool CocoaDelegate_windowShouldClose(void); + virtual void CocoaDelegate_windowDidBecomeKey(void); + virtual void CocoaDelegate_windowDidResignKey(void); protected: void SetNSWindow(WX_NSWindow cocoaNSWindow); WX_NSWindow m_cocoaNSWindow; diff --git a/src/cocoa/NSWindow.mm b/src/cocoa/NSWindow.mm index 4bf6ef9a76..45cf2bfa0a 100644 --- a/src/cocoa/NSWindow.mm +++ b/src/cocoa/NSWindow.mm @@ -48,21 +48,21 @@ { wxCocoaNSWindow *win = wxCocoaNSWindow::GetFromCocoa([notification object]); wxCHECK_RET(win,"notificationDidBecomeKey received but no wxWindow exists"); - win->CocoaNotification_DidBecomeKey(); + win->CocoaDelegate_windowDidBecomeKey(); } - (void)windowDidResignKey: (NSNotification *)notification { wxCocoaNSWindow *win = wxCocoaNSWindow::GetFromCocoa([notification object]); wxCHECK_RET(win,"notificationDidResignKey received but no wxWindow exists"); - win->CocoaNotification_DidResignKey(); + win->CocoaDelegate_windowDidResignKey(); } - (BOOL)windowShouldClose: (id)sender { wxLogDebug("windowShouldClose"); wxCocoaNSWindow *tlw = wxCocoaNSWindow::GetFromCocoa(sender); - if(tlw && !tlw->Cocoa_windowShouldClose()) + if(tlw && !tlw->CocoaDelegate_windowShouldClose()) { wxLogDebug("Window will not be closed"); return NO; diff --git a/src/cocoa/toplevel.mm b/src/cocoa/toplevel.mm index 1b5703aa12..fa9ffc308c 100644 --- a/src/cocoa/toplevel.mm +++ b/src/cocoa/toplevel.mm @@ -128,17 +128,17 @@ void wxTopLevelWindowCocoa::CocoaReplaceView(WX_NSView oldView, WX_NSView newVie [m_cocoaNSWindow setContentView:newView]; } -void wxTopLevelWindowCocoa::CocoaNotification_DidBecomeKey(void) +void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeKey(void) { - wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaNotification_DidBecomeKey",this); + wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeKey",this); wxActivateEvent event(wxEVT_ACTIVATE, TRUE, GetId()); event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); } -void wxTopLevelWindowCocoa::CocoaNotification_DidResignKey(void) +void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignKey(void) { - wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaNotification_DidResignKey",this); + wxLogDebug("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidResignKey",this); wxActivateEvent event(wxEVT_ACTIVATE, FALSE, GetId()); event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); @@ -154,7 +154,7 @@ void wxTopLevelWindowCocoa::Cocoa_close(void) wxTheApp->CocoaInstallRequestedIdleHandler(); } -bool wxTopLevelWindowCocoa::Cocoa_windowShouldClose() +bool wxTopLevelWindowCocoa::CocoaDelegate_windowShouldClose() { return wxWindowBase::Close(false); } -- 2.45.2