diff options
| -rw-r--r-- | mwidget.mod/mwidget.bmx | 16 | 
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)
 | 
