Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkInteractionEventObserver.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkInteractionEventObserver_h
14 #define mitkInteractionEventObserver_h
15 
16 #include <mitkInteractionEvent.h>
17 #include <mitkServiceInterface.h>
18 #include <MitkCoreExports.h>
19 
20 namespace mitk
21 {
42  {
45 
67  virtual void Notify(InteractionEvent *interactionEvent, bool isHandled) = 0;
68 
70  void Disable();
71 
73  void Enable();
74 
79  bool IsEnabled() const;
80 
81  private:
82  bool m_IsEnabled;
83  };
84 
85 } /* namespace mitk */
86 MITK_DECLARE_SERVICE_INTERFACE(mitk::InteractionEventObserver, "org.mitk.InteractionEventObserver")
87 #endif
#define MITKCORE_EXPORT
Base class for all interaction events in MITK.
Provides the MITK_DECLARE_SERVICE_INTERFACE macro for registering C++ interfaces with both the CppMic...
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Declare a C++ interface for use with CppMicroServices (Qt not available).
Find image slices visible on a given plane.
Interface for observing all InteractionEvents dispatched through the system.
bool IsEnabled() const
Check whether this observer is currently enabled.
void Disable()
Disable this observer so it no longer receives notifications.
void Enable()
Enable this observer so it receives notifications.
virtual void Notify(InteractionEvent *interactionEvent, bool isHandled)=0
Called by the Dispatcher to notify this observer about an InteractionEvent.