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
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

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
The event called when focus is set on the overlay window.

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
The key down event.

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
The key up event.

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
The event called when focus is lost on the overlay window.

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
Provide a contextual menu for Cocoa Mac.

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
This event is called when the user clicks with the mouse inside the window.

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
This event is called when the user moves the mouse over the window while the mouse is pressed.

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
This is event is called when mouse enters window.

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
This is event is called when mouse leaves window.

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
This event is called when the user moves the mouse over the window.

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
This event is called when the user releases the mousebutton inside the window.

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
This event is called when the user uses the mouse wheel inside the window.

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
This event is called whenever the size of the window changes.

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
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
This event is called when the window is hidden.

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
This event is called when the window is shown.

Cocoa support added for version 14.0.

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


The biggest plugin in space...