Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSViewControlMBS control.
NSViewControlMBS.acceptsFirstMouse(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.acceptsFirstResponder as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if your control can have the focus and false if not.
NSViewControlMBS.becomeFirstResponder as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true to accept.
NSViewControlMBS.beginGestureWithEvent(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.canBecomeKeyView as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns true if the receiver can become key view, false otherwise.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Renamed to Closed in plugin version 20.5. Used to be named Close.
NSViewControlMBS.concludeDragOperation(sender as NSDraggingInfoMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSViewControlMBS.ContextualMenuAction(hitItem as MenuItem) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This allows the control to react on its relevant menu items. Please return true if you handled it or false to give others a chance.
NSViewControlMBS.EnableMenuItems
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSViewControlMBS.endGestureWithEvent(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
e: An event object representing the gesture end.
Available in Mac OS X v10.6 and later.
Return true if you handled this event.
NSViewControlMBS.focusRingMaskBounds as NSRectMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.ignoreModifierKeysForDraggingSession(session as NSDraggingSessionMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
session: The dragging session.
Return true if the modifier keys will be ignored, false otherwise.
Available in OS X v10.7 and later.
NSViewControlMBS.isFlipped as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 24.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.isOpaque as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSViewControlMBS.keyDown(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.keyUp(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.magnifyWithEvent(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.menuForEvent(e as NSEventMBS, defaultMenu as NSMenuMBS) as NSMenuMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
NSViewControlMBS.mouseDownCanMoveWindow as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Renamed to Opened in plugin version 20.5. Used to be named Open.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
Third mouse button.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
Third mouse button.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
Third mouse button.
NSViewControlMBS.performDragOperation(sender as NSDraggingInfoMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.prepareForDragOperation(sender as NSDraggingInfoMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.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 | Desktop only |
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.
NSViewControlMBS.resignFirstResponder as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true to accept.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
NSViewControlMBS.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 | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if you handled this event.
NSViewControlMBS.rotateWithEvent(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.ScaleFactorChanged(NewFactor as Double)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Please invalidate any cached bitmaps or other relevant state.
NSViewControlMBS.scrollWheel(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.swipeWithEvent(e as NSEventMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.updateDraggingItemsForDrag(sender as NSDraggingInfoMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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.
NSViewControlMBS.viewDidMoveToWindow
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The default implementation does nothing; subclasses can implement this event to perform whatever actions are necessary.
window may return nil when this method is invoked, indicating that the receiver does not currently reside in any window. This occurs when the receiver has just been removed from its superview or when the receiver has just been added to a superview that does not itself have a window. Overrides of this method may choose to ignore such cases if they are not of interest.
NSViewControlMBS.wantsPeriodicDraggingUpdates as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| event | Cocoa Controls | MBS MacControls Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return true if the destination wants to receive periodic draggingUpdated messages, false otherwise.
If the destination returns false, these messages are sent only when the mouse moves or a modifier flag changes. Otherwise the destination gets the default behavior, where it receives periodic dragging-updated messages even if nothing changes.
The items on this page are in the following plugins: MBS MacControls Plugin.