Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSViewMBS class.
NSViewMBS.RenderImage(subviews as boolean = false, flipped as boolean = false) as variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 8.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
May return nil on any error.
The value of this variant must be an object of class NSImageMBS.
Added flipped parameter for version 20.3.
Flipped was true for older versions.
Some examples using this method:
NSViewMBS.replaceSubview(oldView as NSViewMBS, newView as NSViewMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 12.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
oldView: The view to be replaced by newView. May not be nil.
newView: The view to replace oldView. May not be nil.
This method does nothing if oldView is not a subview of the receiver.
Neither oldView nor newView may be nil, and the behavior is undefined if either of these parameters is nil.
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 |
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 |
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 |
Like ScreenshotWindowMBS, but only for the view you are interested in, e.g. a map.
Returns nil on failure like out of memory.
NSViewMBS.scrollPoint(x as double, y as double) New in 24.5
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 24.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
x/y: The point in the view to scroll to.
NSViewMBS.scrollRectToVisible(rect as NSRectMBS) as Boolean New in 24.5
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 24.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
The rectangle to be made visible in the clip view.
Returns true if any scrolling is performed; otherwise returns false.
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 |
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 |
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 |
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 |
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 |
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 |
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa | MBS MacBase Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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 |
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 |
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 |
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 |
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 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 |
The items on this page are in the following plugins: MBS MacBase Plugin.