|  | Gamedev Framework (gf)
    0.19.0
    A C++17 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 | onFramebufferSizeChange (Vector2i framebufferSize) | 
| Update the views with the new framebuffer size.  More... | |
| void | setInitialFramebufferSize (Vector2i framebufferSize) | 
| Set the initial framebuffer 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::onFramebufferSizeChange | ( | Vector2i | framebufferSize | ) | 
Update the views with the new framebuffer size.
| framebufferSize | The new size of the framebuffer | 
| void gf::ViewContainer::processEvent | ( | const Event & | event | ) | 
Update the views thanks to the event.
Internally it calls onFramebufferSizeChange() if a resize event occurs.
| event | An event | 
| void gf::ViewContainer::setInitialFramebufferSize | ( | Vector2i | framebufferSize | ) | 
Set the initial framebuffer size.
| framebufferSize | The initial size of the framebuffer | 
| 
 | inline | 
Set the initial screen size.
| screenSize | The initial size of the screen | 
 1.8.13
 1.8.13