Middle Europe Productions Library  alpha 1.3.3
Public Member Functions | List of all members
MEP::Template::Hub Class Reference

Template of a custom Middle Europe Productions hub. More...

#include <Hub.h>

Inheritance diagram for MEP::Template::Hub:
MEP::Assets::HubAssets MEP::Template::BaseTemplate MEP::BaseWindow MEPtools::GroupManager< MEPtools::ToRender, MEPtools::ToRender, std::list< MEPtools::ToRender > > MEP::WindowView

Public Member Functions

 Hub (unsigned int ID, MEP::Template::Application &base, const sf::Color &color=sf::Color::White)
 
 ~Hub ()
 
void changeColor (const sf::Color &color)
 
void setFollow (const MEP::AnimationColor &animation, HubElements element, MEP::U_int32 x)
 
void setFollow (const MEP::AnimationPosition &base, const MEP::Following::FollowType type, HubElements element)
 
void handleEvent (sf::RenderWindow &Window, sf::Event &event) override
 
- Public Member Functions inherited from MEP::Template::BaseTemplate
 BaseTemplate ()=default
 
virtual void additionalEvents (sf::RenderWindow &, sf::Event &)
 
virtual void additionalInit ()
 
- Public Member Functions inherited from MEP::BaseWindow
 BaseWindow (const unsigned int ID)
 
 BaseWindow (const unsigned int ID, const sf::View &view, const sf::View &master)
 
virtual bool render (sf::RenderWindow &Window)
 
void onResize (const sf::Vector2u &new_res)
 
virtual void update (sf::Time &currentTime)
 
virtual void beforeUpdate (sf::Time &)
 
virtual void updateRunning (sf::Time &currentTime)
 
virtual void updateEntrance (sf::Time &currentTime)
 
virtual void updateExit (sf::Time &currentTime)
 
virtual void afterUpdate (sf::Time &)
 
const StatusgetStatus ()
 
void changeStatus (const Status status)
 
void newObject (DataPackage object)
 
void newObject (MEP::Drawable *object)
 
void newObject (MEP::Drawable &object)
 
template<typename ... Values>
void newObjects (Values &&... values)
 
void debugOutput (std::ostream &out)
 
unsigned int getID () const
 
bool operator== (const unsigned int ID) const
 
bool operator== (const BaseWindow &x) const
 
virtual ~BaseWindow ()
 
- Public Member Functions inherited from MEPtools::GroupManager< MEPtools::ToRender, MEPtools::ToRender, std::list< MEPtools::ToRender > >
 GroupManager ()=default
 
bool _insert (MEP::U_int32 ID, MEP::U_int32 group, MEPtools::ToRender value)
 
MEPtools::ToRender_get (MEP::U_int32 ID, MEP::U_int32 group) const
 
std::list< MEPtools::ToRender > & _getGroup (MEP::U_int32 group)
 
bool _deleteGroup (MEP::U_int32 group)
 
bool _deleteElement (MEP::U_int32 ID, MEP::U_int32 group)
 
void _execute (Method method)
 
bool _execute (Method method, MEP::U_int32 group)
 
void _execute (Method method) const
 
bool _execute (Method method, MEP::U_int32 group) const
 
void _debugOutput (std::ostream &out, const char *before="", const char *after="") const
 
void _debugOutput (std::ostream &out, Out method) const
 
unsigned int _size () const
 
bool _empty () const
 
void _clear ()
 
- Public Member Functions inherited from MEP::WindowView
 WindowView ()=default
 
 WindowView (const sf::View &view, const sf::View &master)
 
void grabWindow ()
 
void releaseWindow ()
 
void moveViewChange (const sf::Vector2i &change)
 
bool isGrabbed () const
 
bool customView () const
 
const sf::View & getView () const
 
void setView (const sf::View &view)
 
virtual void moveView (sf::RenderWindow &Window)
 
const sf::View & getMasterView () const
 

Additional Inherited Members

- Public Types inherited from MEP::BaseWindow
enum  Status {
  Status::LowEntrance = 0, Status::Entrance = -1, Status::Exit = -2, Status::LowExit = -3,
  Status::InProgress = -4, Status::Main = -5, Status::NullAction = -6
}
 
- Protected Attributes inherited from MEP::WindowView
sf::Vector2i m_windowPossChange
 
bool m_grabbedWindow = false
 
sf::View m_view
 
const sf::View * m_appView = nullptr
 
bool isCustomViewEnabled = false
 

Detailed Description

Template of a custom Middle Europe Productions hub.

Functionalities:
Exit button.
Minimization button.
MEP logo :)

Constructor & Destructor Documentation

◆ Hub()

MEP::Template::Hub::Hub ( unsigned int  ID,
MEP::Template::Application base,
const sf::Color &  color = sf::Color::White 
)
inline

Constructor of a MEP::Template::Hub

Parameters
[in]ID: Window identifier
[in]base: Reference to a MEP::Window::Template::Application
[in]color: Color of the elements.

◆ ~Hub()

MEP::Template::Hub::~Hub ( )
inline

Member Function Documentation

◆ changeColor()

void MEP::Template::Hub::changeColor ( const sf::Color &  color)
inline

Changes the color of a HUB.

Parameters
[in]event: sf::Color

◆ handleEvent()

void MEP::Template::Hub::handleEvent ( sf::RenderWindow &  Window,
sf::Event &  event 
)
inlineoverridevirtual

Handles the events of the Hub Warning If you want to add your own events just ovveride the additionalEvents() method from MEP::Window::Template::BaseWindow

Parameters
[in]Window: sf::RenderWindow
[in]event: sf::Event& event

Reimplemented from MEP::BaseWindow.

◆ setFollow() [1/2]

void MEP::Template::Hub::setFollow ( const MEP::AnimationColor animation,
HubElements  element,
MEP::U_int32  x 
)
inline

◆ setFollow() [2/2]

void MEP::Template::Hub::setFollow ( const MEP::AnimationPosition base,
const MEP::Following::FollowType  type,
HubElements  element 
)
inline