Sleeping Wombat GUI  0.100
swGUI
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
sw::gui::EventHandlers Class Reference

Container class for delegates. More...

#include <EventHandlers.h>

Public Member Functions

 EventHandlers ()
 
DelegatesContainerBaseFindContainer (EventType eventID)
 Search for events container. More...
 

Private Member Functions

bool Exists (EventType eventID)
 Checks if container exists. More...
 
Functions for EventProxy
DelegatesContainerBaseAddContainer (DelegatesContainerBaseOPtr &&container)
 Adds delegates container. More...
 
bool RemoveContainer (EventType eventID)
 Removes container with deelgates. More...
 
bool RaiseEvent (const RegisteredEvent *eventInfo, UIElement *sender, IEventArgsOPtr &&arguments)
 Sends event to visual tree using RoutingStrategy specyfied in eventInfo. Calls EventsSystem::RaiseEvent. More...
 

Private Attributes

DelegatesContainerBaseOPtr m_delegatesList
 

Friends

template<typename EventArgType >
class EventProxy
 

Detailed Description

Container class for delegates.

Constructor & Destructor Documentation

sw::gui::EventHandlers::EventHandlers ( )
explicit

Member Function Documentation

DelegatesContainerBase * sw::gui::EventHandlers::AddContainer ( DelegatesContainerBaseOPtr &&  container)
private

Adds delegates container.

Returns
If container already existed, this function returns this container.
bool sw::gui::EventHandlers::Exists ( EventType  eventID)
private

Checks if container exists.

DelegatesContainerBase * sw::gui::EventHandlers::FindContainer ( EventType  eventID)

Search for events container.

Returns
This function can return nullptr if container haven't been created yet.
bool sw::gui::EventHandlers::RaiseEvent ( const RegisteredEvent eventInfo,
UIElement sender,
IEventArgsOPtr &&  arguments 
)
private

Sends event to visual tree using RoutingStrategy specyfied in eventInfo. Calls EventsSystem::RaiseEvent.

Returns
Returns false if event couldn't be sent. False means you provided wrong argument type for this event, or sender type is different then registered. Normally you don't have to check this.
bool sw::gui::EventHandlers::RemoveContainer ( EventType  eventID)
private

Removes container with deelgates.

Returns
Returns false if container for eventID didn't exist.

Friends And Related Function Documentation

template<typename EventArgType >
friend class EventProxy
friend

Member Data Documentation

DelegatesContainerBaseOPtr sw::gui::EventHandlers::m_delegatesList
private

The documentation for this class was generated from the following files: