Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSViewMBS class.

NSViewMBS.compositingFilter as variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The Core Image filter used to composite the view’s contents with its background.

This property contains the compositing filter stored in the compositingFilter 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 nil, which causes content to be rendered without any special compositing effects.

We use variant here to reduce plugin dependencies. Please use with variant containing CIFilterMBS.
(Read and Write computed property)

NSViewMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a new control with size 100/100 and position 0/0

On success the handle property is not zero.

See also:

NSViewMBS.Constructor(Handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an object based on the given NSView handle.
Example
Var t as new NSTextViewMBS(0, 0, 100, 100)
Var v as new NSTextViewMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)

The handle is casted to a NSView and the plugin retains this handle.

See also:

NSViewMBS.Constructor(left as Double, top as Double, width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 7.8 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The constructor to create a new NSView.

On success handle is set.

For a toolbar, please get the view directly: self.NSToolbarMBS.toolbarView.

See also:

NSViewMBS.contentFilters as variant()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
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.convertPointFromView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a point from the coordinate system of a given view to that of the receiver.

point: A point specifying a location in the coordinate system of aView.
View: The view with aPoint in its coordinate system. If View is nil, this method instead converts from window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the point converted to the coordinate system of the receiver.

Some examples using this method:

NSViewMBS.convertPointToView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a point from the receiver's coordinate system to that of a given view.

point: A point specifying a location in the coordinate system of the receiver.
View: The view into whose coordinate system point is to be converted. If View is nil, this method instead converts to window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the point converted to the coordinate system of View.

NSViewMBS.convertRectFromView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a rectangle from the coordinate system of another view to that of the receiver.

rect: The rectangle in aView's coordinate system.
view: The view with aRect in its coordinate system. If view is nil, this method instead converts from window base coordinates. Otherwise, both view and the receiver must belong to the same NSWindow object.

Returns the converted rectangle.

NSViewMBS.convertRectToView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a rectangle from the receiver's coordinate system to that of another view.

rect: A rectangle in the receiver's coordinate system.
View: The view that is the target of the conversion operation. If View is nil, this method instead converts from window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the converted rectangle.

Some examples using this method:

NSViewMBS.convertSizeFromView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a size from another view's coordinate system to that of the receiver.

Size: The size (width and height) in aView's coordinate system.
View: The view with Size in its coordinate system. If View is nil, this method instead converts from window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the converted size, as an NSSize structure.

NSViewMBS.convertSizeToView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Converts a size from the receiver's coordinate system to that of another view.

Size: The size (width and height) in the receiver's coordinate system.
View: The view that is the target of the conversion operation. If View is nil, this method instead converts from window base coordinates. Otherwise, both View and the receiver must belong to the same NSWindow object.

Returns the converted size, as an NSSize structure.

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


The biggest plugin in space...