NAP
App Class Reference

#include <app.h>

Public Member Functions

 App (Core &core)
 
virtual void inputMessageReceived (InputEventPtr inputEvent)
 
virtual void windowMessageReceived (WindowEventPtr windowEvent)
 
- Public Member Functions inherited from BaseApp
 BaseApp (nap::Core &core)
 
virtual ~BaseApp ()=default
 
 BaseApp (BaseApp &)=delete
 
BaseAppoperator= (const BaseApp &)=delete
 
 BaseApp (BaseApp &&)=delete
 
BaseAppoperator= (BaseApp &&)=delete
 
virtual bool init (utility::ErrorState &error)
 
virtual void update (double deltaTime)
 
virtual void render ()
 
virtual bool shutdownRequested ()
 
virtual int shutdown ()
 
void quit ()
 
const nap::CoregetCore () const
 
nap::CoregetCore ()
 
bool shouldQuit () const
 

Detailed Description

The default NAP application. Derive from this object to receive mouse, keyboard and window events. Override inputMessageReceived to receive mouse and keyboard events. Override windowMessageReceived to receive window events. This class works in conjunction with an AppEventHandler which polls and forwards incoming system messages.

Inheritance diagram for App:
[legend]
Collaboration diagram for App:
[legend]

Constructor & Destructor Documentation

◆ App()

App ( Core core)

Member Function Documentation

◆ inputMessageReceived()

virtual void inputMessageReceived ( InputEventPtr  inputEvent)
virtual

Called when the system receives an input event

Parameters
inputEventthe received input event

◆ windowMessageReceived()

virtual void windowMessageReceived ( WindowEventPtr  windowEvent)
virtual

Called when the system receives a window event

Parameters
windowEventthe event that contains the window information