X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c6eb3a84be918dcfed2496d014549e13af0f0e9..1ea5ef0190b1b2f4d248af6b06d718a9adef2d41:/include/wx/osx/carbon/databrow.h diff --git a/include/wx/osx/carbon/databrow.h b/include/wx/osx/carbon/databrow.h index 487388b4df..abc3a2f851 100644 --- a/include/wx/osx/carbon/databrow.h +++ b/include/wx/osx/carbon/databrow.h @@ -16,7 +16,7 @@ #if wxUSE_GUI -#include "wx/mac/private.h" +#include "wx/osx/private.h" WX_DEFINE_ARRAY_SIZE_T(size_t,wxArrayDataBrowserItemID); @@ -206,6 +206,17 @@ protected : virtual Boolean DataBrowserHitTestProc (DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Rect const* mouseRect) = 0; virtual DataBrowserTrackingResult DataBrowserTrackingProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Point startPt, EventModifiers modifiers) = 0; +// +// callback functions for drag & drop +/// + static pascal Boolean DataBrowserAcceptDragProc (ControlRef browser, DragReference dragRef, DataBrowserItemID itemID); + static pascal Boolean DataBrowserAddDragItemProc(ControlRef browser, DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef); + static pascal Boolean DataBrowserReceiveDragProc(ControlRef browser, DragReference dragRef, DataBrowserItemID itemID); + + virtual Boolean DataBrowserAcceptDragProc (DragReference dragRef, DataBrowserItemID itemID) = 0; + virtual Boolean DataBrowserAddDragItemProc(DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef) = 0; + virtual Boolean DataBrowserReceiveDragProc(DragReference dragRef, DataBrowserItemID itemID) = 0; + private: // // wxWidget internal stuff @@ -274,6 +285,19 @@ protected: virtual Boolean DataBrowserHitTestProc (DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Rect const* mouseRect); virtual DataBrowserTrackingResult DataBrowserTrackingProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Point startPt, EventModifiers modifiers); +// +// callback functions for drag & drop (inherited from wxMacDataBrowserTableViewControl) +// + virtual Boolean DataBrowserAcceptDragProc (DragReference dragRef, DataBrowserItemID itemID); + virtual Boolean DataBrowserAddDragItemProc(DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef); + virtual Boolean DataBrowserReceiveDragProc(DragReference dragRef, DataBrowserItemID itemID); + +// +// drag & drop helper methods +// + wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects); + wxDataObjectComposite* GetDnDDataObjects(DragReference dragRef, ItemReference itemRef) const; // create the data objects from the native dragged object + private: };