Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryIWindowListener.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 "berryIWindowListener.h"
18 
19 namespace berry {
20 
21 void
24 {
25  if (listener == nullptr) return;
26 
27  windowActivated += Delegate(listener, &IWindowListener::WindowActivated);
28  windowDeactivated += Delegate(listener, &IWindowListener::WindowDeactivated);
29  windowClosed += Delegate(listener, &IWindowListener::WindowClosed);
30  windowOpened += Delegate(listener, &IWindowListener::WindowOpened);
31 }
32 
33 void
36 {
37  if (listener == nullptr) return;
38 
39  windowActivated -= Delegate(listener, &IWindowListener::WindowActivated);
40  windowDeactivated -= Delegate(listener, &IWindowListener::WindowDeactivated);
41  windowClosed -= Delegate(listener, &IWindowListener::WindowClosed);
42  windowOpened -= Delegate(listener, &IWindowListener::WindowOpened);
43 }
44 
46 {
47 }
48 
49 }
void RemoveListener(IWindowListener *listener)
virtual void WindowClosed(const IWorkbenchWindow::Pointer &)
virtual void WindowOpened(const IWorkbenchWindow::Pointer &)
virtual void WindowDeactivated(const IWorkbenchWindow::Pointer &)
void AddListener(IWindowListener *listener)
virtual void WindowActivated(const IWorkbenchWindow::Pointer &)