Platforms to show: All Mac Windows Linux Cross-Platform
Back to CocoaControlMBS control.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No |
CocoaControlMBS.ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 22.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
CocoaControlMBS.ContextualMenuAction(hitItem as MenuItem) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
CocoaControlMBS.EnableMenuItems
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
CocoaControlMBS.GetView as NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Return a NSView setup as you like.
You may also want to keep a reference to the view you use for easier access.
Some examples using this event:
- /MacCocoa/LevelIndicator
- /MacExtras/SpinningProgressIndicator
- /MacFrameworks/Addressbook People Picker
- /MacFrameworks/Cocoa Controls/Custom NSView
- /MacFrameworks/Cocoa Controls/SliderView
- /MacFrameworks/Cocoa Controls/TableView with scrollbars
- /MacFrameworks/TokenField
- /PDFKit/PDFView/PDFView
- /PDFKit/PDFView/PDFView customized with picture overlay
- /PDFKit/PDFView/PDFView overlay/PDFView overlay
CocoaControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:
- The Action event, if any, will not execute and the state of the object will not change.
- You will receive the MouseDrag and MouseUp events.
CocoaControlMBS.MouseDrag(x as Integer, y as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.
CocoaControlMBS.MouseUp(x as Integer, y as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Use the x and y parameters to determine if the mouse button was released within the control's boundaries.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No |
CocoaControlMBS.ScaleFactorChanged(NewFactor as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa | MBS MacFrameworks Plugin | 17.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Please invalidate any cached bitmaps or other relevant state.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.