Medical Imaging Interaction Toolkit  2016.11.0
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,
6  Division of Medical and Biological Informatics.
7  All rights reserved.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without
10  even the implied warranty of MERCHANTABILITY or FITNESS FOR
11  A PARTICULAR PURPOSE.
12 
13  See LICENSE.txt or http://www.mitk.org for details.
14 
15  ===================================================================*/
16 
17 #include "mitkMouseMoveEvent.h"
18 #include "mitkException.h"
19 
21  const mitk::Point2D &mousePosition,
22  MouseButtons buttonStates,
23  ModifierKeys modifiers)
24  : InteractionPositionEvent(baseRenderer, mousePosition), m_ButtonStates(buttonStates), m_Modifiers(modifiers)
25 {
26 }
27 
29 {
30  return m_Modifiers;
31 }
32 
34 {
35  return m_ButtonStates;
36 }
37 
38 void mitk::MouseMoveEvent::SetModifiers(ModifierKeys modifiers)
39 {
40  m_Modifiers = modifiers;
41 }
42 
43 void mitk::MouseMoveEvent::SetButtonStates(MouseButtons buttons)
44 {
45  m_ButtonStates = buttons;
46 }
47 
49 {
50 }
51 
52 bool mitk::MouseMoveEvent::IsEqual(const mitk::InteractionEvent &interactionEvent) const
53 {
54  const mitk::MouseMoveEvent &mpe = static_cast<const mitk::MouseMoveEvent &>(interactionEvent);
55  return (this->GetModifiers() == mpe.GetModifiers() && this->GetButtonStates() == mpe.GetButtonStates() &&
56  Superclass::IsEqual(interactionEvent));
57 }
58 
60 {
61  return (dynamic_cast<MouseMoveEvent *>(baseClass.GetPointer()) != NULL);
62 }
Super class for all position events.
virtual bool IsEqual(const InteractionEvent &) const override
Organizes the rendering process.
virtual bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const override
MouseMoveEvent(BaseRenderer *, const Point2D &=Point2D(), MouseButtons buttonStates=NoButton, ModifierKeys modifiers=NoKey)
void SetModifiers(ModifierKeys modifiers)
MouseButtons GetButtonStates() const
void SetButtonStates(MouseButtons buttons)
ModifierKeys GetModifiers() const