Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
Medical Imaging Interaction Toolkit
berryIWorkbenchListener.h
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 
14 #ifndef BERRYIWORKBENCHLISTENER_H_
15 #define BERRYIWORKBENCHLISTENER_H_
16 
18 
19 #include "berryMessage.h"
20 
21 namespace berry
22 {
23 
24 struct IWorkbench;
25 
36 {
37 
38  struct Events {
41 
42  PreShutdownEvent preShutdown;
43  PostShutdownEvent postShutdown;
44 
45  void AddListener(IWorkbenchListener* listener);
46  void RemoveListener(IWorkbenchListener* listener);
47 
48  private:
49 
52  };
53 
54  virtual ~IWorkbenchListener();
55 
78  virtual bool PreShutdown(IWorkbench* /*workbench*/, bool /*forced*/) { return true; }
79 
89  virtual void PostShutdown(IWorkbench* /*workbench*/) {}
90 
91 };
92 
93 }
94 
95 #endif /* BERRYIWORKBENCHLISTENER_H_ */
virtual bool PreShutdown(IWorkbench *, bool)
Message2< IWorkbench *, bool, bool > PreShutdownEvent
virtual void PostShutdown(IWorkbench *)
Message1< IWorkbench * > PostShutdownEvent
#define BERRY_UI_QT