by the NSWindow delegate.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23296
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void AssociateNSWindow(WX_NSWindow cocoaNSWindow);
void DisassociateNSWindow(WX_NSWindow cocoaNSWindow);
virtual void Cocoa_close(void) = 0;
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;
};
protected:
static struct objc_object *sm_cocoaDelegate;
};
public:
inline WX_NSWindow GetNSWindow() { return m_cocoaNSWindow; }
virtual void Cocoa_close(void);
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;
protected:
void SetNSWindow(WX_NSWindow cocoaNSWindow);
WX_NSWindow m_cocoaNSWindow;
{
wxCocoaNSWindow *win = wxCocoaNSWindow::GetFromCocoa([notification object]);
wxCHECK_RET(win,"notificationDidBecomeKey received but no wxWindow exists");
{
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");
}
- (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);
}
- (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;
{
wxLogDebug("Window will not be closed");
return NO;
[m_cocoaNSWindow setContentView:newView];
}
[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);
}
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);
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, GetId());
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
wxTheApp->CocoaInstallRequestedIdleHandler();
}
wxTheApp->CocoaInstallRequestedIdleHandler();
}
-bool wxTopLevelWindowCocoa::Cocoa_windowShouldClose()
+bool wxTopLevelWindowCocoa::CocoaDelegate_windowShouldClose()
{
return wxWindowBase::Close(false);
}
{
return wxWindowBase::Close(false);
}