void CaptureMouse();
void ReleaseMouse();
+ void SetDropTarget(wxDropTarget* target);
+
wxInt32 GetValue() const;
void SetValue( wxInt32 v );
wxBitmap GetBitmap() const;
return true;
}
+void wxWidgetCocoaImpl::SetDropTarget(wxDropTarget* target)
+{
+ [m_osxView unregisterDraggedTypes];
+
+ if ( target == NULL )
+ return;
+
+ wxDataObject* dobj = target->GetDataObject();
+
+ if( dobj )
+ {
+ CFMutableArrayRef typesarray = CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTypeArrayCallBacks);
+
+ [m_osxView registerForDraggedTypes:(NSArray*)typesarray];
+ CFRelease(typesarray);
+ }
+}
void wxWidgetCocoaImpl::RemoveFromParent()
{
NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
wxNSView* v = [[wxNSView alloc] initWithFrame:r];
- // temporary hook for dnd
- [v registerForDraggedTypes:[NSArray arrayWithObjects:
- NSStringPboardType, NSFilenamesPboardType, (NSString*) kPasteboardTypeFileURLPromise, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]];
-
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v, false, true );
return c;
}