Platforms to show: All Mac Windows Linux Cross-Platform

Back to DesktopSCNControlMBS control.

DesktopSCNControlMBS.BoundsChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The event called when the bounds, but not the frame, changed.

DesktopSCNControlMBS.Closing

Type Topic Version
event SceneKit 21.5

The control is about to close.
In older Xojo versions, this event is named Close.

DesktopSCNControlMBS.ConstructContextualMenu(base as DesktopMenuItem, x as Integer, y as Integer) As Boolean

Type Topic Version
event SceneKit 22.1
This event is called when it is appropriate to display a contextual menu for the control.

DesktopSCNControlMBS.ContextualMenuItemSelected(selectedItem As DesktopMenuItem) As Boolean

Type Topic Version
event SceneKit 21.5
Called when a menuitem is choosen.

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.

DesktopSCNControlMBS.didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No
Did close contextual menu.

Allows you to restart any animation you may have stopped in the willShowContextualMenu event.

DesktopSCNControlMBS.FocusLost

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No

The control lost focus.
In older Xojo versions, this event is named LostFocus.

This only fires if the control itself lost focus and not a sub control.

DesktopSCNControlMBS.FocusReceived

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No

The control itself got focus.
In older Xojo versions, this event is named GotFocus.

This only fires if the control itself got focus and not a sub control.

DesktopSCNControlMBS.FrameChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The event called when the frame changed.

This event notifies you, that the control changed it's bounding frame, which is position and/or size.

DesktopSCNControlMBS.MenuBarSelected

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No

The event where you can enable menu items.
In older Xojo versions, this event is named EnableMenuItems.

DesktopSCNControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The mouse button was pressed inside the control’s region at the location passed in to x, y.

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.
If you return False, the system handles the MouseDown so the above event handlers do not get called.

DesktopSCNControlMBS.MouseDrag(x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
This event fires continuously after the mouse button was pressed inside the Control.

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.

DesktopSCNControlMBS.MouseUp(x As Integer, y As Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The mouse button was released.

Use the x and y parameters to determine if the mouse button was released within the control's boundaries.

DesktopSCNControlMBS.Opening

Type Topic Version
event SceneKit 21.5

The control is about to was created and you can initialize it.
In older Xojo versions, this event is named Open.

DesktopSCNControlMBS.rendererDidApplyAnimations(time as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Tells the control to perform any updates that need to occur after actions and animations are evaluated.

time: The current system time, in seconds. Use this parameter for any time-based elements of your game logic.

SceneKit calls this method exactly once per frame, so long as the SCNViewMBS object (or other SCNSceneRenderer object) displaying the scene is not paused.

Implement this method to add game logic to the rendering loop. Any changes you make to the scene graph during this method are immediately reflected in the displayed scene. That is, SceneKit immediately updates the hierarchy of presentation nodes it uses to render the scene (instead of using the SCNTransactionMBS class to “batch” your changes).

DesktopSCNControlMBS.rendererDidApplyConstraints(time as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Invoked on the control once the scene renderer did apply the constraints.

time The time at which the constraints were simulated.

All modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.

DesktopSCNControlMBS.rendererDidRenderScene(scene as SCNSceneMBS, time as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Tells the control that the renderer has rendered the scene.

scene: The scene object that was rendered.
time: The current system time, in seconds. If your custom rendering involves animation, use this parameter to compute your own animation state.

Implement this method to perform custom drawing after SceneKit has rendered a scene—for example, to draw overlay content on top of SceneKit content. You should only execute Metal or OpenGL drawing commands (and any setup required to perform them) in this method—the results of modifying SceneKit objects in this method are undefined.

  • To render using Metal, use the renderer parameter to retrieve the scene renderer’s currentRenderCommandEncoder object and encode your own drawing commands. If you need to reference other Metal state, see the properties listed in SCNSceneRenderer.
  • To render using OpenGL, simply call the relevant OpenGL drawing commands—SceneKit automatically makes its OpenGL context the current context before calling this method. If you need to reference the OpenGL context being rendered into, examine the context property of the renderer parameter.

You must draw using the appropriate graphics technology for the view currently being rendered. Use the renderingAPI property of the renderer object to determine whether Metal or OpenGL is in use.

DesktopSCNControlMBS.rendererDidSimulatePhysics(time as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Tells the control to perform any updates that need to occur after physics simulations are performed.

time: The current system time, in seconds. Use this parameter for any time-based elements of your game logic.

SceneKit calls this event exactly once per frame, so long as the SCNViewMBS object (or other SCNSceneRenderer object) displaying the scene is not paused.

Implement this event to add game logic to the rendering loop. Any changes you make to the scene graph during this method are immediately reflected in the displayed scene. That is, SceneKit immediately updates the hierarchy of presentation nodes it uses to render the scene (instead of using the SCNTransactionMBS class to “batch” your changes).

This event is the last opportunity SceneKit provides for you to change the scene graph before rendering.

DesktopSCNControlMBS.rendererUpdate(time as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Tells the control to perform any updates that need to occur before actions, animations, and physics are evaluated.

time: The current system time, in seconds. Use this parameter for any time-based elements of your game logic.

SceneKit calls this method exactly once per frame, so long as the SCNViewMBS object (or other SCNSceneRenderer object) displaying the scene is not paused.

Implement this event to add game logic to the rendering loop. Any changes you make to the scene graph during this method are immediately reflected in the displayed scene. That is, SceneKit immediately updates the hierarchy of presentation nodes it uses to render the scene (instead of using the SCNTransactionMBS class to “batch” your changes).

DesktopSCNControlMBS.rendererWillRenderScene(scene as SCNSceneMBS, time as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Tells the control that the renderer has cleared the viewport and is about to render the scene.

scene: The SCNSceneMBS object to be rendered.
time: The current system time, in seconds. If your custom rendering involves animation, use this parameter to compute your own animation state.

Implement this event to perform custom drawing before SceneKit renders a scene—for example, to draw backdrop content underneath SceneKit content. You should only execute Metal or OpenGL drawing commands (and any setup required to perform them) in this event—the results of modifying SceneKit objects during this event are undefined.

To render using Metal, use the renderer parameter to retrieve the scene renderer’s currentRenderCommandEncoder object and encode your own drawing commands. If you need to reference other Metal state, see the properties listed in SCNSceneRenderer.
To render using OpenGL, simply call the relevant OpenGL drawing commands—SceneKit automatically makes its OpenGL context the current context before calling this event. If you need to reference the OpenGL context being rendered into, examine the context property of the renderer parameter.

You must draw using the appropriate graphics technology for the view currently being rendered. Use the renderingAPI property of the renderer object to determine whether Metal or OpenGL is in use.

DesktopSCNControlMBS.ScaleFactorChanged(NewFactor as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The backing store scale factor has changed.

Please invalidate any cached bitmaps or other relevant state.

DesktopSCNControlMBS.willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
event SceneKit MBS Mac64bit Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No
Will show contextual menu.

Your chance to modify the menu before it is shown, e.g. to add menu entries.

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


The biggest plugin in space...