igor::iApplication Class Reference

#include <iApplication.h>

Inherits igor::iModule< iApplication >.

Public Member Functions

int32 run ()
 
void exit (int32 exitCode=0)
 
void pause (bool pause)
 
bool isPaused () const
 
bool isRunning ()
 
void onEvent (iEventPtr event)
 
void addLayer (iLayerPtr layer)
 
void removeLayer (iLayerPtr layer)
 
void clearLayers ()
 
bool isBlockedEvent (iEventType eventType)
 
void unblockEvent (iEventType eventType)
 
void blockEvent (iEventType eventType)
 
void destroyWindow ()
 
iWindowPtr getWindow ()
 

Friends

class iModule< iApplication >
 

Additional Inherited Members

- Static Public Member Functions inherited from igor::iModule< iApplication >
static IGOR_INLINE iApplicationgetInstance ()
 
static IGOR_INLINE bool isInstantiated ()
 
static void create ()
 
static void destroy ()
 
- Protected Member Functions inherited from igor::iModule< iApplication >
 iModule ()=default
 
virtual ~iModule ()=default
 

Detailed Description

Application

The main entry point to an Igor application

Member Function Documentation

◆ addLayer()

void igor::iApplication::addLayer ( iLayerPtr  layer)

adds layer

Adding a layer to the layer stack passes ownership to the layer stack.

Note: Most layers assume to be added after the window was already opened and the renderer being ready to receive calls.

Parameters
layerthe layer to be added

◆ blockEvent()

void igor::iApplication::blockEvent ( iEventType  eventType)

blocks the given event type

Parameters
eventTypethe given event type

◆ clearLayers()

void igor::iApplication::clearLayers ( )

clears layer stack and deletes all layers on it

◆ destroyWindow()

void igor::iApplication::destroyWindow ( )

destroys the window if it existed

◆ exit()

void igor::iApplication::exit ( int32  exitCode = 0)

stops the application

quits the main application loop. works only in combination with iApplication::run

Parameters
exitCodeoptional exit code

◆ getWindow()

iWindowPtr igor::iApplication::getWindow ( )
Returns
pointer to window

if window did not exist before it gets created here

◆ isBlockedEvent()

bool igor::iApplication::isBlockedEvent ( iEventType  eventType)
Returns
true if given event type is blocked
Parameters
eventTypethe given event type

◆ isPaused()

bool igor::iApplication::isPaused ( ) const
Returns
true if engine is paused

◆ isRunning()

bool igor::iApplication::isRunning ( )

returns true if application is still running

◆ onEvent()

void igor::iApplication::onEvent ( iEventPtr  event)

triggered on event

Parameters
eventthe triggered event

◆ pause()

void igor::iApplication::pause ( bool  pause)

stops/pauses the engine

pauses all simulation but not IO or rendering

Parameters
pauseif true simulations are paused

◆ removeLayer()

void igor::iApplication::removeLayer ( iLayerPtr  layer)

removes layer

removing a layer from the layer stack passes ownership back to the caller

Parameters
layerthe layer to be removed

◆ run()

int32 igor::iApplication::run ( )

starts the application

starts the main loop of the application and continues until stop() is called

Returns
exit code

◆ unblockEvent()

void igor::iApplication::unblockEvent ( iEventType  eventType)

unblocks the given event type

Parameters
eventTypethe given event type

Friends And Related Function Documentation

◆ iModule< iApplication >

friend class iModule< iApplication >
friend

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