Platforms to show: All Mac Windows Linux Cross-Platform
/MacControls/CustomNSView to capture gestures
Required plugins for this example: MBS MacFrameworks Plugin, MBS MacControls Plugin, MBS MacBase Plugin, MBS Main Plugin, MBS MacCocoa Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacControls/CustomNSView to capture gestures
This example is the version from Mon, 18th Mar 2018.
Project "CustomNSView to capture gestures.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Control CocoaControlMBS1 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS1 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS
n = new MyView
Return n
End EventHandler
End Control
Property n As MyView
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
Class MyView Inherits CustomNSViewMBS
EventHandler Function beginGestureWithEvent(e as NSEventMBS) As boolean
window1.List.insertRow 0, CurrentMethodName
End EventHandler
EventHandler Function endGestureWithEvent(e as NSEventMBS) As boolean
window1.List.insertRow 0, CurrentMethodName
End EventHandler
EventHandler Function magnifyWithEvent(e as NSEventMBS) As boolean
window1.List.insertRow 0, CurrentMethodName
End EventHandler
EventHandler Function rotateWithEvent(e as NSEventMBS) As boolean
window1.List.insertRow 0, CurrentMethodName
End EventHandler
EventHandler Function swipeWithEvent(e as NSEventMBS) As boolean
window1.List.insertRow 0, CurrentMethodName
End EventHandler
End Class
End Project
The items on this page are in the following plugins: MBS MacControls Plugin.