Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
Medical Imaging Interaction Toolkit
berryIShellListener.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 "berryIShellListener.h"
14 #include "berryShell.h"
15 
16 namespace berry {
17 
18 void
21 {
22  if (listener == nullptr) return;
23 
24  shellActivated += Delegate(listener, &IShellListener::ShellActivated);
25  shellClosed += Delegate(listener, &IShellListener::ShellClosed);
26  shellDeactivated += Delegate(listener, &IShellListener::ShellDeactivated);
27  shellDeiconified += Delegate(listener, &IShellListener::ShellDeiconified);
28  shellIconified += Delegate(listener, &IShellListener::ShellIconified);
29 }
30 
31 void
34 {
35  if (listener == nullptr) return;
36 
37  shellActivated -= Delegate(listener, &IShellListener::ShellActivated);
38  shellClosed -= Delegate(listener, &IShellListener::ShellClosed);
39  shellDeactivated -= Delegate(listener, &IShellListener::ShellDeactivated);
40  shellDeiconified -= Delegate(listener, &IShellListener::ShellDeiconified);
41  shellIconified -= Delegate(listener, &IShellListener::ShellIconified);
42 }
43 
45 {
46 }
47 
49 {}
51 {}
53 {}
55 {}
57 {}
58 
59 }
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)