Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSViewMBS class.

Previous items

NSViewMBS.rotateByAngle(angle as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Rotates the receiver's bounds rectangle by a specified degree value around the origin of the coordinate system, (0.0, 0.0).

angle: A float value specifying the angle of rotation, in degrees.

See the BoundsRotation property description for more information. This method neither redisplays the receiver nor marks it as needing display. You must do this yourself with display or NeedsDisplay.

This method posts an NSViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so.

NSViewMBS.scaleUnitSquareToSize(size as NSSizeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Scales the receiver's coordinate system so that the unit square scales to the specified dimensions.

For example, a newUnitSize of (0.5, 1.0) causes the receiver's horizontal coordinates to be halved, in turn doubling the width of its bounds rectangle. Note that scaling is performed from the origin of the coordinate system, (0.0, 0.0), not the origin of the bounds rectangle; as a result, both the origin and size of the bounds rectangle are changed. The frame rectangle remains unchanged.

This method neither redisplays the receiver nor marks it as needing display. You must do this yourself with display or setNeedsDisplay.

This method posts an NSViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so.

Some examples using this method:

NSViewMBS.Screenshot as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 22.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Renders the view into a picture.

Like ScreenshotWindowMBS, but only for the view you are interested in, e.g. a map.
Returns nil on failure like out of memory.

NSViewMBS.setBackgroundFilters(Filters() as variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets an array of Core Image filters to apply to the view’s background.

This property contains an array of CIFilterMBS objects. This array represents the background filters stored in the backgroundFilters property of the view’s layer. If the view does not have a layer, setting the value of this property has no effect.
The default value of this property is an empty array.

We use variant here to reduce plugin dependencies. Please use with array of variants containing CIFilterMBS.

NSViewMBS.setBoundsOrigin(origin as NSPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the bounds origin.

See also:

NSViewMBS.setBoundsOrigin(x as Double, y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the bounds origin.

See also:

NSViewMBS.setBoundsSize(size as NSSizeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the bounds size of the nsview.

See also:

NSViewMBS.setBoundsSize(width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the bounds size of the nsview.

See also:

NSViewMBS.setContentFilters(Filters() as variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets an array of Core Image filters to apply to the contents of the view and its sublayers.

This property contains an array of CIFilterMBS objects. This array represents the filters stored in the filters property of the view’s layer. If the view does not have a layer, setting the value of this property has no effect.
The default value of this property is an empty array.

We use variant here to reduce plugin dependencies. Please use with array of variants containing CIFilterMBS.

NSViewMBS.setFocus

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Convenience function to set the focus to this view.

Calls internally makeFirstResponder on NSWindow.

NSViewMBS.setFrameOrigin(origin as NSPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the frame origin.

See also:

NSViewMBS.setFrameOrigin(x as Double, y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the frame origin.

See also:

NSViewMBS.setFrameSize(size as NSSizeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the frame size.

See also:

NSViewMBS.setFrameSize(width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the frame size.

See also:

NSViewMBS.subviews(recursive as boolean = false) as NSViewMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The immediate subviews.

The order of the subviews may be considered as being back-to-front, but this does not imply invalidation and drawing behavior. The order is based on the order of the receiver's subviews as specified in the nib file from which they were unarchived or the programmatic interface for modifying the receiver's subview list. This ordering is also the reverse of the order in which hit-testing is done.

If recursive is true, we include all subviews of all subviews. (new in 14.2)

Some examples using this method:

NSViewMBS.unregisterDraggedTypes

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Unregisters the receiver as a possible destination in a dragging session.

Previous items

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


The biggest plugin in space...