TouchCPLib  1.0.0
A touch-enabled GUI interface based on SDL and libTS. It provides a simple desktop-free UI for your embedded Raspberry projects.
SceneManager Class Reference

The scene manager controls which scene is currently displayed, in addition to enumerating the scenes currently loaded into memory. It can be accessed from the global application instance. More...

#include <SceneManager.h>

Public Member Functions

 SceneManager ()
 
 ~SceneManager ()
 
void setCurrentScene (std::string sceneName)
 Change the currently displayed scene. It has to be registered through registerScene before you can display it. More...
 
GraphicsScenegetCurrentScene ()
 
void registerScene (const std::string &sceneName, GraphicsScene *scene)
 Register a scene for displaying it later. It will NOT take ownership of the scene, so it's your job to free its memory later, if needed. More...
 
void unregisterScene (GraphicsScene *scene)
 Unregister a scene. More...
 
void unregisterScene (const std::string &sceneName)
 Unregister a scene. More...
 

Detailed Description

The scene manager controls which scene is currently displayed, in addition to enumerating the scenes currently loaded into memory. It can be accessed from the global application instance.

Constructor & Destructor Documentation

◆ SceneManager()

SceneManager::SceneManager ( )

◆ ~SceneManager()

SceneManager::~SceneManager ( )

Member Function Documentation

◆ getCurrentScene()

GraphicsScene * SceneManager::getCurrentScene ( )

◆ registerScene()

void SceneManager::registerScene ( const std::string &  sceneName,
GraphicsScene scene 
)

Register a scene for displaying it later. It will NOT take ownership of the scene, so it's your job to free its memory later, if needed.

Parameters
sceneNameThe scene identifier
sceneThe scene object

◆ setCurrentScene()

void SceneManager::setCurrentScene ( std::string  sceneName)

Change the currently displayed scene. It has to be registered through registerScene before you can display it.

Parameters
sceneNameThe name of the scene.

◆ unregisterScene() [1/2]

void SceneManager::unregisterScene ( GraphicsScene scene)

Unregister a scene.

Parameters
sceneThe scene object

◆ unregisterScene() [2/2]

void SceneManager::unregisterScene ( const std::string &  sceneName)

Unregister a scene.

Parameters
sceneNameThe scene name

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