Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryIShellListener.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
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 "berryIShellListener.h"
18 #include "berryShell.h"
19 
20 namespace berry {
21 
22 void
25 {
26  if (listener == nullptr) return;
27 
28  shellActivated += Delegate(listener, &IShellListener::ShellActivated);
29  shellClosed += Delegate(listener, &IShellListener::ShellClosed);
30  shellDeactivated += Delegate(listener, &IShellListener::ShellDeactivated);
31  shellDeiconified += Delegate(listener, &IShellListener::ShellDeiconified);
32  shellIconified += Delegate(listener, &IShellListener::ShellIconified);
33 }
34 
35 void
38 {
39  if (listener == nullptr) return;
40 
41  shellActivated -= Delegate(listener, &IShellListener::ShellActivated);
42  shellClosed -= Delegate(listener, &IShellListener::ShellClosed);
43  shellDeactivated -= Delegate(listener, &IShellListener::ShellDeactivated);
44  shellDeiconified -= Delegate(listener, &IShellListener::ShellDeiconified);
45  shellIconified -= Delegate(listener, &IShellListener::ShellIconified);
46 }
47 
49 {
50 }
51 
53 {}
55 {}
57 {}
59 {}
61 {}
62 
63 }
virtual void ShellDeactivated(const ShellEvent::Pointer &e)
virtual void ShellClosed(const ShellEvent::Pointer &e)
virtual void ShellActivated(const ShellEvent::Pointer &e)
virtual void ShellDeiconified(const ShellEvent::Pointer &e)
void AddListener(IShellListener *listener)
virtual void ShellIconified(const ShellEvent::Pointer &e)
void RemoveListener(IShellListener *listener)