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
MinimalApplicationSnippet.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 
17 #include "CustomViewer.h"
18 #include "CustomViewerWorkbenchAdvisor.h"
19 
20 #include <berryPlatformUI.h>
21 
22 CustomViewer::CustomViewer()
23 {
24 }
25 
26 CustomViewer::~CustomViewer()
27 {
28 }
30 int CustomViewer::Start()
31 {
33 
34  wbAdvisor.reset(new berry::WorkbenchAdvisor);
35  int code = berry::PlatformUI::CreateAndRunWorkbench(display, wbAdvisor.data());
36 
37  // exit the application with an appropriate return code
38  return code == berry::PlatformUI::RETURN_RESTART ? EXIT_RESTART : EXIT_OK;
39 }
41 void CustomViewer::Stop()
42 {
43 }
static Display * CreateDisplay()
static const int RETURN_RESTART
static int CreateAndRunWorkbench(Display *display, WorkbenchAdvisor *advisor)