Platforms to show: All Mac Windows Linux Cross-Platform

Back to OverlayMBS class.

OverlayMBS.Draw(CGContext as Variant, NSGraphicsContext as Variant)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 18.4 ✅ Yes ❌ No ❌ No ❌ No
Function: Draws the content of the window.
Example:
Sub Draw(CGContext as Variant, NSGraphicsContext as Variant)
dim c as CGContextMBS = CGContext
dim n as NSGraphicsMBS = NSGraphicsContext
// draw here
End Sub
Notes:
The drawing area is cleared for you.
Please put the given parameters in the local variables with correct type.
We use variants here to reduce plugin dependencies.

With version 19.5, the don't clear content anymore for you, so you may need to call ClearRect if needed.
OverlayMBS.GotFocus
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 17.4 ✅ Yes ✅ Yes ❌ No ❌ No
Function: The event called when focus is set on the overlay window.
Notes: Works for Windows and macOS Cocoa.
OverlayMBS.KeyDown(key as String, keyCode as Integer, modifiers as integer) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 17.4 ✅ Yes ✅ Yes ❌ No ❌ No
Function: The key down event.
Notes:
The plugin translates keycodes into key as text, but also provides keycode and modifier flags.
Works for Windows and macOS Cocoa.
OverlayMBS.KeyUp(key as String, keyCode as Integer, modifiers as integer) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 17.4 ✅ Yes ✅ Yes ❌ No ❌ No
Function: The key up event.
Notes:
The plugin translates keycodes into key as text, but also provides keycode and modifier flags.
Works for Windows and macOS Cocoa.
OverlayMBS.LostFocus
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 17.4 ✅ Yes ✅ Yes ❌ No ❌ No
Function: The event called when focus is lost on the overlay window.
Notes: Works for Windows and macOS Cocoa.
OverlayMBS.menuForEvent(NSEvent as variant) as Variant
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 17.3 ✅ Yes ❌ No ❌ No ❌ No
Function: Provide a contextual menu for Cocoa Mac.
Notes:
NSEvent is an NSEventMBS object.
Please return NSMenuMBS object. (and please keep a reference somewhere)
OverlayMBS.MouseDown(x as Integer, y as Integer, modifiers as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This event is called when the user clicks with the mouse inside the window.
Notes:
Return true if you handled this event.
modifiers: Platform dependent keyboard modifiers. Different values for Carbon, Cocoa and Windows!

For Cocoa to set mouse cursor, please use NSCursorMBS class.
OverlayMBS.MouseDragged(x as Integer, y as Integer, modifiers as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This event is called when the user moves the mouse over the window while the mouse is pressed.
Notes:
Return true if you handled this event.
modifiers: Platform dependent keyboard modifiers. Different values for Carbon, Cocoa and Windows!

For Cocoa to set mouse cursor, please use NSCursorMBS class.
OverlayMBS.MouseEnter(x as Integer, y as Integer, modifiers as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 13.0 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This is event is called when mouse enters window.
Notes:
modifiers: Platform dependent keyboard modifiers. Different values for Carbon, Cocoa and Windows!

For Cocoa to set mouse cursor, please use NSCursorMBS class.

Some examples using this event:

OverlayMBS.MouseExit(x as Integer, y as Integer, modifiers as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 13.0 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This is event is called when mouse leaves window.
Notes:
modifiers: Platform dependent keyboard modifiers. Different values for Carbon, Cocoa and Windows!

For Cocoa to set mouse cursor, please use NSCursorMBS class.

Some examples using this event:

OverlayMBS.MouseMoved(x as Integer, y as Integer, modifiers as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This event is called when the user moves the mouse over the window.
Notes:
Return true if you handled this event.
modifiers: Platform dependent keyboard modifiers. Different values for Carbon, Cocoa and Windows!

For Cocoa to set mouse cursor, please use NSCursorMBS class.
OverlayMBS.MouseUp(x as Integer, y as Integer, modifiers as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This event is called when the user releases the mousebutton inside the window.
Notes:
Return true if you handled this event.

modifiers: Platform dependent keyboard modifiers. Different values for Carbon, Cocoa and Windows!

For Cocoa to set mouse cursor, please use NSCursorMBS class.
OverlayMBS.MouseWheel(x as Integer, y as Integer, dx as Double, dy as Double, modifiers as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ❌ No
Function: This event is called when the user uses the mouse wheel inside the window.
Notes:
modifiers: Platform dependent keyboard modifiers. Different values for Carbon, Cocoa and Windows!

For Cocoa to set mouse cursor, please use NSCursorMBS class.

Some examples using this event:

OverlayMBS.WindowBoundsChanged
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This event is called whenever the size of the window changes.
Notes: Can also be called on position changes.

Some examples using this event:

OverlayMBS.WindowClosed
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This event is called when the window is closed.

Some examples using this event:

OverlayMBS.WindowHidden
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This event is called when the window is hidden.
Notes: Cocoa support added for version 14.0.
OverlayMBS.WindowShown
Type Topic Plugin Version macOS Windows Linux iOS Targets
event Window MBS Overlay Plugin 8.6 ✅ Yes ✅ Yes ❌ No ❌ No
Function: This event is called when the window is shown.
Notes: Cocoa support added for version 14.0.

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


💬 Ask a question or report a problem
The biggest plugin in space...


Start Chat