]> git.saurik.com Git - wxWidgets.git/commitdiff
override SetDropTarget() in wxGrid to associate it with wxGridWindow as this is what...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Feb 2008 17:19:42 +0000 (17:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Feb 2008 17:19:42 +0000 (17:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/grid.h
src/generic/grid.cpp

index 86403fd6869935d30fa0eac7ed8d475a90a8aac9..183dd94e01fc2e8ea608d4054a0de5f9a6678bdb 100644 (file)
@@ -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...
     //
index 688a62b8846299249e2f05e50307c7bcd9112319..00785219da1e761ef457d3bb2d9fc76f5eb0b411 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------