summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2006-01-15 21:03:44 +0000
committerIan C <ianc@noddybox.co.uk>2006-01-15 21:03:44 +0000
commite55ff240a70f482d9c782e725e4742090eadf10b (patch)
tree0e3f6b7ee48f214d063105eeaaa6e65296d2f7d5
parent18be0179610b4f1311cad50c155e7646083d1cf8 (diff)
Added drag and drop event
-rw-r--r--mwidget.mod/mwidget.bmx16
1 files changed, 16 insertions, 0 deletions
diff --git a/mwidget.mod/mwidget.bmx b/mwidget.mod/mwidget.bmx
index 8a2a09f..738f0eb 100644
--- a/mwidget.mod/mwidget.bmx
+++ b/mwidget.mod/mwidget.bmx
@@ -644,6 +644,7 @@ Type TMWindow Extends TMWidget
OnMoveEvent=New TMWEventListIntInt
OnResizeEvent=New TMWEventListIntInt
OnCloseEvent=New TMWEventListVoid
+ OnDropEvent=New TMWEventListString
Local g:TGadget
@@ -777,8 +778,23 @@ Type TMWindow Extends TMWidget
EndRem
Field OnCloseEvent:TMWEventListVoid
+ Rem
+ bbdoc: Called when a file is dropped in the window.
+ about: @path is the dropped file.
+ EndRem
+ Method OnDrop(path:String)
+ End Method
+
+ Rem
+ bbdoc: Called when a file is dropped in the window.
+ EndRem
+ Field OnDropEvent:TMWEventListString
+
Method Handle(e:TEvent)
Select e.id
+ Case EVENT_WINDOWACCEPT
+ OnDrop(String(e.extra))
+ OnDropEvent.Fire(Self,String(e.extra))
Case EVENT_WINDOWMOVE
OnMove(e.x,e.y)
OnMoveEvent.Fire(Self,e.x,e.y)