Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

NSViewMBS.noteFocusRingMaskChanged
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.3 Yes No No Yes, macOS only No
Function: Invoked to notify the view that the focus ring mask requires updating.
Notes:
It is important to note that it is only necessary for developers to invoke this method when some internal state change of their application, that the Application Kit can't determine, affects the shape of the focus ring mask.

It is assumed that if the view is marked as needing display, or is resized, its focus ring shape is likely to have changed, and there is no need for clients to explicitly send this message in such cases, they are handled automatically.

If, however, a view is showing a focus ring around some part of its content (an NSImage, perhaps), and that content changes, the client must provide notification by invoking this method so that focusRingMaskBounds and drawFocusRingMask will be invoked to redraw the focus ring.
Available in Mac OS X v10.7 and later.

Feedback, Comments & Corrections

NSViewMBS.pageFooter as NSAttributedStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns a default footer string that includes the current page number and page count.
Notes:
A printable view class can override this method to substitute its own content in place of the default value. You should not need to call this method directly. The printing system calls it once per page during printing.

Footers are generated only if the user defaults contain the key NSPrintHeaderAndFooter with the value true.

Feedback, Comments & Corrections

NSViewMBS.pageHeader as NSAttributedStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.4 Yes No No Yes, macOS only No
Function: Returns a default header string that includes the print job title and date.
Notes:
Typically, the print job title is the same as the window title. A printable view class can override this method to substitute its own content in place of the default value. You should not need to call this method directly. The printing system calls it once per page during printing.

Headers are generated only if the user defaults contain the key NSPrintHeaderAndFooter with the value true.

Feedback, Comments & Corrections

NSViewMBS.previousKeyView as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 13.2 Yes No No Yes, macOS only No
Function: Returns the view object preceding the receiver in the key view loop.
Notes:
This view should, if possible, be made first responder when the user navigates backward from the receiver using keyboard interface control.
Returns nil on any error.

Feedback, Comments & Corrections

NSViewMBS.previousValidKeyView as NSViewMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 13.2 Yes No No Yes, macOS only No
Function: Returns the closest view object in the key view loop that precedes the receiver and accepts first responder status.
Notes:
This method ignores hidden views when it determines the previous valid key view.
Returns nil on any error.

Feedback, Comments & Corrections

NSViewMBS.print
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.4 Yes No No Yes, macOS only No
Function: This action method opens the Print panel, and if the user chooses an option other than canceling, prints the receiver and all its subviews to the device specified in the Print panel.

Feedback, Comments & Corrections

NSViewMBS.registeredDraggedTypes as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.1 Yes No No Yes, macOS only No
Function: Returns the array of pasteboard drag types that the view can accep
Example:
// we register some types
Listbox1.AcceptPictureDrop
Listbox1.AcceptTextDrop

// and query them:
MsgBox Join(Listbox1.NSViewMBS.registeredDraggedTypes, EndOfLine)

' shows:
'NeXT TIFF v4.0 pasteboard type
'com.apple.traditional-mac-plain-text
'NSStringPboardType
Notes: This method returns the types registered by calling registerForDraggedTypes:. Each element of the array is a uniform type identifier. The returned elements are in no particular order, but the array is guaranteed not to contain duplicate entries.

Feedback, Comments & Corrections

NSViewMBS.registerForDraggedTypes(Types() as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.1 Yes No No Yes, macOS only No
Function: Registers the pasteboard types that the receiver will accept as the destination of an image-dragging session.
Notes:
Types: An array of uniform type identifiers. See Types for Standard Data (Mac OS X 10.6 and later) for descriptions of the pasteboard type identifiers.

Registering an NSView object for dragged types automatically makes it a candidate destination object for a dragging session. As such, it must properly implement some or all of the NSDraggingDestination protocol methods. As a convenience, NSView provides default implementations of these methods. See the NSDraggingDestination protocol specification for details.

Real Studio with Cocoa target implements the methods listed above. So this method is useful to change the allowed types for the case the framework has a bug.

Feedback, Comments & Corrections

NSViewMBS.removeAllToolTips
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.0 Yes No No Yes, macOS only No
Function: Removes all tool tips assigned to the receiver.

Feedback, Comments & Corrections

NSViewMBS.removeFromSuperview
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 8.0 Yes No No Yes, macOS only No
Function: Unlinks the view from its superview and its window, removes it from the responder chain, and invalidates its cursor rectangles.

Feedback, Comments & Corrections

NSViewMBS.removeFromSuperviewWithoutNeedingDisplay
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.0 Yes No No Yes, macOS only No
Function: Unlinks the receiver from its superview and its window and removes it from the responder chain, but does not invalidate its cursor rectangles to cause redrawing.
Notes:
The receiver is also released; if you plan to reuse it, be sure to retain it before sending this message and to release it as appropriate when adding it as a subview of another view.

Unlike its counterpart, removeFromSuperview, this method can be safely invoked during display.

Feedback, Comments & Corrections

NSViewMBS.RenderImage(subviews as boolean=false) as Variant
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 8.5 Yes No No Yes, macOS only No
Function: Renders a picture of the view.
Example:
dim n as new NSProgressIndicatorMBS
n.sizeToFit

dim image as NSImageMBS = n.RenderImage
dim pic as Picture = image.CopyPicture

Backdrop = pic
Notes:
May return nil on any error.
The value of this variant must be an object of class NSImageMBS.

Feedback, Comments & Corrections

NSViewMBS.replaceSubview(oldView as NSViewMBS, newView as NSViewMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 12.0 Yes No No Yes, macOS only No
Function: Replaces one of the receiver's subviews with another view.
Notes:
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.

Feedback, Comments & Corrections

NSViewMBS.rotateByAngle(angle as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 13.1 Yes No No Yes, macOS only No
Function: Rotates the receiver's bounds rectangle by a specified degree value around the origin of the coordinate system, (0.0, 0.0).
Notes:
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.

Feedback, Comments & Corrections

NSViewMBS.scaleUnitSquareToSize(size as NSSizeMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.0 Yes No No Yes, macOS only No
Function: Scales the receiver's coordinate system so that the unit square scales to the specified dimensions.
Notes:
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.

Feedback, Comments & Corrections

NSViewMBS.setBackgroundFilters(Filters() as variant)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 18.4 Yes No No Yes, macOS only No
Function: Sets an array of Core Image filters to apply to the view’s background.
Notes:
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.

Feedback, Comments & Corrections

NSViewMBS.setBoundsOrigin(origin as NSPointMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.2 Yes No No Yes, macOS only No
Function: Sets the bounds origin.

See also:

Feedback, Comments & Corrections

NSViewMBS.setBoundsOrigin(x as Double, y as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the bounds origin.

See also:

Feedback, Comments & Corrections

NSViewMBS.setBoundsSize(size as NSSizeMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.2 Yes No No Yes, macOS only No
Function: Sets the bounds size of the nsview.

See also:

Feedback, Comments & Corrections

NSViewMBS.setBoundsSize(width as Double, height as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the bounds size of the nsview.

See also:

Feedback, Comments & Corrections

NSViewMBS.setContentFilters(Filters() as variant)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 18.4 Yes No No Yes, macOS only No
Function: Sets an array of Core Image filters to apply to the contents of the view and its sublayers.
Notes:
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.

Feedback, Comments & Corrections

NSViewMBS.setFocus
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 13.2 Yes No No Yes, macOS only No
Function: Convenience function to set the focus to this view.
Notes: Calls internally makeFirstResponder on NSWindow.

Feedback, Comments & Corrections

NSViewMBS.setFrameOrigin(origin as NSPointMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.2 Yes No No Yes, macOS only No
Function: Sets the frame origin.

See also:

Feedback, Comments & Corrections

NSViewMBS.setFrameOrigin(x as Double, y as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the frame origin.

See also:

Feedback, Comments & Corrections

NSViewMBS.setFrameSize(size as NSSizeMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.2 Yes No No Yes, macOS only No
Function: Sets the frame size.

See also:

Feedback, Comments & Corrections

NSViewMBS.setFrameSize(width as Double, height as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 7.7 Yes No No Yes, macOS only No
Function: Sets the frame size.

See also:

Feedback, Comments & Corrections

NSViewMBS.subviews(recursive as boolean = false) as NSViewMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 9.6 Yes No No Yes, macOS only No
Function: The immediate subviews.
Notes:
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)

Feedback, Comments & Corrections

NSViewMBS.unregisterDraggedTypes
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa MBS MacBase Plugin 11.1 Yes No No Yes, macOS only No
Function: Unregisters the receiver as a possible destination in a dragging session.

Feedback, Comments & Corrections

Previous items

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




Links
MBS Xojo PDF Plugins