Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSCursorMBS.Constructor(image as NSImageMBS, foregroundColorHint as NSColorMBS, backgroundColorHint as NSColorMBS, HotSpotX as Double, HotSpotY as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Initializes the cursor with the specified image and hot spot.

See also:

Feedback, Comments & Corrections

NSCursorMBS.Constructor(image as NSImageMBS, HotSpotX as Double, HotSpotY as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Initializes the cursor with the specified image and hot spot.

See also:

Feedback, Comments & Corrections

NSCursorMBS.hotSpotX as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Returns the position of the cursor's hot spot.
Example:
// shows cursor in window
dim c as NSCursorMBS = NSCursorMBS.arrowCursor

MsgBox str(c.hotSpotX)+"/"+str(c.hotSpotY)
Notes:
The point describing the position of the hot spot, specified according to the cursor's flipped coordinate system.

For a more complete explanation, see the class description.

Note that an NSCursor object is immutable: you cannot change its hot spot after it's created. Instead, use the Constructor to create a new cursor with the new settings.

Feedback, Comments & Corrections

NSCursorMBS.hotSpotY as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Returns the position of the cursor's hot spot.
Example:
// shows cursor in window
dim c as NSCursorMBS = NSCursorMBS.arrowCursor

MsgBox str(c.hotSpotX)+"/"+str(c.hotSpotY)
Notes:
The point describing the position of the hot spot, specified according to the cursor's flipped coordinate system.

For a more complete explanation, see the class description.

Note that an NSCursor object is immutable: you cannot change its hot spot after it's created. Instead, use the Constructor to create a new cursor with the new settings.

Feedback, Comments & Corrections

NSCursorMBS.image as NSImageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Returns the receiver's image.
Example:
// shows cursor in window
dim c as NSCursorMBS = NSCursorMBS.arrowCursor
dim i as NSImageMBS = c.image
window1.Backdrop=i.CopyPictureWithMask
Notes:
The cursor image or nil if none exists

Note that an NSCursor object is immutable: you cannot change its image after it's created. Instead, use the constructor to create a new cursor with the new settings.

Feedback, Comments & Corrections

NSCursorMBS.isSetOnMouseEntered as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Returns a Boolean value indicating whether the receiver becomes current on receiving a mouseEntered message.
Notes:
True if the receiver will become current when it receives a mouseEntered message; otherwise, false.

To receive such a message, the receiver must first be assigned a cursor rectangle. This assignment can be made using the NSView method addCursorRect. For a more complete explanation, see the class description.

Feedback, Comments & Corrections

NSCursorMBS.isSetOnMouseExited as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Returns a Boolean value indicating whether the receiver becomes current when it receives a mouseExited: message.
Notes:
True if the receiver becomes current when it receives a mouseExited: message; otherwise, false.

To receive such a message, the receiver must first be assigned a cursor rectangle. This assignment can be made using the NSView method addCursorRect. For a more complete explanation, see the class description.

Feedback, Comments & Corrections

NSCursorMBS.mouseEntered(e as NSEventMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Automatically sent to the receiver when the cursor enters a cursor rectangle owned by the receiver.
Notes:
If used after setOnMouseEntered has been called with an argument of true, mouseEntered can make the receiver the current cursor.

In your programs, you won't invoke mouseEntered explicitly. It's only included in the class interface so you can override it.

For a more complete explanation, see "Handling Tracking-Rectangle and Cursor-Update Events in Views" and the NSView method addTrackingRect

Feedback, Comments & Corrections

NSCursorMBS.mouseExited(e as NSEventMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Automatically sent to the receiver when the cursor exits a cursor rectangle owned by the receiver.
Notes:
Like mouseEntered, this message is part of the class interface only so you can override it.

For a more complete explanation, see "Handling Tracking-Rectangle and Cursor-Update Events in Views" and the NSView method addTrackingRect.

Feedback, Comments & Corrections

NSCursorMBS.pop
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Sends a pop message to the receiver's class.

See also:

Feedback, Comments & Corrections

NSCursorMBS.push
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Puts the receiver on top of the cursor stack and makes it the current cursor.

Feedback, Comments & Corrections

NSCursorMBS.set
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Makes the receiver the current cursor.
Notes: If your application is not the front application, the system will ignore this set message!

Feedback, Comments & Corrections

NSCursorMBS.setOnMouseEntered(flag as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: pecifies whether the receiver accepts mouseEntered: events.
Notes:
True if the receiver accepts future mouseEntered event messages; otherwise it ignores them.

Accepting mouseEntered event messages allows the cursor to be made the current cursor when the cursor enters a view's cursor rectangle.

Feedback, Comments & Corrections

NSCursorMBS.setOnMouseExited(flag as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Sets whether the receiver accepts mouseExited events.
Notes:
flag: True if the receiver accepts future mouseExited: event messages; otherwise it ignores them.

Accepting mouseExited event messages allows the cursor to be made the current cursor when the cursor exits a view's cursor rectangle.

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins