From: Vadim Zeitlin Date: Wed, 27 Feb 2008 17:19:42 +0000 (+0000) Subject: override SetDropTarget() in wxGrid to associate it with wxGridWindow as this is what... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1edce33f7eb6bacf2804c43535bec2426d8b35e8 override SetDropTarget() in wxGrid to associate it with wxGridWindow as this is what things tend to be dropped on (patch 1903103) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 86403fd686..183dd94e01 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -1628,6 +1628,10 @@ public: virtual wxWindow *GetMainWindowOfCompositeControl() { return (wxWindow*)m_gridWin; } + // ------- drag and drop +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget(wxDropTarget *dropTarget); +#endif // wxUSE_DRAG_AND_DROP // ------ For compatibility with previous wxGrid only... // diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 688a62b884..00785219da 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -11110,6 +11110,20 @@ wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords &topLeft, return rect; } +// ---------------------------------------------------------------------------- +// drop target +// ---------------------------------------------------------------------------- + +#if wxUSE_DRAG_AND_DROP + +// this allow setting drop target directly on wxGrid +void wxGrid::SetDropTarget(wxDropTarget *dropTarget) +{ + GetGridWindow()->SetDropTarget(dropTarget); +} + +#endif // wxUSE_DRAG_AND_DROP + // ---------------------------------------------------------------------------- // grid event classes // ----------------------------------------------------------------------------