Medical Imaging Interaction Toolkit  2018.4.99-bd7b41ba
Medical Imaging Interaction Toolkit
mitkMouseMoveEvent.cpp
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 #include "mitkMouseMoveEvent.h"
14 #include "mitkException.h"
15 
17  const mitk::Point2D &mousePosition,
18  MouseButtons buttonStates,
19  ModifierKeys modifiers)
20  : InteractionPositionEvent(baseRenderer, mousePosition), m_ButtonStates(buttonStates), m_Modifiers(modifiers)
21 {
22 }
23 
25 {
26  return m_Modifiers;
27 }
28 
30 {
31  return m_ButtonStates;
32 }
33 
35 {
36  m_Modifiers = modifiers;
37 }
38 
40 {
41  m_ButtonStates = buttons;
42 }
43 
45 {
46 }
47 
48 bool mitk::MouseMoveEvent::IsEqual(const mitk::InteractionEvent &interactionEvent) const
49 {
50  const auto &mpe = static_cast<const mitk::MouseMoveEvent &>(interactionEvent);
51  return (this->GetModifiers() == mpe.GetModifiers() && this->GetButtonStates() == mpe.GetButtonStates() &&
52  Superclass::IsEqual(interactionEvent));
53 }
54 
56 {
57  return (dynamic_cast<MouseMoveEvent *>(baseClass.GetPointer()) != nullptr);
58 }
Super class for all position events.
bool IsEqual(const InteractionEvent &) const override
Organizes the rendering process.
bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const override
MouseMoveEvent(BaseRenderer *, const Point2D &=Point2D(), MouseButtons buttonStates=NoButton, ModifierKeys modifiers=NoKey)
MouseButtons GetButtonStates() const
void SetModifiers(ModifierKeys modifiers)
void SetButtonStates(MouseButtons buttons)
ModifierKeys GetModifiers() const
bool IsEqual(const InteractionEvent &) const override