summaryrefslogtreecommitdiff
path: root/mwidget
diff options
context:
space:
mode:
Diffstat (limited to 'mwidget')
-rw-r--r--mwidget/test.bmx15
1 files changed, 12 insertions, 3 deletions
diff --git a/mwidget/test.bmx b/mwidget/test.bmx
index c0f7cc3..f8d8a19 100644
--- a/mwidget/test.bmx
+++ b/mwidget/test.bmx
@@ -5,7 +5,7 @@ Import noddybox.mwidget
Incbin "icons.png"
Incbin "toolbar.png"
-Const SUBCLASS:Int=True
+Const SUBCLASS:Int=False
Const TESTTIMER:Int=False
Global top:TMWindow
@@ -95,6 +95,10 @@ Function OnResize(o:TMWidget, x:Int, y:Int)
w.StatusText("(Callback) ["+x+","+y+"]")
End Function
+Function OnDrop(w:TMWidget, path:String)
+ Notify("Dropped~n" + path)
+End Function
+
Function OnPress_OK(o:TMWidget)
top.Close()
End Function
@@ -300,6 +304,10 @@ Type MyApp Extends TMWindow
Method OnResize(x:Int, y:Int)
StatusText("["+x+","+y+"]")
End Method
+
+ Method OnDrop(path:String)
+ Notify("Dropped~n" + path)
+ End Method
End Type
Type MyOK Extends TMButton
@@ -627,13 +635,14 @@ End Function
'
If SUBCLASS
- top=New MyApp.Create("Test Managed Widgets",100,100,640,400,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS|WINDOW_RESIZABLE|WINDOW_MENU)
+ top=New MyApp.Create("Test Managed Widgets",100,100,640,400,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS|WINDOW_RESIZABLE|WINDOW_MENU|WINDOW_ACCEPTFILES)
Else
- top=New TMWindow.Create("Test Managed Widgets",100,100,640,400,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS|WINDOW_RESIZABLE|WINDOW_MENU)
+ top=New TMWindow.Create("Test Managed Widgets",100,100,640,400,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS|WINDOW_RESIZABLE|WINDOW_MENU|WINDOW_ACCEPTFILES)
top.OnCloseEvent.Add(OnClose)
top.OnTimerEvent.Add(OnTimer)
top.OnMoveEvent.Add(OnMove)
top.OnResizeEvent.Add(OnResize)
+ top.OnDropEvent.Add(OnDrop)
EndIf
top.MinSize(top.Width(),top.Height())