=========================================================================*/
+
+
#include <assert.h>
#include "creawxVTKRenderWindowInteractor.h"
// AKT: wxOSX 2.9.x defines __WXOSX_COCOA__ rather than __WXCOCOA__
#ifdef __WXOSX_COCOA__
-#define __WXCOCOA__
+ #import <Cocoa/Cocoa.h>
+ #define __WXCOCOA__
#endif
#if defined(__WXMAC__) && wxCHECK_VERSION(2,9,0)
#endif
#endif
+
//=======================================================================
// LG : NAMESPACE IS NECESSARY TO AVOID CONFLICTING SYMBOLS IN DYN LIBS
namespace crea
// To access objc calls on cocoa
#ifdef __WXCOCOA__
#ifdef VTK_USE_COCOA
-#import <Cocoa/Cocoa.h>
+//EED #import <Cocoa/Cocoa.h>
// This trick is no longer need in VTK CVS, should get rid of that:
#define id Id
#else
if(!Handle)
{
Handle = GetHandleHack();
+
+#ifdef __WXCOCOA__
+ vtkCocoaRenderWindow *rwin = vtkCocoaRenderWindow::SafeDownCast(RenderWindow);
+ NSView *nvsview = (NSView* )Handle;
+ NSWindow *nswindow = nvsview.window;
+ rwin->SetRootWindow( nswindow );
+ rwin->SetWindowId( reinterpret_cast<void *>(nvsview) );
+#else
RenderWindow->SetWindowId(reinterpret_cast<void *>(Handle));
+#endif
+
+
+
// Cocoa
// this->GetNSView() <-> DisplayId
// this->GetTopLevel()->GetNSWindow() <-> WindowId
RenderWindow->Render();
}
#endif
+
}
}
//---------------------------------------------------------------------------