13 #ifndef mitkDisplayActionEventHandler_h
14 #define mitkDisplayActionEventHandler_h
Event state machine that observes interaction events and broadcasts display action events.
Simplifies connecting display action event observers to a DisplayActionEventBroadcast.
std::vector< OberserverTagType > m_ObserverTags
virtual void InitActionsImpl(const std::string &prefixFilter="")
Override in sub-classes to define default display action connections.
void SetObservableBroadcast(DisplayActionEventBroadcast *observableBroadcast)
Set the DisplayActionEventBroadcast instance to observe.
WeakPointer< DisplayActionEventBroadcast > m_ObservableBroadcast
OberserverTagType ConnectDisplayActionEvent(const DisplayActionEvent &displayActionEvent, const StdFunctionCommand::ActionFunction &actionFunction, const StdFunctionCommand::FilterFunction &filterFunction=[](const itk::EventObject &) { return true;})
Register an observer for a specific display action event.
void DisconnectObserver(OberserverTagType observerTag)
Remove an observer identified by its tag.
void InitActions(std::string prefixFilter="")
Initialize pre-defined display actions and connect them to the broadcast.
unsigned long OberserverTagType
Tag type used to identify registered observers.
const std::vector< OberserverTagType > & GetAllObserverTags()
Get all currently registered observer tags.
virtual ~DisplayActionEventHandler()
Destructor. Removes all registered observers.
Base class for display action events broadcast by DisplayActionEventBroadcast.
std::function< void(const itk::EventObject &)> ActionFunction
Function type for the action to execute when the filter passes.
std::function< bool(const itk::EventObject &)> FilterFunction
Function type for filtering events. Returns true if the event should be handled.
A weak pointer that observes an itk::Object without preventing its deletion.
Find image slices visible on a given plane.