Nana C++ Library. Reference for users.
What we need to use nana
|
the type of the members of general_events. More...
Public Types | |
using | arg_reference = const typename std::remove_reference< Arg >::type & |
Public Member Functions | |
template<typename Function > | |
event_handle | connect_front (Function &&fn) |
Creates an event handler at the beginning of event chain. More... | |
event_handle | connect (void(*fn)(arg_reference)) |
It will not get called if stop_propagation() was called. More... | |
template<typename Function > | |
event_handle | connect (Function &&fn) |
It will not get called if stop_propagation() was called, because it is set at the end of the chain.. More... | |
template<typename Function > | |
event_handle | operator() (Function &&fn) |
It will not get called if stop_propagation() was called. More... | |
template<typename Function > | |
event_handle | connect_unignorable (Function &&fn, bool in_front=false) |
It will get called because it is unignorable. More... | |
void | emit (arg_reference &arg, window window_handle) |
Public Member Functions inherited from nana::detail::event_base | |
~event_base () | |
std::size_t | length () const |
void | clear () noexcept |
void | remove (event_handle evt) override |
Public Member Functions inherited from nana::detail::event_interface | |
virtual | ~event_interface ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from nana::detail::event_base | |
event_handle | _m_emplace (detail::event_docker_interface *, bool in_front) |
Protected Attributes inherited from nana::detail::event_base | |
unsigned | emitting_count_ { 0 } |
bool | deleted_flags_ { false } |
std::vector < detail::event_docker_interface * > * | dockers_ { nullptr } |
the type of the members of general_events.
It connect the functions to be called as response to the event and manages that chain of responses It is a functor, that get called to connect a "normal" response function, with normal "priority".
If a response function need another priority (unignorable or called first) it will need to be connected with the specific connect function not with the operator() It also permit to "emit" that event, calling all the active responders.
using nana::basic_event< Arg >::arg_reference = const typename std::remove_reference<Arg>::type & |
|
inline |
It will not get called if stop_propagation() was called.
|
inline |
It will not get called if stop_propagation() was called, because it is set at the end of the chain..
|
inline |
Creates an event handler at the beginning of event chain.
|
inline |
It will get called because it is unignorable.
|
inline |
|
inline |
It will not get called if stop_propagation() was called.