Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/NSCursor Test


Required plugins for this example: MBS MacCocoa Plugin, MBS MacBase Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/NSCursor Test

This example is the version from Sun, 17th Mar 2012.

Project "NSCursor Test.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.arrowCursor End EventHandler
End Control
Control GroupBox1 Inherits GroupBox
ControlInstance GroupBox1 Inherits GroupBox
End Control
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() dim c as NSCursorMBS dim p as Picture dim s as string c=NSCursorMBS.currentCursor if c<>nil then p=c.image.CopyPictureWithMask s="Hotspot: "+str(c.hotSpotX)+"/"+str(c.hotSpotY) end if if p<>canvas1.Backdrop then canvas1.Backdrop=p end if if s<>StaticText1.text then StaticText1.text=s end if End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.IBeamCursor End EventHandler
End Control
Control PushButton3 Inherits PushButton
ControlInstance PushButton3 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.pointingHandCursor End EventHandler
End Control
Control PushButton4 Inherits PushButton
ControlInstance PushButton4 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.closedHandCursor End EventHandler
End Control
Control PushButton5 Inherits PushButton
ControlInstance PushButton5 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.openHandCursor End EventHandler
End Control
Control PushButton6 Inherits PushButton
ControlInstance PushButton6 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.resizeLeftCursor End EventHandler
End Control
Control PushButton7 Inherits PushButton
ControlInstance PushButton7 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.resizeRightCursor End EventHandler
End Control
Control PushButton8 Inherits PushButton
ControlInstance PushButton8 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.resizeLeftRightCursor End EventHandler
End Control
Control PushButton9 Inherits PushButton
ControlInstance PushButton9 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.resizeUpCursor End EventHandler
End Control
Control PushButton10 Inherits PushButton
ControlInstance PushButton10 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.resizeDownCursor End EventHandler
End Control
Control PushButton11 Inherits PushButton
ControlInstance PushButton11 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.resizeUpDownCursor End EventHandler
End Control
Control PushButton12 Inherits PushButton
ControlInstance PushButton12 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.crosshairCursor End EventHandler
End Control
Control PushButton13 Inherits PushButton
ControlInstance PushButton13 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.disappearingItemCursor End EventHandler
End Control
Control PushButton14 Inherits PushButton
ControlInstance PushButton14 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.ringCursorWithDiameter(10) End EventHandler
End Control
Control PushButton15 Inherits PushButton
ControlInstance PushButton15 Inherits PushButton
EventHandler Sub Action() set NSCursorMBS.ringCursorWithDiameter(50) End EventHandler
End Control
Sub set(p as nscursorMBS) if p<>Nil then p.set else beep end if End Sub
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

The items on this page are in the following plugins: MBS MacCocoa Plugin.


The biggest plugin in space...