![]() |
GA::kit v0.3
G&A's in-house C++ application framework
|
Scene is a view controller. More...
#include <scene.h>
Public Member Functions | |
| virtual | ~Scene () |
| virtual void | setup () |
| virtual void | update () |
| virtual void | draw () |
| template<CLASS_INHERITS(NodeT, ga::Node) > | |
| std::shared_ptr< NodeT > | addNode (std::shared_ptr< NodeT > child=nullptr) |
| std::shared_ptr< ga::Node > | addNode () |
| bool | removeNode (std::shared_ptr< Node > node) |
| void | clearNodes () |
| bool | hasNode (std::shared_ptr< Node > node) |
| std::shared_ptr< Node > | getRootNode () |
| std::vector< std::shared_ptr< Node > > | getNodes () |
| void | forEachNode (std::function< void(std::shared_ptr< Node >)> fn) |
| void | setName (const std::string &name) |
| const std::string & | getName () |
| virtual void | handleMouseEvent (MouseEvent &mouseEvent) |
| virtual void | handleTouchEvent (TouchEvent &touchEvent) |
| virtual void | handleKeyEvent (KeyEvent &keyEvent) |
Static Public Member Functions | |
| template<CLASS_INHERITS(SceneT, ga::Scene) > | |
| static std::shared_ptr< SceneT > | create () |
| static std::shared_ptr< Scene > | create () |
Public Attributes | |
| Signal< KeyEvent & > | onKeyEvent |
| Signal< MouseEvent & > | onMouseEvent |
| Signal< TouchEvent & > | onTouchEvent |
Protected Member Functions | |
| Scene () | |
| void | updateNodes () |
| void | drawNodes () |
| size_t | nextDrawIndex (std::shared_ptr< Node > node) |
| void | forceAssignDrawIndices () |
Protected Attributes | |
| std::string | m_name |
| std::shared_ptr< Node > | m_rootNode |
| ga::TimeoutManager | m_timeoutManager |
| std::vector< std::weak_ptr< Node > > | m_drawnNodes |
Friends | |
| void | Node::setScene (std::shared_ptr< Scene > scene) |
| void | Node::drawTree () |
| size_t | Node::getSceneDrawIndex () const |
Scene is a view controller.
|
virtual |
|
protected |
| std::shared_ptr< ga::Node > ga::Scene::addNode | ( | ) |
| std::shared_ptr< NodeT > ga::Scene::addNode | ( | std::shared_ptr< NodeT > | child = nullptr | ) |
| void ga::Scene::clearNodes | ( | ) |
|
static |
|
inlinestatic |
|
virtual |
|
protected |
|
protected |
| void ga::Scene::forEachNode | ( | std::function< void(std::shared_ptr< Node >)> | fn | ) |
| const std::string & ga::Scene::getName | ( | ) |
| std::vector< std::shared_ptr< Node > > ga::Scene::getNodes | ( | ) |
| std::shared_ptr< Node > ga::Scene::getRootNode | ( | ) |
|
virtual |
|
virtual |
|
virtual |
| bool ga::Scene::hasNode | ( | std::shared_ptr< Node > | node | ) |
|
protected |
| bool ga::Scene::removeNode | ( | std::shared_ptr< Node > | node | ) |
| void ga::Scene::setName | ( | const std::string & | name | ) |
|
virtual |
|
virtual |
|
protected |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
| Signal<MouseEvent&> ga::Scene::onMouseEvent |
| Signal<TouchEvent&> ga::Scene::onTouchEvent |