![]()  | 
  
    Gamedev Framework (gf)
    0.14.0
    
   A C++14 framework for 2D games 
   | 
 
A container of views. More...
#include <gf/ViewContainer.h>
Public Member Functions | |
| void | addView (AdaptativeView &view) | 
| Add a view to the container.  More... | |
| void | processEvent (const Event &event) | 
| Update the views thanks to the event.  More... | |
| void | onScreenSizeChange (Vector2i screenSize) | 
| Update the views with the new screen size.  More... | |
| void | setInitialScreenSize (Vector2i screenSize) | 
| Set the initial screen size.  More... | |
A container of views.
A view manager handles several adaptive views. It can update all the views at the same time. All it needs is the events that come from the window.
Here is a full example with two adaptive views:
| void gf::ViewContainer::addView | ( | AdaptativeView & | view | ) | 
Add a view to the container.
| view | An adaptive view | 
| void gf::ViewContainer::onScreenSizeChange | ( | Vector2i | screenSize | ) | 
Update the views with the new screen size.
| screenSize | The new size of the screen | 
| void gf::ViewContainer::processEvent | ( | const Event & | event | ) | 
Update the views thanks to the event.
Internally it calls onScreenSizeChange() if a resize event occurs.
| event | An event | 
| void gf::ViewContainer::setInitialScreenSize | ( | Vector2i | screenSize | ) | 
Set the initial screen size.
| screenSize | The initial size of the screen | 
 1.8.13