nCine  2025.04.r498-9d36345
A cross-platform 2D game engine
Public Member Functions | List of all members
ncine::IAppEventHandler Class Referenceabstract

The interface class for handling nCine application events. More...

#include <IAppEventHandler.h>

Public Member Functions

virtual ~IAppEventHandler ()=0
 Pure virtual destructor in order to make the class abstract.
 
virtual void onPreInit (AppConfiguration &config)
 Called once before initialization to setup the application. More...
 
virtual void onInit ()
 Called once on application initialization.
 
virtual void onFrameStart ()
 Called at the start of each frame.
 
virtual void onPostUpdate ()
 Called every time the scenegraph has been traversed and all nodes have been transformed.
 
virtual void onDrawViewport (Viewport &viewport)
 Called every time a viewport is going to be drawn.
 
virtual void onFrameEnd ()
 Called at the end of each frame, just before swapping buffers.
 
virtual void onResizeWindow (int width, int height)
 Called every time the window is resized (by the system or the user) More...
 
virtual void onChangeScalingFactor (float factor)
 Called every time the window scaling factor changes.
 
virtual void onShutdown ()
 Called once on application shutdown.
 
virtual void onSuspend ()
 Called every time the application needs to be suspended.
 
virtual void onResume ()
 Called every time the application resumes from suspension.
 

Detailed Description

The interface class for handling nCine application events.

Member Function Documentation

◆ onPreInit()

virtual void ncine::IAppEventHandler::onPreInit ( AppConfiguration config)
inlinevirtual

Called once before initialization to setup the application.

Warning
At this stage it is only safe to modify the config object. No other engine API calls should be made.

◆ onResizeWindow()

virtual void ncine::IAppEventHandler::onResizeWindow ( int  width,
int  height 
)
inlinevirtual

Called every time the window is resized (by the system or the user)

Note
It is called when the drawable resolution changes, but the screen coordinates one might stay the same. This might happen if the display scale changes or if the user drags a window on a different screen with a different DPI or scaling settings.

The documentation for this class was generated from the following file: