Platforms to show: All Mac Windows Linux Cross-Platform

Back to CustomNSViewMBS class.

Next items

CustomNSViewMBS.acceptsFirstMouse(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No
Overridden by subclasses to return true if the receiver should be sent a mouseDown event for an initial mouse-down event, false if not.

The receiver can either return a value unconditionally or use the location of event e to determine whether or not it wants the event. The default implementation ignores the event and returns false.

Implement this event in a subclass to allow instances to respond to click-through. This allows the user to click on a view in an inactive window, activating the view with one click, instead of clicking first to make the window active and then clicking the view. Most view objects refuse a click-through attempt, so the event simply activates the window. Many control objects, however, such as instances of NSButton and NSSlider, do accept them, so the user can immediately manipulate the control without having to release the mouse button.

CustomNSViewMBS.acceptsFirstResponder as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
Whether to accept first responder.

Return true if your control can have the focus and false if not.

CustomNSViewMBS.becomeFirstResponder as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
Called when the object gets focus.

Return true to accept.

CustomNSViewMBS.beginGestureWithEvent(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has begun a touch gesture.

e: An event object representing the gesture beginning.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.

CustomNSViewMBS.canBecomeKeyView as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No
Returns whether the receiver can become key view.

Returns true if the receiver can become key view, false otherwise.

CustomNSViewMBS.Close

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
The event called when the custom view is destroyed.

CustomNSViewMBS.concludeDragOperation(sender as NSDraggingInfoMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked when the dragging operation is complete, signaling the receiver to perform any necessary clean-up.

sender: The object sending the message; use it to get details about the dragging operation.

For this method to be invoked, the previous performDragOperation must have returned true.

The destination implements this method to perform any tidying up that it needs to do, such as updating its visual representation now that it has incorporated the dragged data. This message is the last message sent from sender to the destination during a dragging session.

If the sender object's animatesToDestination property was set to true in prepareForDragOperation, then the drag image is still visible. At this point you should draw the final visual representation in the view. When this method returns, the drag image is removed form the screen. If your final visual representation matches the visual representation in the drag, this is a seamless transition.

CustomNSViewMBS.draggingEnded(sender as NSDraggingInfoMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Implement this event to be notified when a drag operation ends in some other destination.

sender: The object sending the message; use it to get details about the dragging operation.

This method might be used by a destination doing auto-expansion in order to collapse any auto-expands.

CustomNSViewMBS.draggingEntered(sender as NSDraggingInfoMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked when the dragged image enters destination bounds or frame; delegate returns dragging operation to perform.

sender: The object sending the message; use it to get details about the dragging operation.

Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is the value returned by the previous draggingEntered message.

Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer enters the destination's bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).

This method must return a value that indicates which dragging operation the destination will perform when the image is released. In deciding which dragging operation to return, the method should evaluate the overlap between both the dragging operations allowed by the source (obtained from sender with the draggingSourceOperationMask method) and the dragging operations and pasteboard data types the destination itself supports.

If none of the operations is appropriate, this method should return NSDragOperationNone (this is the default response if the method is not implemented by the destination). A destination will still receive draggingUpdated and draggingExited even if NSDragOperationNone is returned by this method.

CustomNSViewMBS.draggingExited(sender as NSDraggingInfoMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked when the dragged image exits the destination's bounds rectangle (in the case of a view object) or its frame rectangle (in the case of a window object).

sender: The object sending the message; use it to get details about the dragging operation.

CustomNSViewMBS.draggingSessionEndedAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS, operation as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked when the dragging session has completed.

session: The dragging session.
screenPoint: The point where the drag ended, in screen coordinates.
operation: The drag operation. See constants for drag operation types.

Available in OS X v10.7 and later.

CustomNSViewMBS.draggingSessionMovedToPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked when the drag moves on the screen.

session: The dragging session.
screenPoint: The point where the drag moved to, in screen coordinates.

Available in OS X v10.7 and later.

CustomNSViewMBS.draggingSessionSourceOperationMaskForDraggingContext(session as NSDraggingSessionMBS, context as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Declares the types of operations the source allows to be performed. (required)

session: The dragging session.
context: The dragging context. See NSDraggingContext constants for the supported values.

Return the appropriate dragging operation as defined in constants.

In the future Apple may provide more specific "within" values in the future. To account for this, for unrecognized localities, return the operation mask for the most specific context that you are concerned with.

CustomNSViewMBS.draggingSessionWillBeginAtPoint(session as NSDraggingSessionMBS, screenPoint as NSPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked when the drag will begin.

session: The dragging session.
screenPoint: The point where the drag will begin, in screen coordinates.

Available in OS X v10.7 and later.

CustomNSViewMBS.draggingUpdated(sender as NSDraggingInfoMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked periodically as the image is held within the destination area, allowing modification of the dragging operation or mouse-pointer position.

sender: The object sending the message; use it to get details about the dragging operation.

Return one (and only one) of the dragging operation constants described in NSDragOperation in the NSDraggingInfo reference. The default return value (if this method is not implemented by the destination) is the value returned by the previous draggingEntered message.

For this to be invoked, the destination must have registered for the pasteboard data type involved in the drag operation. The messages continue until the image is either released or dragged out of the window or view.

This method provides the destination with an opportunity to modify the dragging operation depending on the position of the mouse pointer inside of the destination view or window object. For example, you may have several graphics or areas of text contained within the same view and wish to tailor the dragging operation, or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the time when the user releases the dragged image and the performDragOperation method is invoked.

You typically examine the contents of the pasteboard in the draggingEntered method, where this examination is performed only once, rather than in the draggingUpdated method, which is invoked multiple times.

Only one destination at a time receives a sequence of draggingUpdated messages. If the mouse pointer is within the bounds of two overlapping views that are both valid destinations, the uppermost view receives these messages until the image is either released or dragged out.

CustomNSViewMBS.drawFocusRingMask(g as NSGraphicsMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Draw the focus ring mask for the view.

If false is returned, the default method from NSView class runs.

This method provides the shape of the focus ring mask by drawing the focus ring mask. An implementation of this method should draw in the view's interior (bounds) coordinate space, that the focus ring style has been set (it will be set it to NSFocusRingOnly to capture the focus ring itself), and that the fill and stroke colors have been set to an arbitrary fully opaque color.

Subclasses that find the default behavior insufficient should only draw the focus ring shape.

The NSView default implementation of this method simply fills self.bounds.
Available in Mac OS X v10.7 and later.

Please use NSGraphicsMBS class for drawing.

CustomNSViewMBS.DrawRect(g as NSGraphicsMBS, left as Double, top as Double, width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
The paint event with the rectangle which needs to be redrawn.

CustomNSViewMBS.endGestureWithEvent(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has ended a touch gesture.

e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.

CustomNSViewMBS.focusRingMaskBounds as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Returns the focus ring mask bounds.

Return nil to run default NSView method.

Return a rectangle containing the mask in the view's interior (bounds) coordinate space.

The mask bounds allows the focus ring's overall size and position to be determined before it is drawn.
Subclasses must override this method if they require the display of a focus ring.
The NSView default implementation of this method simply returns NSRectMBS.Zero.

Note: The information provided by focusRingMaskBounds will enable Accessibility to identify selected subelements for zoom tracking, so it is important that this method provide a reasonably tight bounding box and that noteFocusRingMaskChanged is invoked as described.

CustomNSViewMBS.ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Returns whether the modifier keys will be ignored for this dragging session.

session: The dragging session.

Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.

CustomNSViewMBS.isFlipped as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No
The event to return a boolean value indicating whether the view uses a flipped coordinate system.

The default value of this property is false, which results in a non-flipped coordinate system. In a non-flipped coordinate system, the origin is in the lower-left corner of the view and positive y-values extend upward. In a flipped coordinate system, the origin is in the upper-left corner of the view and y-values extend downward. X-values always extend to the right.

If you want your view to use a flipped coordinate system, override this property and return true.

CustomNSViewMBS.isOpaque as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
Whether this view is opaque.

CustomNSViewMBS.keyDown(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the key events.

Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first responder and receive key events.

CustomNSViewMBS.keyUp(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the key events.

Return true if you handled this event.
Please return true in becomeFirstResponder and acceptsFirstResponder, so your nsview can become first responder and receive key events.

CustomNSViewMBS.magnifyWithEvent(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has begun a pinch gesture.

e: An event object representing the magnify gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.

CustomNSViewMBS.menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Overridden by subclasses to return a context-sensitive pop-up menu for a given mouse-down event.

theEvent: An object representing a mouse-down event.
defaultMenu: The menu as constructed by super class.

The receiver can use information in the mouse event, such as its location over a particular element of the receiver, to determine what kind of menu to return. For example, a text object might display a text-editing menu when the cursor lies over text and a menu for changing graphics attributes when the cursor lies over an embedded image.

The default implementation returns the default menu.

CustomNSViewMBS.mouseDown(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.mouseDownCanMoveWindow as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No
This event is called so you can decide what happens with mouse down.

Return true if you do not need to handle a mouse down and it can pass through to superviews; False if you need to handle the mouse down.

This allows iApp-type applications to determine the region by which a window can be moved. By default, this method returns false if the view is opaque; otherwise, it returns true. Subclasses can override this method to return a different value.

CustomNSViewMBS.mouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.mouseEntered(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.mouseExited(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.mouseMoved(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.mouseUp(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.Open

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
The event called when the custom NSView is created.

CustomNSViewMBS.otherMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.
Third mouse button.

CustomNSViewMBS.otherMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.
Third mouse button.

CustomNSViewMBS.otherMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.
Third mouse button.

CustomNSViewMBS.performDragOperation(sender as NSDraggingInfoMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked after the released image has been removed from the screen, signaling the receiver to import the pasteboard data.

sender: The object sending the message; use it to get details about the dragging operation.

Return if the destination accepts the data, it returns true; otherwise it returns false. The default is to return false.

For this method to be invoked, the previous prepareForDragOperation message must have returned true. The destination should implement this method to do the real work of importing the pasteboard data represented by the image.

If the sender object's animatesToDestination was set to true in prepareForDragOperation, then setup any animation to arrange space for the drag items to animate to. Also at this time, enumerate through the dragging items to set their destination frames and destination images.

CustomNSViewMBS.prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked when the image is released, allowing the receiver to agree to or refuse drag operation.

sender: The object sending the message; use it to get details about the dragging operation.
Returns true if the receiver agrees to perform the drag operation and false if not.
This method is invoked only if the most recent draggingEntered or draggingUpdated message returned an acceptable drag-operation value.
If you want the drag items to animate from their current location on screen to their final location in your view, set the sender object's animatesToDestination property to true in your implementation of this method.

CustomNSViewMBS.pressureChange(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 15.1 ✅ Yes ❌ No ❌ No ❌ No
Informs the current object that a pressure change occurred on a system that supports pressure sensitivity.

This method is invoked automatically in response to user actions. event is the event that initiated the change in pressure.
Available in OS X v10.10.3 and later.

CustomNSViewMBS.resignFirstResponder as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
Focus is going away.

Return true to accept.

CustomNSViewMBS.rightMouseDown(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.rightMouseDragged(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.rightMouseUp(e as NSEventMBS, x as Double, y as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No
One of the mouse events.

Return true if you handled this event.

CustomNSViewMBS.rotateWithEvent(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has begun a rotation gesture.

e: An event object representing the rotate gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.

CustomNSViewMBS.scrollWheel(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 12.0 ✅ Yes ❌ No ❌ No ❌ No
Informs the subclass that the mouse's scroll wheel has moved.

e: An object encapsulating information about the wheel-scrolling event.

The default implementation simply passes this message to the next responder.
Return true to not pass the event.

CustomNSViewMBS.swipeWithEvent(e as NSEventMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No
Informs the receiver that the user has begun a swipe gesture.

e: An event object representing the swipe gesture.
The event will be sent to the view under the touch in the key window.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.

CustomNSViewMBS.updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Cocoa Controls MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No
Invoked when the dragging images should be changed.

sender: The object sending the message; use this object to get details about the dragging operation.

While a destination may change the dragging images at any time, it is recommended to wait until this method is called before updating the dragging images.

This allows the system to delay changing the dragging images until it is likely that the user will drop on this destination. Otherwise, the dragging images will change too often during the drag which would be distracting to the user.

Next items

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


The biggest plugin in space...