#include "wx/cocoa/string.h"
#include "wx/cocoa/trackingrectmanager.h"
+#import <Foundation/NSArray.h>
#import <Foundation/NSRunLoop.h>
#include "wx/cocoa/objc/NSView.h"
#import <AppKit/NSEvent.h>
void wxWindowCocoa::CocoaAddChild(wxWindowCocoa *child)
{
+ // Pool here due to lack of one during wx init phase
+ wxAutoNSAutoreleasePool pool;
+
NSView *childView = child->GetNSViewForSuperview();
wxASSERT(childView);
return true;
}
+bool wxWindowCocoa::SetCursor(const wxCursor &cursor)
+{
+ if(!wxWindowBase::SetCursor(cursor))
+ return false;
+ // Invalidate the cursor rects so the cursor will change
+ [[GetNSView() window] invalidateCursorRectsForView:GetNSView()];
+ return true;
+}
+
bool wxWindowCocoa::Cocoa_viewDidMoveToWindow()
{
wxLogTrace(wxTRACE_COCOA,wxT("wxWindow=%p::viewDidMoveToWindow"),this);
bool wxWindow::SetFont(const wxFont& font)
{
- // TODO
- return true;
+ // FIXME: We may need to handle wx font inheritance.
+ return wxWindowBase::SetFont(font);
}
#if 0 // these are used when debugging the algorithm.
void wxCocoaTrackingRectManager::BuildTrackingRect()
{
+ // Pool here due to lack of one during wx init phase
+ wxAutoNSAutoreleasePool pool;
+
wxASSERT_MSG(!m_isTrackingRectActive, wxT("Tracking rect was not cleared"));
if([m_window->GetNSView() window] != nil)
{