MT Showcase SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Showcase::ScheduledEvent Class Referenceabstract

This is an API class for scheduled events. More...

#include <ScheduledEvent.hpp>

Inherits Node, and enable_shared_from_this< ScheduledEvent >.

Public Member Functions

virtual bool isScheduled () const =0
 Check if event should be active at the current time.
 
bool isActive () const
 Is event currently active ie. More...
 
void checkEvent ()
 Check and update event active status. More...
 
virtual void setHostComponent (std::shared_ptr< UIComponent > comp)
 Assign a target component for this event. More...
 

Protected Member Functions

virtual void eventStarted ()
 Called when the event becomes active.
 
virtual void eventEnded ()
 Called when the event becomes inactive.
 
virtual void checkRecurrence ()
 Called when event active state changes.
 

Detailed Description

This is an API class for scheduled events.

Member Function Documentation

void Showcase::ScheduledEvent::checkEvent ( )

Check and update event active status.

This calls eventStarted if event is changed to active, or eventEnded if event is changed to inactive

bool Showcase::ScheduledEvent::isActive ( ) const
inline

Is event currently active ie.

eventStarted has been called but eventEnded has not

void Showcase::ScheduledEvent::setHostComponent ( std::shared_ptr< UIComponent comp)
virtual

Assign a target component for this event.

The default implementation does nothing