From e55ff240a70f482d9c782e725e4742090eadf10b Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 15 Jan 2006 21:03:44 +0000 Subject: Added drag and drop event --- mwidget.mod/mwidget.bmx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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) -- cgit v1.2.3