23 template<
typename EventArgType >
38 inline void operator+= ( DelegateType delegate );
39 inline bool operator-= ( DelegateType delegate );
53 template<
typename EventArgType >
55 : m_handlers( delegatesContainer )
56 , m_eventInfo( eventInfo )
61 template<
typename EventArgType >
64 AddDelegate( delegate );
69 template<
typename EventArgType >
72 return RemoveDelegate( delegate );
77 template<
typename EventArgType >
85 if( !delegateContainer )
88 delegateContainer = m_handlers.
AddContainer( std::move( DelegatesContainerBaseOPtr( container ) ) );
97 template<
typename EventArgType >
102 if( delegateContainer )
108 if( typedDelegateContainer->
IsEmpty() )
110 m_handlers.RemoveContainer( m_eventInfo->ID );
120 template<
typename EventArgType >
123 return m_handlers.RaiseEvent( m_eventInfo, sender, std::move( arguments ) );
Derived template class for delegates.
Definition: DelegateContainer.h:91
Base class for delegates containers.
Definition: DelegateContainer.h:52
bool operator-=(DelegateType delegate)
Definition: EventProxy.h:70
EventProxy(EventHandlers &delegatesContainer, const RegisteredEvent *eventInfo)
Definition: EventProxy.h:54
Definition: DirectInputModule.cpp:11
const RegisteredEvent * m_eventInfo
Definition: EventProxy.h:32
void operator+=(DelegateType delegate)
Definition: EventProxy.h:62
Interface for all controls in tree.
Definition: UIElement.h:57
void AddDelegate(DelegateType delegate)
Definition: EventProxy.h:78
bool RemoveDelegate(DelegateType delegate)
Definition: DelegateContainer.h:192
bool RaiseEvent(UIElement *sender, ArgumentsOwnerPtr &&arguments)
Definition: EventProxy.h:121
EventDelegate< EventArgType > DelegateType
Definition: EventProxy.h:27
void AddContainer(DelegatesContainerBaseOPtr &&container)
Adds container on the end of list.
Definition: DelegateContainer.h:132
fastdelegate::FastDelegate2< UIElement *, EventArgType * > EventDelegate
Definition: DelegateContainer.h:31
void AddDelegate(DelegateType delegate)
Definition: DelegateContainer.h:183
Container class for delegates.
Definition: EventHandlers.h:24
EventHandlers & m_handlers
Definition: EventProxy.h:31
Structure describes event registered by controls.
Definition: RegisteredEvent.h:38
std::unique_ptr< EventArgType > ArgumentsOwnerPtr
Definition: EventProxy.h:28
Helper class for accessing event.
Definition: EventProxy.h:24
bool IsEmpty() const
Definition: DelegateContainer.h:225
bool RemoveDelegate(DelegateType delegate)
Definition: EventProxy.h:98