Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkMouseDoubleClickEvent.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 
18 #include "mitkException.h"
19 
21  const mitk::Point2D &mousePosition,
22  MouseButtons buttonStates,
23  ModifierKeys modifiers,
24  MouseButtons eventButton)
25  : InteractionPositionEvent(baseRenderer, mousePosition),
26  m_EventButton(eventButton),
27  m_ButtonStates(buttonStates),
28  m_Modifiers(modifiers)
29 {
30 }
31 
33 {
34  return m_EventButton;
35 }
36 
38 {
39  m_EventButton = buttons;
40 }
41 
43 {
44  return m_Modifiers;
45 }
46 
48 {
49  return m_ButtonStates;
50 }
51 
53 {
54  m_Modifiers = modifiers;
55 }
56 
58 {
59  m_ButtonStates = buttons;
60 }
61 
63 {
64 }
65 
67 {
68  const mitk::MouseDoubleClickEvent &mpe = static_cast<const mitk::MouseDoubleClickEvent &>(interactionEvent);
69  return (this->GetEventButton() == mpe.GetEventButton() && this->GetModifiers() == mpe.GetModifiers() &&
70  this->GetButtonStates() == mpe.GetButtonStates() && Superclass::IsEqual(interactionEvent));
71 }
72 
74 {
75  return (dynamic_cast<MouseDoubleClickEvent *>(baseClass.GetPointer()) != NULL);
76 }
Super class for all position events.
Organizes the rendering process.
void SetModifiers(ModifierKeys modifiers)
static std::string GetEventButton(mitk::InteractionEvent *event)
GetEventButton Return EventButton as String.
void SetEventButton(MouseButtons buttons)
void SetButtonStates(MouseButtons buttons)
virtual bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const override
virtual bool IsEqual(const InteractionEvent &) const override
MouseDoubleClickEvent(BaseRenderer *, const Point2D &=Point2D(), MouseButtons buttonStates=NoButton, ModifierKeys modifiers=NoKey, MouseButtons eventButton=NoButton)