Added wxDragImage and demo, (used wxGenericDragImage for both

platforms)

Added demo of changing keyboard handling in wxGrid

SWIGged sources update


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-05-17 20:39:47 +00:00
parent 1b51ff0849
commit a1e181ef4d
32 changed files with 1389 additions and 42 deletions

View File

@@ -98,6 +98,8 @@ class DoodlePad(wxWindow):
result = dropSource.DoDragDrop()
self.log.WriteText("DragDrop completed: %d\n" % result)
#----------------------------------------------------------------------
@@ -106,31 +108,39 @@ class DoodleDropTarget(wxPyDropTarget):
wxPyDropTarget.__init__(self)
self.log = log
self.dv = window
# specify the type of data we will accept
self.data = wxCustomDataObject(wxCustomDataFormat("DoodleLines"))
self.SetDataObject(self.data)
# some virtual methods that track the progress of the drag
def OnEnter(self, x, y, d):
self.log.WriteText("OnEnter: %d, %d, %d\n" % (x, y, d))
return wxDragCopy
def OnLeave(self):
self.log.WriteText("OnLeave\n")
def OnDrop(self, x, y):
self.log.WriteText("OnDrop: %d %d\n" % (x, y))
return true
#def OnDragOver(self, x, y, d):
# self.log.WriteText("OnDragOver: %d, %d, %d\n" % (x, y, d))
# return wxDragCopy
# Called when OnDrop returns true. We need to get the data and
# do something with it.
def OnData(self, x, y, d):
self.log.WriteText("OnData: %d, %d, %d\n" % (x, y, d))
# copy the data from the drag source to out data object
if self.GetData():
# convert it back to a list of lines and give it to the viewer
linesdata = self.data.GetData()
lines = cPickle.loads(linesdata)
self.dv.SetLines(lines)
return d
#def OnDragOver(self, x, y, d):
# self.log.WriteText("OnDragOver: %d, %d, %d\n" % (x, y, d))
# return wxDragCopy